Reputation: 41
Our team is currently running stress tests and using JProfiler for monitoring.
We chose two scenarios for the test: setting concurrent threads to 10 and 40, and then compared the results.
The test results were recorded using Async Sampling for both JPA views and HTTP Server views.
We made a few discoveries:
I referred to the following resources (the issue pertains to an earlier version of JProfiler):
The answer explains that the Net I/O thread state should involve low CPU load operations. Is this correct? And is the Waiting thread state also a low CPU load operation?
If both are correct, it implies that the CPU should be consumed elsewhere, such as in the runnable thread state (with block thread time approaching zero, I think it can be ignored).
So why is there such a large difference in CPU usage between 10 threads and 40 threads, even though Runnable thread time is about the same?
Thank you all for your time and help!
Upvotes: 1
Views: 66
Reputation: 48090
why is there such a large difference in CPU usage between 10 threads and 40 threads
Context switches are expensive operations and depending on the number of cores, the function of CPU usage per thread count jumps at some point.
Upvotes: 0