I have a server with large amount of physical memory. What would be the JVM memory allocation for JasperReports server to get best performance on tomcat?
This is a complex issue that there’s no simple answer for a fixed amount of JVM memory to get the best performance for JasperReports Server. In general, a good heap size setting would be a heap that is as large as possible within the available physical memory. The limit on heap space is due to OS own behavior. Various additional constraints such as available swap, kernel address space usage, memory fragmentation, and VM overhead, in practice, can further limit the available memory for JVM to use.
In addition, garbage collection plays a very important role in JVM heap allocation consideration. Java Garbage Collection relies heavily on processor power/utilization. More memory means that Garbage Collection takes longer and works harder at freeing memory. For optimal performance, the general rule is to use a quarter of physical memory on a 64 bit JVM 1.6 version (32 gigabytes, corresponding to a physical memory size of 128 gigabytes - refer to http://www.oracle.com/technetwork/java/javase/6u18-142093.html). Depending on your application processing needs, you could allocate more than that amount, but the optimal setting to balance between speed and volume in peak operating periods would generally fall into that 1/4 range. If there is a requirement for more memory or additional resources, often the best way to provide them is through clustering and load balancing.