Tuning Java’s Memory Manager for High Performance Server Applications Georgios Gousios Vassilios Karakoidas Diomidis Spinellis Department of Management Science and Technology Athens University of Economics and Business Abstract Java is a strong player in the application server market and thus the performance of its virtual machine is an important aspect of a server’s performance. One of the components that affect the performance of a JVM is the memory manager, which also includes the garbage col- lector. Modern virtual machines offer a multitude of options for tuning the memory manager, which can have a significant impact on server application performance. In this paper, we examine the effect of tuning the garbage collection in an application server environment. By employing both synthetic and real world application benchmarks, we assess the various garbage collection strategies offered by two popular virtual machines. Finally, we present a comprehensive list of generally applicable garbage collection guidelines. 1 Introduction Java, and the J2EE platform, has made it to the datacentre. Being a widely deployed platform, it has also attracted the interest of researchers doing work on runtime optimisation and virtual machines. An important component of the Java virtual machine (JVM) is its memory manager. Fol- lowing the secure by default paradigm of the platform, Java does not allow explicit memory al- location and deallocation. Instead, the programmer relies upon the garbage collector to handle the menial tasks of memory management. Automatic memory management is not a novelty of the Java platform though; it existed from the first implementations of the Lisp language. How- ever, it has since been criticised for its performance [14, 21], especially compared to explicit memory management [11, 22, 7, 15]. Modern virtual machines offer a choice of garbage collectors that are specifically targeted to certain types of workloads and allow for fine-tuning garbage collection parameters to match the exact requirements of a specific application. They also offer methods for measuring the effect of garbage collection on program execution. However, the complexity of both the of- fered options and that of the inner workings of garbage collection makes the process of tuning memory management a difficult task. The purpose of this work is to evaluate if and how the tuning of garbage collection can affect the performance of a J 2EE on the two most popular virtual machines. 1