Can someone please explain what the JVM option ReservedCodeCacheSize and InitialCodeCacheSize are? Specifically when/why would I want to change it?
from https://blogs.oracle.com/poonam/entry/why_do_i_get_message:
The following are two known problems in jdk7u4+ with respect to the CodeCache flushing:
- The compiler may not get restarted even after the CodeCache occupancy drops down to almost half after the emergency flushing.
- The emergency flushing may cause high CPU usage by the compiler threads leading to overall performance degradation.
This performance issue, and the problem of the compiler not getting re-enabled again has been addressed in JDK8. To workaround these in JDK7u4+, we can increase the code cache size using ReservedCodeCacheSize option by setting it to a value larger than the compiled-code footprint so that the CodeCache never becomes full. Another solution to this is to disable the CodeCache Flushing using -XX:-UseCodeCacheFlushing JVM option.
The above mentioned issues have been fixed in JDK8 and its updates.
So that information might be worth mentioning for systems running on JDK 6 (having code flushing disabled) and 7.