runtime JVM options
Victor Cheung
VictorC at ganz.com
Thu Dec 11 16:20:19 PST 2008
Hi Peter,
That's a good point. If I use -Xloggc:mylog.txt will all the other GC related options go into mylog.txt? These are my other options:
-XX:+HeapDumpOnOutOfMemoryError -XX:+PrintGCDetails -XX:+PrintGCTimeStamps -XX:+PrintGCDateStamps -XX:+PrintTenuringDistribution -XX:+PrintHeapAtGC -XX:+PrintGCApplicationConcurrentTime -XX:+PrintGCApplicationStoppedTime
I'm not sure what I'm seeing in mylog.txt corresponds to which GC option.
This is a sample from mylog.txt:
Total time for which application threads were stopped: 0.0000723 seconds
Application time: 0.0000304 seconds
Total time for which application threads were stopped: 0.0000301 seconds
Application time: 0.0146026 seconds
Total time for which application threads were stopped: 0.0000665 seconds
Application time: 0.0023067 seconds
Total time for which application threads were stopped: 0.0000836 seconds
Application time: 0.0000469 seconds
Total time for which application threads were stopped: 0.0000361 seconds
Application time: 0.0000112 seconds
Total time for which application threads were stopped: 0.0000332 seconds
Application time: 0.3270320 seconds
{Heap before GC invocations=6 (full 1):
PSYoungGen total 12736K, used 10944K [0x30750000, 0x31580000, 0x34030000)
eden space 10944K, 100% used [0x30750000,0x31200000,0x31200000)
from space 1792K, 0% used [0x313c0000,0x313c0000,0x31580000)
to space 1792K, 0% used [0x31200000,0x31200000,0x313c0000)
PSOldGen total 116544K, used 3672K [0x14030000, 0x1b200000, 0x30750000)
object space 116544K, 3% used [0x14030000,0x143c63d0,0x1b200000)
PSPermGen total 20992K, used 11951K [0x10030000, 0x114b0000, 0x14030000)
object space 20992K, 56% used [0x10030000,0x10bdbe88,0x114b0000)
2008-12-11T16:21:28.306-0500: 6.465: [GC
Desired survivor size 1835008 bytes, new threshold 7 (max 15)
[PSYoungGen: 10944K->1744K(12736K)] 14616K->5417K(129280K), 0.0039334 secs] [Times: user=0.00 sys=0.00, real=0.00 secs]
Heap after GC invocations=6 (full 1):
PSYoungGen total 12736K, used 1744K [0x30750000, 0x31580000, 0x34030000)
eden space 10944K, 0% used [0x30750000,0x30750000,0x31200000)
from space 1792K, 97% used [0x31200000,0x313b41c0,0x313c0000)
to space 1792K, 0% used [0x313c0000,0x313c0000,0x31580000)
PSOldGen total 116544K, used 3672K [0x14030000, 0x1b200000, 0x30750000)
object space 116544K, 3% used [0x14030000,0x143c63d0,0x1b200000)
PSPermGen total 20992K, used 11951K [0x10030000, 0x114b0000, 0x14030000)
object space 20992K, 56% used [0x10030000,0x10bdbe88,0x114b0000)
}
Total time for which application threads were stopped: 0.0042340 seconds
Application time: 0.0000612 seconds
Total time for which application threads were stopped: 0.0001024 seconds
Application time: 0.0000317 seconds
Total time for which application threads were stopped: 0.0002141 seconds
Application time: 0.0000252 seconds
Total time for which application threads were stopped: 0.0002127 seconds
Application time: 0.0000205 secon
>From the above output, how can I determine which collector is being used for each generation? I noticed JConsole says "PS MarkSweep" and "PS Scavenge". Is MarkSweep = CMS collector? What about Scavenge?
I'm trying to correlate the JConsole output with the -Xloggc output...
victor
-----Original Message-----
From: Peter.Kessler at Sun.COM [mailto:Peter.Kessler at Sun.COM]
Sent: Thursday, December 11, 2008 6:00 PM
To: Victor Cheung
Cc: hotspot-gc-use at openjdk.java.net
Subject: Re: runtime JVM options
With apologies for replying publicly:
Can you use "ssh -X" at all? If so, even 6u5 has jconsole, and I think even has all the JMX stuff set up to allow connections. If you are poking at a live production server, though, be aware that you can do things in jconsole that will cause the server to pause, on the order of full collection times. For example: pushing the "Perform GC" button. Oh, and you can use jconsole to manage some of the options, e.g., to turn on -XX:+PrintGCDetails. I don't know how your system admins would like it if you started the JVM spewing GC logs to their stdout. (And more importantly, I don't know how you'd read that stream if they aren't saving it to a file you can read.)
... peter
Victor Cheung wrote:
> Hi Peter,
>
> I wish I could. Our staging and production version is only 6u5... no jvisualvm. I tried it locally on my own machine and it's a phenomenal tool to say the least.
>
> Victor
>
>
> -----Original Message-----
> From: Peter.Kessler at Sun.COM [mailto:Peter.Kessler at Sun.COM]
> Sent: Thursday, December 11, 2008 4:42 PM
> To: Victor Cheung
> Cc: Jon.Masamitsu at Sun.COM; hotspot-gc-use at openjdk.java.net
> Subject: Re: runtime JVM options
>
> Can you use "ssh -X" to your server, and use that to send the jvisualvm window back to your machine (which would have to have an X server)?
>
> ... peter
>
> Victor Cheung wrote:
>> Hihi,
>>
>> Unfortunately I only have read-only ssh access to the unix environment where the server is running. I can't create or edit any files. And enabling a JMX port for remote connections is not an option for me.
>>
>> Are there other ways for me to get this information?
>>
>> victor
>>
>> -----Original Message-----
>> From: Jon.Masamitsu at Sun.COM [mailto:Jon.Masamitsu at Sun.COM]
>> Sent: Thursday, December 11, 2008 12:18 PM
>> To: Victor Cheung
>> Cc: hotspot-gc-use at openjdk.java.net
>> Subject: Re: runtime JVM options
>>
>> I think jconsole will give you the JVM
>> command line under the "VM Summary" tab.
>>
>> On 12/11/08 08:48, Victor Cheung wrote:
>>> Hihi all,
>>>
>>>
>>>
>>> I cannot seem to find the answer to this. How can we get a list of
>>> **all** the options and values that a running JVM is using?
>>>
>>>
>>>
>>> victor
>>>
>>>
>>> ------------------------------------------------------------------------
>>>
>>> _______________________________________________
>>> hotspot-gc-use mailing list
>>> hotspot-gc-use at openjdk.java.net
>>> http://mail.openjdk.java.net/mailman/listinfo/hotspot-gc-use
>> _______________________________________________
>> hotspot-gc-use mailing list
>> hotspot-gc-use at openjdk.java.net
>> http://mail.openjdk.java.net/mailman/listinfo/hotspot-gc-use
>
More information about the hotspot-gc-use
mailing list