Friday, November 23, 2012

Dirty work to speed up WAS Liberty Profile

When Websphere Application Server Liberty Profile, aka WAS Liberty Profile is first launch, I was really get attracted by its light weight Servlet container. After 3 months of using it in my new project, I found following point.
  1. The start up time is fast because of the JSP compiled classes, JAVA compiled classes, and other resources is not loaded inside the container. Since it is nothing inside the container that's why it is fast.
  2. The run-time is very slow because it needs time to load all the resources and compiled classes before the web app is render on browser. If looking at how Tomcat is work, it will load all the resources during the server start up. 
  3. During the clean process, WAS Liberty Profile took less than 0.0001 sec whereas Tomcat took some time (more than 1 sec) to clean. This could be means that WAS Liberty Profile don't store old cache after server has been stop whereas Tomcat still storing it.
  4. Another thing I have spot on WAS Liberty Profile is that once the web app is loaded at first time, the subsequent load time will back to normal. I think this could be means that once it is load, a copy is cached in client site, but not server side.
There are too many assumption made by myself, don't take it serious, all of them are nonsense. Back to the question, there are actually people out there is making some good work to speed up the server. But it is not document in WAS Liberty Profile documentation, do it at my own risk.

Append this code at the end of Servlet.xml file, and then restart the server.

No comments: