Friday, November 25, 2011
Wednesday, November 23, 2011
Coming back to my previous post "Beware of your GC": just yesterday Daniel Mikusa from VMware published his post "Performance Tuning the JVM for Running Apache Tomcat" which adds some more interesting information complementing my post. You could find "Selecting a Collector" section specifically interesting e.g.:
When you specify the option to run the concurrent collector, it is important to realize that garbage collection will happen concurrently with the application. This means that garbage collection will consume some of the processor resources that would have otherwise been available to the application. On systems with a large number of processors, this is typically not a problem. However, if your system has only one or two processors then you will likely want to enable the -XX:+CMSIncrementalMode option. This option enables incremental mode for the collector, which instructs the collector to periodically yield the processor back to the application and essentially prevents the collector from running for too long.
Friday, November 18, 2011
When you're learning Java and later developing your applications you usually tend to not to worry about the memory management - we have garbage collector after all, so what's to worry about. Surprisingly you should worry about memory in your Java applications as it's not that difficult to introduce memory leak after all.