Posts

Showing posts from March, 2018

Update: Test your available CPU resources in karaf

In the new version coming up with mhus-osgi-tools 1.3.3 the test automatically adjust thread amount. It increase the thread count up to a level no more CPU time can be consumed.

Here an example from my laptop using the autoInfo=true parameter to see how the algorithm is working:

karaf@root()> shityo stress autoInfo=true Used cpu nanoseconds per second ... CPU Time: 0 -> 0 = 0%, Threads: 1 Auto up 1: [2] 998M 997M = 1.996G CPU Time: 0 -> 1996520601 = 100%, Threads: 2 Auto up 2: [3] 995M 999M 997M = 2.992G CPU Time: 1996520601 -> 2992796194 = 33%, Threads: 3 Auto up 3: [4] 998M 998M 998M 998M = 3.994G CPU Time: 2992796194 -> 3994464892 = 25%, Threads: 4 Auto up 4: [5] 998M 998M 998M 998M 998M = 4.992G CPU Time: 3994464892 -> 4992347050 = 19%, Threads: 5 Auto up 5: [6] 998M 998M 999M 999M 997M 998M = 5.991G CPU Time: 4992347050 -> 5991369437 = 16%, Threads: 6 Auto up 6: [7] 997M 994M 998M 997M 997M 997M 996M = 6.979G CPU Time: 5991369437 -> 6979148659 = 14%, Threads: 7 Auto up 7: [8] 99…