Better JVM in linux : Swapiness
Recently I found interesting issue regarding JVM and Linux Swapiness. I was getting java out of memory while compiling my Java application. I have 8GB/Linux, and I was getting Java out of memory while compiling it alone (Without any other memory intensive job), also the overall build time was rediculously high. I googled and tried some tricks on the machine, after that my build time was significantly better and most importantly, I did not get any out of memory from JVM. What I did is that I set the swapiness of the system to 10 from 60. Swapiness is a value between 0 to 100 and it's a parameter to the linux kerner to take decision on how aggressively to take processes out of the RAM to Swap Space in the Hard disk. Swapiness with 0 tells the kernel to avoid using Swap as far as possible, but it does not mean Swap wont be used at all. Swapiness with value 100 tells the kernel to use Swap space aggressively. You can check swapiness of your linux system using the followi...