On 14.05.2009 15:29, Chetan Chheda wrote: > We are using -XX:+UseParNewGC option in our Tomcat JVMs with > -XX:ParallelGCThreads=16 on a 6 CPU system. What is the real impact > of having a higher number of GC threads than the number of CPUs? With > the 2 tomcat JVMs running on the box, would you recommend changing it > to 6 for each tomcat?
Nowadays it is more relevant how many cores or even hardware threads your hardware effectively supports. GC threads are only used for GC. So they don't have an influence of the performance of your webapp apart from the times where the GC is running (yes, they use a bit of memory etc. but we are not talking about 100 threads here). Depending on your JVM version and start parameters, it is very likely, that you are only sing parallel (mutli-threaded) GC for the young generation. In most common situations this takes a 2 digit number of milliseconds, so for most applications not really something to worry. If you machine doesn't carry a lot of other load apart from your JVM, then you can try to make efficient use out of the availabel CPU resource during these pauses by setting the GC thread number to something like the number of available parallelity in hardware (e.g. cores). The defaults are not tha bad, except for huge machines, were you should think about lowering from the default. In your case you could go with the default or set the number to 6 (assuming 6 cores). Using to many GC threads will be bad because it will increase GC pauses instead of decreasing them. The number is more important if you are using a huge heap (several gigabytes) and a recent JVM version, so that you can collect the tenured/old generation with multiple threads in parallel. Regards, Rainer --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org