Test scenario 4: Virtual CPU scaling and WebSphere threads

This test varies the number of virtual CPUs, and records the number of WebSphere® Application Server threads and CPU time used by these threads.

Figure 1 graphs the CPU time spent as reported from the Linux™ ps -eLf command. The times are reported in whole seconds, which can lead to a high degree of error when using many threads.

Figure 1. Scaling the number of JVMs per guest: CPU time used by WebSphere versus threads
Bar graph for scaling the number of JVMs per guest and number of virtual CPUs. The x-axis consists of four sets of bars, each of which is two bars. The first set represents one virtual CPU with 20 JVMs per guest. The second set represents two virtual CPUs with 20 JVMs per guest. The third set represents three virtual CPUs with 20 JVMs per guest. The fourth set represents 24 virtual CPUs, with 200 JVMs per guest. Each set has two bars. One bar represents the sum CPU time used by WAS threads. The other bar represents the number of used WAS threads. The scale on the y-axis represents time for the first bar of each set, and goes from 00:00 to 09:36 in hours and minutes. For the second bar of each set, there is also a scale on the y-axis that represents the number of threads. This scale goes from 0 to 3000. For the first set of bars, the values are approximately 05:50 and 1200 threads. For the second set of bars, the values are approximately 06:20 and 1450 threads. For the third set of bars, the values are approximately 07:20 and 1700 threads. For the fourth set of bars, the values are approximately 08:30 and 2400 threads.
Observations
The total number of threads used becomes higher as the number of virtual CPUs increases. The number of threads used at 20 guest with three virtual CPUs is 60% higher than with one virtual CPU. The number of threads used at one guest and 24 virtual CPUs is 120% higher. The number of CPU seconds consumed increases also, but more slowly. The scenario with three virtual CPUs consumed 30% more CPU time in total, and the scenario with 24 virtual CPUs consumed 51% more.
Conclusions
There seems to be a correlation between the number of CPUs and the number of threads exspending CPU resources. With more CPUs, more threads are active.

However, the throughput across these points is similar. Part of this increase is probably due to polling.

Be aware that these values for CPU consumption time are correlated with a significant variation attributed to rounding to the nearest whole second for each of approximately 20,000 threads.

Recommendation
Do not assign more virtual CPUs to a WebSphere guest than are required. In the test environment, it was observed that even the load from a single WebSphere server is lower than 1 CPU. Two virtual CPUs for each of the 20 guests provided the best results.