Java SE Tuning Tip: Server Ergonomics on Windows

J2SE 5.0 Server Ergonomics is not on by default on Windows. The basic reasoning here is that Windows is largely a client platform and automatic server tuning may negatively impact startup performance. We are revisiting this for Mustang, but for now do the following to enable server ergonomics on Windows: 1). Specify JVM tuning options equivalent to server ergonomics java -server -Xmx1g -XX:+UseParallelGC 2). Check to make sure server ergonomics is enabled by checking the JVM version: $ java -server -Xmx1g -XX:+UseParallelGC -version java version "1.6.0-rc" Java(TM) 2 Runtime Environment, Standard Edition (build 1.6.0-rc-b69) Java HotSpot(TM) Server VM (build 1.6.0-rc-b69, mixed mode) If you see "Server VM", you're ready to test.
Comments:

That reasoning is reasonable (always) when started from a browser, and when on a non-server version of Windows. When started from a server version of Windows, the reasoning is at least dubious. Just went through the exercise of coding a generic "JavaService" (for work) to load and run an arbitrary Java service. As a developer I do \*NOT\* like coding to APIs that may change in the next release. My understanding of the "-X" options is that they may change. In the JavaService code I resorted to attempting to load "\\jre\\bin\\server\\jvm.dll" first or "\\jre\\bin\\client\\jvm.dll" (relative to the JDK home as deduced from the registry). Both qualify as "hacks" that a) work only for newer versions of Java (not an issue in my case), and b) may change in later versions of Java. I do appreciate the "tip" offered above, but have to note you are offering an API that is \*not\* guaranteed to work later.

Posted by Preston L. Bannister on February 14, 2006 at 06:52 AM EST #

I can't agree with you more and your suggestion of recognizing a server release of Windows is a good one. We are often torn on Windows, a large majority of deployments are on typical client systems where startup and footprint are the primary concern. I do think we (Sun) need to revisit specifying the parallel garbage collectors with -XX. They indeed are not guaranteed to behave the same from release to release but they certainly won't be going away. I'll take your suggestions and see if we can do something about this. Thanks for your comments.

Posted by dagastine on February 14, 2006 at 07:48 AM EST #

Post a Comment:
Comments are closed for this entry.
About

dagastine

Search

Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today