Tuesday, June 14, 2011

Carbon 3.2.0 - One checkout One build in 3-4 hours


Recently I had a memory upgrade to my office laptop. So I felt to build very recently released WSO2 Carbon 3.2.0 branch and compare the build time while watching a movie :). Previously it took around 8-9 hours to build the complete carbon product stack which consist of around 4941kSLOC. But now it takes around 3-4 hours. During the build, I managed to keep the swap usage in a minimum level (maximum up-to 10MB) by configuring the JVM options such that Build system utilizes the maximum physical memory while underneath OS has enough physical memory left for its tasks. Normally in Ubuntu 10.04 (Kernel Linux 2.6.32-24-generic), from the moment physical memory is fully utilized, the swap space starts to increase continuously even though there's available physical memory after sometime. So swap usage doesn't decrease for a long time. So if the JVM options are not set properly overall performance get decreased drastically. Seems tuning JVM based on available physical memory can preserve a lot of CPU time.

No comments: