Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CachedIntrospectionResults caching jar entries and creating big pressure on GC [SPR-11818] #16438

Closed
spring-projects-issues opened this issue May 25, 2014 · 4 comments
Assignees
Labels
in: core Issues in core modules (aop, beans, core, context, expression) type: bug A general bug
Milestone

Comments

@spring-projects-issues
Copy link
Collaborator

spring-projects-issues commented May 25, 2014

Sargis Harutyunyan opened SPR-11818 and commented

Hi, seems CachedIntrospectionResults caching jar entries and creating big pressure on GC and here is my code:

    public static ExaminerWorkloadUpdateWU createExaminerWorkloadUpdateWU(WorkloadCommand workloadCommand) {
        ExaminerWorkloadUpdateWU examinerWorkloadUpdateWU = new ExaminerWorkloadUpdateWU(workloadCommand);
        DEFAULT_CONTEXT_FACTORY.wire(examinerWorkloadUpdateWU);

        return examinerWorkloadUpdateWU;
    }

// and

    public final void wire(Object bean) {
        context.getSpringContext().getAutowireCapableBeanFactory().autowireBean(bean);
    }

// and class itself

public class ExaminerWorkloadUpdateWU extends CriterionUpdateWorkUnit<Void> {

   // impl. ommited

    @Autowired
    public void setWorkloadCommandExecutor(WorkloadCommandExecutor workloadCommandExecutor) {
        this.workloadCommandExecutor = workloadCommandExecutor;
    }
}

Note that actual @Cache annotation even not applied to target bean I have it in my application but not for target bean.

Also I attached Mission Control recording file and screenshot pointing to CachedIntrospectionResults.


Affects: 3.2.6

Attachments:

Issue Links:

@spring-projects-issues
Copy link
Collaborator Author

spring-projects-issues commented May 26, 2014

Juergen Hoeller commented

Have you had a chance to test this against 3.2.9 and/or 4.0.5 as well? There has been quite a bit of fine-tuning in that space lately... You might nevertheless see the same effect but it'd be helpful to verify against those most recent releases.

Juergen

@spring-projects-issues
Copy link
Collaborator Author

spring-projects-issues commented May 27, 2014

Sargis Harutyunyan commented

Hi I tested with 3.2.9 and problem still exists but with 4.0.5 it works fine and memory allocation is low also, I will attach 'Flight Recorder' for both cases can be useful

@spring-projects-issues
Copy link
Collaborator Author

spring-projects-issues commented May 27, 2014

Juergen Hoeller commented

This looks like a consequence of #15981 then, which we addressed as of 4.0.1. Since we have a dependency on JDK 6 and even a specific JDK update level there, we can't easily backport this to the 3.2.x line, I'm afraid. So the generally improved behavior is a 4.x only characteristic.

That said, we did introduce a "spring.beaninfo.ignore" property in 4.0.1 and 3.2.7 - see #13653. Setting that to "true" (as a system property or in a spring.properties file) will suppress the entire Introspector BeanInfo handling, which might optimize the GC load in your scenario. This is the only option in that problem space that's available in 3.2.x line as well.

Juergen

@spring-projects-issues
Copy link
Collaborator Author

spring-projects-issues commented May 27, 2014

Sargis Harutyunyan commented

Okay, thanks a lot.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: core Issues in core modules (aop, beans, core, context, expression) type: bug A general bug
Projects
None yet
Development

No branches or pull requests

2 participants