Cold object identification and segregation via application profiling
Taware, Abhijit Shantaram
University of New Brunswick
Managed runtimes like the Java Virtual Machine (JVM) provide automatic memory management, i.e., garbage collection, to remove the burden of explicitly freeing allocated memory from the programmer. Garbage collectors (GC) periodically walk the heap and free unused memory. Some of the surviving objects are infrequently accessed. However, the JVM has to account for these objects during each GC cycle, which is clearly an unnecessary overhead. Such objects can be categorized as cold and moved to a dedicated memory area. This segregation gives an opportunity to perform the GC either on hot or cold regions. Typically only hot regions are GCed. This leads to having fewer objects to process during each GC cycle and hence exhibit better performance. Furthermore, cold objects can be stored in cheaper and larger capacity memory, like NVRam, leaving more main memory for the hot objects of the application. Identification of such objects is a particularly difficult task. As a part of this thesis, application profiling is explored to identify cold classes. Various object properties are evaluated and alternate methods are studied to overcome the limitations with application profiling. The experimental results show 4% average runtime gain with applications showing predictable behavior and object access patterns. Memory intensive applications like in-memory database showed better object segregation. A very primitive technique of operating system supported memory protection was used to further assist cold object identification. A better alternative to memory protection will offer significant gains.