Recently we have migrated one of the applications hosted on Wildfly 8.2.1 to Wildfly 10.1.0. Migration went well, but we have observed performance degradation in response times. We have track down the bottom line reason for the performance penalty - using Entity-listeners with injected session beans that are responsible for setting up certain aspects of retrieved entities in different phases of entity lifecycle (in my demo application @PostLoad is only used). The discrepancy in response times for the original application when deployed on Wildfly 10 is on a scale of seconds e.g. 15 ~ 20 sec, where original response times when the application was running on Wildfly 8.2.1 were under 100ms in average, talking about very same endpoint and functional component when tested.
I have also prepared a demo application that demonstrates the problem. From there I can also notice a difference in response times in case of Wildfly 10.1.0.
I was wondering if you have some suggestion tip that will help explaining why we experience the problems we experience? Also, I think is always good that at least the community could find this information useful, and project maintainers would be aware of the issue.
Few important facts to mention for the application test:
- Persistence provider is same Eclipse link version 2.6.4 used both in Wildfly 8.2.1 and Wildfly 10.1.0
- No modification or jvm startup tuning parameters done in both cases, jvm memory parameters default and no other GC optimizations
- Both Wildfly servers run with out of the box stanandlone.xml configuration default profile.
Some notes for the demo application:
- Eclipse link 2.6.4 used as persistence provider.
- Uses in memory default java:jboss/datasources/ExampleDS
- On application start the database will be loaded with 1500 records.
- Disabling the EntityListeners results with performance gain and response times are returned to normal based on our reference with Wildfly 8.2.1 experience
- After deploying this endpoint http://localhost:8080/test/customer becomes available, we can see the response time discrepancy when requesting this endpoint.
- To deploy the application from sources mvn clean install -Dwildfly.host=localhost - Dwildfly.port=9990 -Dwildfly.username=admin -Dwildfly.password=?
- Or just use dist/test.war for deployment.
Link to the demo application repo