06-02-2011, 11:50 AM
(06-01-2011, 10:34 PM)BinarySlave Wrote:From the documentation I found (http://java.dzone.com/articles/java-perf...g?page=0,1), the code cache is not stored into the permanent generation space: the PERM space is managed by the GC and contains mainly the java classes. Because Jpcsp is generating a lot of Java classes generated on the fly (compiler), the PERM space has to be large enough the contains all the java classes. But this does not include the JIT code cache.(06-01-2011, 08:54 PM)gid15 Wrote: Is the code cache being allocated inside the permanent generation area (in which case MaxPermSize should be larger than ReservedCodeCacheSize)? or it is allocated additionally (in which case both sizes are independent of each other). I was not able to find clear information about this. Could you point some info on that?Unfortunately I mostly have my information from 1 other person and pure testing only. Yes, I have my problems with the official java-documentation myself (ever had).
Thanks!
But as I understand the workings behind both parameters now (through documentation, asking someone and a little testing), MaxPermSize does indeed include ReservedCodeCacheSize. From a simple logical point of view it has to, because the codecache is permanent and can't overrule the MaxPermSize.
The memory reserved by direct buffers (nio) is also not included into the PERM space, it has again its own space (native heap: -XX:MaxDirectMemorySize=xxxM). Jpcsp is also using a lot of direct buffers for the vertex cache.
Jpcsp cannot be directly compared to classic Java applications as it is heavily using dynamically generated classes and direct buffers.
Code:
-XX:MaxPermSize=64m -XX:ReservedCodeCacheSize=64m