Hi all, I just thought I'd post to see whether any one had any views about our PermGen space usage. I've noticed that when running TomEE from a recent snapshot, when nothing but the basic openejb webapp is running, our PermGen usage sits at around 37MB. If I deploy our moviefun example (which now features JPA 2, JSF 2, EJBs, Webservices, JMS etc etc) that increased to 140MB - well over the 64MB that the Sun/Oracle JVMs set as a default maximum. The class counts are 5618 and 23496 respectively. I've profiled this with the YourKit Java Profiler (thanks for the free license if you're reading!) and I can't see anything out of the ordinary - it looks like its all down to the number of classes being loaded. I can't spot any obvious duplication or class loader leakage. Heap wise, everything looks ok - usage on this instance was around the 25MB mark.
100 MiB = 102400 KiB, which divided by 17878 extra classes works out at 5.7 KiB per class on average, which sounds reasonable to me, I guess. I've uploaded a list of all the classes that are loaded between TomEE starting and moviefun being fully deployed here: http://people.apache.org/~jgallimore/loaded_classes.txt. One thing that is interesting is the system class loader had 19357 classes loaded, and 17973 classes without instances. Prior to deploying moviefun, the numbers are 3406 classes, and 2181 without instances - anyone know if there's anything significant in those numbers? Does anyone have any thoughts on this? I don't necessarily have any problem with increasing PermGen on my own installations or recommending others do the same, but also feel it would be nice to offer as much as possible without requiring users to allocate more memory. I'd be interested in hearing anyone else's experiences with this. Cheers Jon
