JDK-6428776 : The jps and jstat tools should be run with -client
  • Type: Bug
  • Component: core-svc
  • Sub-Component: tools
  • Affected Version: 5.0
  • Priority: P5
  • Status: Closed
  • Resolution: Not an Issue
  • OS: generic
  • CPU: generic
  • Submitted: 2006-05-22
  • Updated: 2023-12-14
  • Resolved: 2016-11-04
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
Other
tbdResolved
Related Reports
Relates :  
Description
On large scale server class systems, the jps and jstat tools
are run with -server and a rather large heap and potentially
many parallel gc threads. This can result in the tools being
more intrusive than necessary which can impact the performance
of the applications running on the system. These tools should
be built to run with -client.

Other tools may have similar issues (jconsole, jhat, jmap, etc)
and should also consider using -client. The jstatd server used
by jps and jstat might also be a candidiate for using -client,
but it actually could take avantage of running in -server when
monitoring a large number of targets.

Comments
SUGGESTED FIX Apply NEVER_ACT_AS_SERVER_CLASS_MACHINE=true to the relevant tool definitions in jdk/make/launchers/Makefile.launcher % diff -u Makefile.launcher.00 Makefile.launcher --- Makefile.launcher.00 Thu Dec 6 12:45:21 2007 +++ Makefile.launcher Mon Jan 14 09:38:31 2008 @@ -130,6 +130,16 @@ endif endif +ifeq ($(PROGRAM),jps) + NEVER_ACT_AS_SERVER_CLASS_MACHINE=true +endif +ifeq ($(PROGRAM),jstat) + NEVER_ACT_AS_SERVER_CLASS_MACHINE=true +endif +ifeq ($(PROGRAM),jstatd) + NEVER_ACT_AS_SERVER_CLASS_MACHINE=true +endif + # jdb only ifeq ($(PROGRAM),jdb) # Override the default APP_CLASSPATH to pick up sa-jdi.jar also.
14-01-2008

EVALUATION I have some serious reservations about whether this is a good idea. It will definitely make testing of these commands more difficult. I'm inclined to close this as "not a bug", but I'm going to check with Sundar first.
28-09-2006

WORK AROUND invoke the tools as follows: jps -J-client <args> jstat -J-client <args>
22-05-2006

SUGGESTED FIX change the build proceedure for these tools such that the default to -client regardless of whether they are running on server class hardware. Note that there are consequences to this decision, namely that we may have both -client and -server runtimes instantiated on the same system resulting in less shared mappings.
22-05-2006