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. 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: Refactoring to Java 8 Lambdas and Streams Workshop
Are you currently using Java 6 or 7 and would like to see how
Java 8 can improve your code base? Are you tired of courses
that teach you a whole bunch of techniques that you cannot
apply in your world? Check out our one day intensive
Refactoring to Java 8 Lambdas and Streams Workshop.
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!
We deliver relevant courses, by top Java developers to produce more resourceful and efficient programmers within their organisations.
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...