Isla Vista Heap Sizing: Using Feedback to Avoid Paging
Chris Grzegorczyk, Sunil Soman, Rich Wolski, and Chandra Krintz
in the International Symposium on Code Generation and Optimization (CGO), March, 2007
Paper (pdf)
Abstract
Managed runtime environments (MREs) employ garbage collection (GC) for automatic memory management and safety. However, GC induces pressure on the virtual memory (VM) manager at the operating system level, since it may touch pages that are not related to the working set of the application. Paging due to GC can introduce significant performance overhead, even when the working set of the application fits into physical memory.
In this paper, we present a feedback-directed heap resizing mechanism to avoid GC-induced paging. Our MRE employs information from the operating system (OS) to guide decisions about when to grow and shrink the heap dynamically. By doing so, we avoid costly GCs when there is physical memory available and trade off paging for garbage collection when memory is constrained -- since the cost of many GCs is significantly less than swapping a page of memory to/from disk. Our MRE resizing system is novel in that it is very simple, uses allocation stall events during GC alone to trigger resizing, and requires no user participation or extensive OS modification.
We implement our scheme for paging avoidance in the freely available and popular JikesRVM MRE, and Linux operating system. We describe the design and implementation of the system and evaluate it using a number of common Java benchmarks. Our results indicate that our system significantly improves performance when real memory is restricted and enables similar to, or better performance than, the best-performing JikesRVM GC system when memory is unconstrained.
To get started:
1) Get a fresh copy of jikesrvm-2.4.6
2) Get a copy of ivhs-pre1.tbz2
3) Extract both
4) Change to the jikesrvm-2.4.6 directory and apply the patch using 'patch -p1 < jikesrvm-2.4.6-ivhs-MMTk.patch'
JikesRVM is now ready to go.
5) Change to the directory 'ivhs_feedback' from the ivhs-pre1 tar ball
6) make && sudo make install && sudo modprobe ivhs_feedback
Tips:
* If the module loads nicely there will be a happy report to that effect in dmesg
* There should now be options for jikesrvm such as: -X:gc:mmTrigger{GC|Shrink|Grow}, the first enables IVHS, and the second two are parameters described in the paper.
Problems?/Comments
* If you have problems compiling or using IVHS please email grze@cs.ucsb.edu
* Please note, this version was (back)ported from a working CVS version: tread lightly.
NOTE: you will need the headers OR kernel source for your current kernel, and kallsyms must be enabled (this is standard).
LICENSE: Both the kernel module and the jikesrvm code are released under the GNU General Public License.