Sunday, 11 December 2011

Understanding the JVM, concurrency and GC

A great collection of links and presentations on Java Virtual Machine and why understanding how it works is critical.

First, let's start with HotSpot, the default JVM. This is a mandatory intro into the responsibilities of the VM. Next, learning about the some of the most common optimizations that the JIT compiler has available, HotSpot FAQs, and method inlining

Now we are going to go down one abstraction layer, and jump into the hardware. A great presentation by Jevgeni Kabanov, by far the simplest to undestand: Do you really get Memory? I find this presentation a must see before jumping into the more hardcore versions that follow. In this talk, Jevgeni presents a simplified Java CPU model, showing the CPU, Memory, and more fundamentally, Caches.

Armed with this knowledge, we are then ready to take on the mammoth paper "What every programmer should know about memory by Ulrich Drepper. This is very low level at times, so worth watching Cliff Click's presentation: A Crash Course on Modern Hardware, which summarises it nicely.

Interesting article also on Memory Barriers and obviously, it wouldn't be complete without Doug Lea's concurrency in Java presentation. Always a good read, although really extensive, the Java Language Specification, Third Edition

Finally, I have reserved it for the last, Gil Tene's excellent Understanding Java Garbage Collection. Brings in lots of points that i didn't know about in my previous post The Art of GC Tuning. In particular, I really enjoyed the discussion around Application Memory Wall, and how our applications seem to range between 1-4 GBs, but rarely take advantage of increasing hardware power, and what are the main problems behind it. He shows how the Azul Zing VM can easily cope with 1/2 TB VMs without pausing.

That's quite a lot for now!

No comments:

Post a Comment