![]() So that information might be worth mentioning for systems running on JDK 6 (having code flushing disabled) and 7. The above mentioned issues have been fixed in JDK8 and its updates. Another solution to this is to disable the CodeCache Flushing using -XX:-UseCodeCacheFlushing JVM option. 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. This performance issue, and the problem of the compiler not getting re-enabled again has been addressed in JDK8. The emergency flushing may cause high CPU usage by the compiler threads leading to overall performance degradation.The compiler may not get restarted even after the CodeCache occupancy drops down to almost half after the emergency flushing.The following are two known problems in jdk7u4+ with respect to the CodeCache flushing: Certainly a great motivation for me to increase the setting!ġ024 MB by default probably was overdoing it, but 48 MB by default seems to be underdoing it. At this point I still had the default which the documentation (and says is 48 MB. From the 'Chart:' drop-down list, select 'Memory Pool "Code Cache"'Īgain, this may take a few moments for the screen to refresh, and then you should see something like:Īs you can see, my code cache is using approx 49 MB.Find the right process ID and attach jconsole to it (this will take a few moments).For completeness, the steps are (Linux VM environment, though I'm sure other environments are similar): 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. ![]() As I didn't write the code I was deploying I didn't have much visibility into the memory footprint it had. I think the default values are quite good balanced because this problems occur on very rare occasions only (in my answers everything I wanted to know from this question, apart from what value to set the parameters to.
0 Comments
Leave a Reply. |