Can someone please explain what the JVM option ReservedCodeCacheSize
and InitialCodeCacheSize
are? Specifically when/why would I want to change it?
@jeha answers everything I wanted to know from this question, apart from what value to set the parameters to. As I didn't write the code I was deploying I didn't have much visibility into the memory footprint it had.
However, you can use jconsole to attach to your running java process, and then use the 'Memory' tab to find out the Code Cache size. For completeness, the steps are (Linux VM environment, though I'm sure other environments are similar):
Again, this may take a few moments for the screen to refresh, and then you should see something like:
As you can see, my code cache is using approx 49 MB. At this point I still had the default which the documentation (and @jeha) says is 48 MB. Certainly a great motivation for me to increase the setting!
Ben.
1024 MB by default probably was overdoing it, but 48 MB by default seems to be underdoing it...