A method to assist a software developer in optimizing performance of a
Java virtual machine (Jvm) is disclosed. The method includes creating a
model to predict future usage of heap memory by the Jvm. In response to
the time series analysis model having an upward trend of heap memory
usage, advising the developer to review a heap dump to determine if a
possible memory leak exists. In response to the time series analysis
model having a horizontal asymptote at a predicted future time, advising
the developer to specify the maximum limit of heap memory as a function
of the horizontal asymptote. In response to a heap exhaustion error,
which indicates a requested usage of heap memory by the Jvm greater than
a maximum limit of heap memory, determining a likely cause of the heap
exhaustion error, and advising the developer to take appropriate actions
to optimize the Jvm performance.