|
From: Leif M. <le...@ta...> - 2006-09-20 23:26:14
|
Shann, prashant n wrote: > i am able to run all my java classes and jboss app server through > service wrapper. I have a server with 2 GB RAM and 2 cpus. I would > like to use the JVM tuning options like -Xss256k, -XX:+UseParallelGC, > -XX:ParallelGCThreads=20 and -XX:+AggressiveOpts. How should i specify > these in my conf file ? > > is this the right way of doing this jvm optimization ? > > wrapper.java.additional.5=-Xss256k > wrapper.java.additional.6=-XX:+UseParallelGC > wrapper.java.additional.7=-XX:ParallelGCThreads=20 > wrapper.java.additional.8=-XX:+AggressiveOpts This looks correct assuming the 1-4 properties also are defined. Have you tried this? > If my init & max meomries are set 1024 MB then how much total memory > is cosumed by the system along with the service wrapper ? It depends on the JVM version, but the java portion of the wrapper is very light weight. and only takes a little over the standalone JVM. The Wrapper binary process a couple MB. Why do you want your init memory so high. From what I have seen that will mainly just slow down the startup of your application. Once the memory is allocated, the JVM will run faster. But that will happen after it has allocated it the first time anyway. You do get the benefit of knowing if there is going to be enough memory right at startup though. Problem is that the JVM will take all of that memory even if it doesn't really need it. It also has the drawback that the garbage collector will wait longer to do Gcs. That may seem good at first, but depending on JVM version, each individual Gc will be longer and cause larger hiccups in your app. Cheers, Leif |