Method for determining a close approximate benefit of reducing memory footprint of a Java application
View Patent ↗Changes in performance in a Java program are deduced from information related to garbage collection events of the program. Assumptions are made about the system, the application and garbage collection, and changes in performance that will result from modifying the program are deduced.
1. A computer-implemented method of improving performance in a Java computer application program executable by a Java virtual machine (JVM), comprising the steps of:
obtaining information associated with garbage collection; and
deducing changes in performance that will result from modifying the Java computer application program;
wherein a cost of garbage collection to program performance of a modified version of the Java computer application program is estimated by the computer-implemented method using a duration of an average garbage collection event and a frequency of occurrence of particular garbage collection events;
wherein the duration depends on an amount of garbage that must be cleaned up; an algorithm used to do collecting or copying; a heap compaction; a cost of reconciling object references that are moved; and a number of Java-based finalizers that must be executed;
wherein the frequency depends on a rate of object creation; heap fragmentation; size of the heap; and a garbage collection policy;
wherein the Java computer application program is changed by reducing memory from a footprint of the Java computer application program, wherein given an amount of memory to be reduced from the footprint (m), a total duration for a run (d), and how much of the run is spent in garbage collection (g), a number of additional transactions that can be computed during the run is determined according to:
y =function ( m,t,g,d,f ), where
t is current computed throughput of the Java computer application program in transactions/second,
f is average memory footprint of the Java computer application program during duration d, and
y is the number of additional transactions gained as a result of reducing the memory footprint of the Java computer application program to (f−m) during the total duration d.
2. The method of claim 1 , wherein the information associated with garbage collection is obtained from a verbosegc.