Home of The JavaSpecialists' Newsletter

202Distributed Performance Tuning

Posted: 2012-05-28Category: ConcurrencyJava Version: 1.7+Dr. Heinz M. Kabutz

Abstract: 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.

Birthday and Anniversary Special: Since the 30th November 2017 is the 17th anniversary of our newsletter and my birthday is coming up on the 4th December, we are giving away a 30% discount on our new Data Structures for Java 9 Course (Late 2017 Edition). Whether you are a seasoned Java programmer or you just want to get ready for your next job interview, this course will help you. Besides detailed lectures, the course has over 130 questions that will help you discover what you missed.

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



Related Articles

Browse the Newsletter Archive

About the Author


Java Champion, author of the Javaspecialists Newsletter, conference speaking regular... About Heinz

Java Training

We deliver relevant courses, by top Java developers to produce more resourceful and efficient programmers within their organisations.

Java Consulting

Nobody ever wants to call a Java performance consultant, but with first-hand experience repairing and improving commercial Java applications - JavaSpecialists are a good place to start...

Threading Emergency?

If your system is down, we will review it for 15 minutes and give you our findings for just 1 € without any obligation.