Setting the heap size on your JVM
Cameron has posted a comment on my Performance Tuning MySQL article. The reason I'm highlighting this because it's something I wasn't are of:
From the article:
-Xms128m -Xmx256m
The Sun JVM will run significantly faster with the following config instead:
-Xms256m -Xmx256m
That's because the Sun implementation acquires and releases memory from / to the OS way too aggresively if the "ms != mx". Furthermore, either your server has the 256MB available or it doesn't. If you don't have it available, don't set the max that high. If you do have it available, you gain nothing from setting the min lower. This isn't a desktop system, it's a server -- make sure you have the necessary resources and if you do then use them!
Time to change all my heap size setting since I've been using the first setting (128/256) for quite some time. Thanks Cameron! The real question is: will changing "-Xms256m -Xmx512m" to "-Xms512m -Xmx512m" speed up my slow-ass PowerBook? ;-)



