Java Specialists' Java Training Europehome of the java specialists' newsletter

The Java Specialists' Newsletter
Issue 2022012-05-28 Category: Concurrency Java version: Java 7

GitHub Subscribe Free RSS Feed

Distributed Performance Tuning

by Dr. Heinz M. Kabutz
In this newsletter, it is up to you to figure out how we improved the performance of our previous Fibonacci newsletter by 25%.

Welcome to the 202nd issue of The Java(tm) Specialists' Newsletter sent to you en route to Lausanne in Switzerland to visit one of my favourite customers. We had a fantastic time last week with Kirk and his students on the Island of Crete. We ended up with some delicious Cretan lamb on the spit, as we usually do.

NEW: We have revised our "Advanced Topics" course, covering Reflection, Java NIO, Data Structures, Memory Management and several other useful topics for Java experts to master. 2 days of extreme fun and learning. Extreme Java - Advanced Topics.

Distributed Performance Tuning

After I sent the last newsletter about the Fibonacci calculation with fork/join, I produced a graph of what the CPU looked like on my 8-core server. The graph is of the user time; the system time is negligible. The y-axis is percentage CPU on my 8-core system. The x-axis is the time. This particular run completed in 31.5 minutes.

My question to you is: "At the half-way point, the CPUs drops down to an average of about 60% utilization. What can we do to keep the CPUs busy?"

Whilst the system was 60% utilized, I did a stack dump. Click here to download the vmstat output, with the stack dump near the end.

Now it is over to you. You need to come up with an explanation of what is keeping the CPUs from being busy and then give us a solution of how to fix it. Hint: I wrote about this behaviour in one of my newsletters, about 7 months before I moved from South Africa to Greece.

There is one more output that you may request. I won't tell you what it is, but if you ask for it specifically I will send you a link to where you can download it. You need this other piece of the puzzle to come up with a good solution.

I showed this exercise to Kirk's performance tuning class last week and we solved it together in about 10 minutes. This one change got the time down from 31.5 minutes to 23.63, representing a noticeable 25% improvement. That is impressive for a single change!

Kind regards


Concurrency Articles Related Java Course

Extreme Java - Concurrency and Performance for Java 8
Extreme Java - Advanced Topics for Java 8
Design Patterns
In-House Courses

© 2010-2016 Heinz Kabutz - All Rights Reserved Sitemap
Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their respective owners. is not connected to Oracle, Inc. and is not sponsored by Oracle, Inc.