Slide 32
Slide 32 text
32
Java Memory Management When Running Virtual
§ Recap
§ So far, we’ve seen that the guest OS memory is a black box to the hypervisor
§ We’ve also seen that the JVM memory is a black box to the OS it’s running on
§ We also saw that the most efficient way of reclaiming memory from the guest is
to use a balloon, which forcibly takes free memory from the guest OS
§ But this ballooning mechanism presumes that the application is going to actually
free memory when it doesn’t need it, so that the balloon can then take it…
§ …Oops!
§ As we’ve seen, Java’s memory management breaks this model entirely
§ Java is LAZY about its memory management
§ It will try to avoid incurring a full GC until the absolute last minute
§ A memory spike that largely fills the heap will leave behind garbage which is then
wasted memory which neither the OS, nor the hypervisor can reclaim
§ With ballooning, the hypervisor has a way of transferring memory pressure into
the OS, but the OS has no way of transferring memory pressure into the JVM