Steen, The best settings are dependant on many things, not least of which is the the version and vendor of the Java VM. Improving the efficiency of garbage collection has been and remains one of the major activities of VM vendors such as Sun, IBM and BEA, particularly in respect of server environments. Each VM had different options, uses different strategies and responds differently to the options.
It would be informative to benchmark James with a variety of VMs and options. Which VM are you using? As a general rule, -Xm should be set no larger than the heap size required to avoid out of memory conditions. Anything larger will simply delay garbage collection and the time taken to run the garbage collection will be greatly increased. In other words, performance will be degraded. Most VMs stop all threads when running a GC, though some recent ones do achieve some parallelism, but NOT if GC is explicitly invoked. Therefore, large GCs can cause time-sensitive applications, such as James, to start seeing time-outs of sockets, etc. http://java.sun.com/docs/hotspot/PerformanceFAQ.html contains a number of useful hints and tips which you may wish to consider. If you are using a HotSpot VM, specifying -server will give better performance for an application such as James. > Another thing I've done is force James to run the > Garbage Collector more often. I'm using the new > FetchMail feature, and every second minute a fetchTask > is run. In this fetchTask I've added a call to > System.gc() to force the Garbage Collector to run. See http://java.sun.com/docs/hotspot/PerformanceFAQ.html#15 that says, never force GC. Get the environment right and VM managed GC will always do a better job. You might like to browse http://www.javaperformancetuning.com/ which contains much information and many useful links. Cheers, Steve --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
