Monday, June 2, 2008

JBoss Seam and the 32 bit Vs 64 bit saga

Choosing a Java Virtual Machine to deploy our application proved a tough task . Our development environment is primarily a mix of Linux desktops (Fedora 5, CentOS, Ubuntu ).

We started with JBoss Seam 1.2.GA and initially chose Sun's JDK 1.5 on a 32 bit Operating Systems . This turned out to be a disaster during development as our our already long "Compile Deploy Test" cycle took even longer. We hit the dreaded PermGen Space problem (JBOSS Seam Mailing List)very often. We switched to JRockit 1.5 32 bit version and found that it did not solve the problem completely . The time between PermGen Exceptions increased from every 2nd deploy to every 5th deploy.

On a hunch we moved the Operating System from 32 bit to 64 bit and also moved the JVM from 32 bit to 64 bit . That combination of OS and JVM solved the PermGen Space problem completely. We tried running the 64 bit Sun JVM and found that it still had the Class Loader problem.

Moving to a 64 bit Operating Systems had its own share of problems . The primary one being non availability of Flash plugin for the 64 bit browser on the CentOS. The developers were reluctant to move since that stopped them from wathcing YouTube movies :-) . Also circa 2007 not many libraries were available for 64 bit Linux compared to the 32 bit . I think that situation has improved a lot in the current years particularly with the Ubuntu Operating System. There is a flash plugin which can be installed with apt-get . Also the CentOS versions had a work around which allows the 32 bit flash plugin to be installed on the 64 bit machines

Another issue that we faced (from a System Administration point of view) was that we could not run a 64 bit OS on the laptops. The Dell laptop 6400 that I had ( circa 2006) did not support running 64 bit Operating System and I had to settle running for a 32 bit version on the laptop and a 64 bit version on the desktop. This meant I had to maintain 2 local copies of the repository since otherwise a disconnect from the Internet meant no possible updates

One of the advantages of moving to the 64 bit Operating System meant that we could take advantage of more memory. Take a look at the 3GB memory barrier for a description of why 32 bit OS cannot use the 4GB memory completely.


No comments: