I’m testing an application that starts a restlet, when an http request arrive to the restlet, start a new thread and proccess the request, the app creates a new object and store in a Map (
For the stress testing i’m using Jmeter, i’m seeing a problem with the java proccess memory, i dont know if the problem is the heap, the stack, or someother, lets show the problem:
I launch the same case several times, first run my project (with empty cache of course):
- 500 threads -> the time average of threads is 1900 ms
- 500 threads -> the time average of threads is 600 ms
- 500 threads -> the time average of threads is 598 ms
- 500 threads -> the time average of threads is 670 ms
….
As you see, my problem is that the first execution takes much longer than the others. Each thread stores in a Map the instantation object, andseems to work very slow when it is empty. anyone have any idea who might be going? i tried to increase the heap initiate memory of the jvm, but not works.
also if anyone knows any reference that can read to help me appreciate it
Thanks.
I suspect your JVM didn’t warm up at the first execution. Try adding
-XX:+PrintCompilationto see whether code is being compiled in the first test, but not the second.