The Java Specialists' Newsletter
Java version: Java 7
Distributed Performance Tuningby Dr. Heinz M. KabutzAbstract:
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.
Please see our new "Extreme Java" course, combining
concurrency, a little bit of performance and Java 8.
Extreme Java - Concurrency & Performance for Java 8.
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.
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!
Related Java Course