yichao firstname, zeaster nickname, zhang lastname

Tuning Performance in Weblogic on Solaris Sparc Box

Recently I worked on a j2ee project based on jsf, weblogic on solaris sparc box.
Developing on a windows box, it works fine. However when I deploy it onto the solaris 9, sparc box, the performance decline much.
the profiler shows that

1 invocation weblogic.servlet.internal.ServletStubImpl.getServlet() calls
1 invocation weblogic.servlet.internal.ServletStubImpl.checkForReload() calls
1 invocation weblogic.servlet.internal.ServletStubImpl.needToReload () calls
1 invocation weblogic.utils.classloaders.ChangeAwareClassLoader.upToDate() calls
2546 invocations weblogic.utils.classloaders.MultiClassFinder.getClassSource() calls
2546 invocations weblogic.utils.classloaders.MultiClassFinder.getSource () calls
2546 invocations weblogic.utils.classloaders.MultiClassFinder.getSource()

so about 70-80% of time is used by getServlet() calls. but on windows box, there is no such wired thing.
I found differences between windows and Solaris edition of ServletStubImpl.java decompiled from weblogic.jar.
Who knows why? but I have no time to inspect it.
From the source code, I know it checks whether the servlets are needed to reload and get the answer "yes", so it reloads thousands of servlets.
But it is running in production mode, weblogic should not check that. Maybe a bug?
The light throwed. I found another way to make weblogic never reload servlet files by searching Dev2Dev articles.
An excellent article http://dev2dev.bea.com/pub/a/2005/01/jsp_reloaded.html

Just set the value of
servlet-reload-check-secs to -1!

<!DOCTYPE weblogic-web-app PUBLIC "-//BEA Systems, Inc.//DTD Web Application 8.1//EN"
"http://www.bea.com/servers/wls810/dtd/weblogic810-web-jar.dtd">

<weblogic-web-app>
<container-descriptor>
<servlet-reload-check-secs>-1</servlet-reload-check-secs>
</container-descriptor>
</weblogic-web-app>

And the article also describes how to make weblogic never recompile jsp and some other interesting things.

No comments: