Skip to content

Instantly share code, notes, and snippets.

@rednaxelafx
Created November 14, 2011 03:54
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save rednaxelafx/1363195 to your computer and use it in GitHub Desktop.
jmap -heap output sample. Note that MaxNewSize is in its default value (max_uintx), which means ergo should choose the actual value.
$JAVA_HOME/bin/jmap -heap `pgrep java`
Attaching to process ID 2091, please wait...
Warning: the type "const char*" (declared in the remote VM in VMStructs::localHotSpotVMTypes) had its size declared as 8 twice. Continuing.
Warning: the type "const size_t" (declared in the remote VM in VMStructs::localHotSpotVMTypes) had its size declared as 8 twice. Continuing.
Warning: the type "const int" (declared in the remote VM in VMStructs::localHotSpotVMTypes) had its size declared as 4 twice. Continuing.
Warning: the type "const MemRegion" (declared in the remote VM in VMStructs::localHotSpotVMTypes) had its size declared as 16 twice. Continuing.
Debugger attached successfully.
Server compiler detected.
JVM version is 21.1-b02
using thread-local object allocation.
Parallel GC with 4 thread(s)
Heap Configuration:
MinHeapFreeRatio = 40
MaxHeapFreeRatio = 70
MaxHeapSize = 918552576 (876.0MB)
NewSize = 1310720 (1.25MB)
MaxNewSize = 17592186044415 MB
OldSize = 5439488 (5.1875MB)
NewRatio = 2
SurvivorRatio = 8
PermSize = 21757952 (20.75MB)
MaxPermSize = 85983232 (82.0MB)
Heap Usage:
PS Young Generation
Eden Space:
capacity = 28704768 (27.375MB)
used = 1612880 (1.5381622314453125MB)
free = 27091888 (25.836837768554688MB)
5.618857466466895% used
From Space:
capacity = 2359296 (2.25MB)
used = 2326560 (2.218780517578125MB)
free = 32736 (0.031219482421875MB)
98.61246744791667% used
To Space:
capacity = 2359296 (2.25MB)
used = 0 (0.0MB)
free = 2359296 (2.25MB)
0.0% used
PS Old Generation
capacity = 38273024 (36.5MB)
used = 8778296 (8.371635437011719MB)
free = 29494728 (28.12836456298828MB)
22.935987498662243% used
PS Perm Generation
capacity = 21757952 (20.75MB)
used = 13077368 (12.471549987792969MB)
free = 8680584 (8.278450012207031MB)
60.10385536285768% used
$ jmap -heap `pgrep java`
Attaching to process ID 402, please wait...
Debugger attached successfully.
Server compiler detected.
JVM version is 20.0-b11-internal
using thread-local object allocation.
Parallel GC with 4 thread(s)
Heap Configuration:
MinHeapFreeRatio = 40
MaxHeapFreeRatio = 70
MaxHeapSize = 918552576 (876.0MB)
NewSize = 1310720 (1.25MB)
MaxNewSize = 17592186044415 MB
OldSize = 5439488 (5.1875MB)
NewRatio = 2
SurvivorRatio = 8
PermSize = 21757952 (20.75MB)
MaxPermSize = 85983232 (82.0MB)
Heap Usage:
PS Young Generation
Eden Space:
capacity = 28704768 (27.375MB)
used = 17501552 (16.690780639648438MB)
free = 11203216 (10.684219360351562MB)
60.97088818136415% used
From Space:
capacity = 2359296 (2.25MB)
used = 2326560 (2.218780517578125MB)
free = 32736 (0.031219482421875MB)
98.61246744791667% used
To Space:
capacity = 2359296 (2.25MB)
used = 0 (0.0MB)
free = 2359296 (2.25MB)
0.0% used
PS Old Generation
capacity = 38273024 (36.5MB)
used = 2392256 (2.28143310546875MB)
free = 35880768 (34.21856689453125MB)
6.250501658818493% used
PS Perm Generation
capacity = 21757952 (20.75MB)
used = 14384992 (13.718597412109375MB)
free = 7372960 (7.031402587890625MB)
66.113722467997% used
$ ~/jdk/6u24_x64/bin/jmap -heap `pgrep java`
Attaching to process ID 1777, please wait...
Debugger attached successfully.
Server compiler detected.
JVM version is 19.1-b02
using thread-local object allocation.
Parallel GC with 4 thread(s)
Heap Configuration:
MinHeapFreeRatio = 40
MaxHeapFreeRatio = 70
MaxHeapSize = 918552576 (876.0MB)
NewSize = 1310720 (1.25MB)
MaxNewSize = 17592186044415 MB
OldSize = 5439488 (5.1875MB)
NewRatio = 2
SurvivorRatio = 8
PermSize = 21757952 (20.75MB)
MaxPermSize = 85983232 (82.0MB)
Heap Usage:
PS Young Generation
Eden Space:
capacity = 14352384 (13.6875MB)
used = 790400 (0.7537841796875MB)
free = 13561984 (12.9337158203125MB)
5.507099029680365% used
From Space:
capacity = 2359296 (2.25MB)
used = 2342944 (2.234405517578125MB)
free = 16352 (0.015594482421875MB)
99.30691189236111% used
To Space:
capacity = 2359296 (2.25MB)
used = 0 (0.0MB)
free = 2359296 (2.25MB)
0.0% used
PS Old Generation
capacity = 38273024 (36.5MB)
used = 5710160 (5.4456329345703125MB)
free = 32562864 (31.054367065429688MB)
14.919542286494007% used
PS Perm Generation
capacity = 21757952 (20.75MB)
used = 14351736 (13.686882019042969MB)
free = 7406216 (7.063117980957031MB)
65.96087720020708% used
$ $JAVA_HOME/bin/jmap -heap `pgrep java`
Attaching to process ID 1969, please wait...
Debugger attached successfully.
Server compiler detected.
JVM version is 20.4-b02
using thread-local object allocation.
Parallel GC with 4 thread(s)
Heap Configuration:
MinHeapFreeRatio = 40
MaxHeapFreeRatio = 70
MaxHeapSize = 918552576 (876.0MB)
NewSize = 1310720 (1.25MB)
MaxNewSize = 17592186044415 MB
OldSize = 5439488 (5.1875MB)
NewRatio = 2
SurvivorRatio = 8
PermSize = 21757952 (20.75MB)
MaxPermSize = 85983232 (82.0MB)
Heap Usage:
PS Young Generation
Eden Space:
capacity = 14352384 (13.6875MB)
used = 1072208 (1.0225372314453125MB)
free = 13280176 (12.664962768554688MB)
7.470591645262557% used
From Space:
capacity = 2359296 (2.25MB)
used = 2359296 (2.25MB)
free = 0 (0.0MB)
100.0% used
To Space:
capacity = 2359296 (2.25MB)
used = 0 (0.0MB)
free = 2359296 (2.25MB)
0.0% used
PS Old Generation
capacity = 38273024 (36.5MB)
used = 5554640 (5.2973175048828125MB)
free = 32718384 (31.202682495117188MB)
14.513198643514555% used
PS Perm Generation
capacity = 21757952 (20.75MB)
used = 14750312 (14.066993713378906MB)
free = 7007640 (6.683006286621094MB)
67.79274078736822% used
$ groovysh
-XX:InitialHeapSize=57344000 -XX:MaxHeapSize=917504000 -XX:ParallelGCThreads=4 -XX:+PrintCommandLineFlags -XX:+UseCompressedOops -XX:+UseParallelGC
Groovy Shell (1.7.7, JVM: 1.7.0_01)
Type 'help' or '\h' for help.
----------------------------------------------------------------------------------------------------------------------------
groovy:000>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment