1st run - java heap set to 128m java -verbosegc -XX:+DisableExplicitGC -Xss512k -Xms128m -Xmx128m -XX:NewSize=64m -XX:MaxNewSize=64m -XX:SurvivorRatio=2 -Xconcurrentio -XX:MaxPermSize=64m -native 2nd run - java heap set to 128m java -verbosegc -XX:+DisableExplicitGC -Xss512k -Xms128m -Xmx128m -XX:NewSize=64m -XX:MaxNewSize=64m -XX:SurvivorRatio=2 -Xconcurrentio -XX:MaxPermSize=64m -native 3rd run - java heap set to 256m java -verbosegc -XX:+DisableExplicitGC -Xss512k -Xms256m -Xmx256m -XX:NewSize=128m -XX:MaxNewSize=128m -XX:SurvivorRatio=2 -Xconcurrentio -XX:MaxPermSize=128m -native 4th run - java heap set to 256m perm size changed java -verbosegc -XX:+DisableExplicitGC -Xss512k -Xms256m -Xmx256m -XX:NewSize=128m -XX:MaxNewSize=128m -XX:SurvivorRatio=2 -Xconcurrentio -XX:MaxPermSize=64m -native 5th run - java heap set to 640m java -verbosegc -XX:+DisableExplicitGC -Xss1024k -Xms640m -Xmx640m -XX:NewSize=317m -XX:MaxNewSize=317m -XX:SurvivorRatio=2 -Xconcurrentio -XX:MaxPermSize=128m -native From these test iterations you can see that 128 and 256m java heaps are too small. Partial GC's are OK, Full GCs should be avoided. Sizing the heap to 640m gives the ratio of Partial to Full GC's that we are looking to achieve.Ideally, we would collect more datapoints and run the tests over a longer period of time. So we have:
3.2g is probably too large a value and would allow runaway queries/expands to consume CPU resources. Allowing for a suitable multiple of high water of ~3, the MX_MEMORY_SYSTEM_LIMIT is set to 640m. Because the sample we are running is using a subset of potential operations in the app, a judgement needs to be made with respect to the high water number. If the development system that is being analyzed is only using 1/10 of the potential user load of the production system, a higher multiplier might be more appropriate. |