Created
November 7, 2011 05:40
-
-
Save rednaxelafx/1344251 to your computer and use it in GitHub Desktop.
-XX:+DisableExplicitGC, -XX:+ExplicitGCInvokesConcurrentAndUnloadsClasses and NIO direct memory OOM, on Oracle JDK 6u29
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ java -XX:MaxDirectMemorySize=10m -XX:+PrintGCDetails -XX:+UseConcMarkSweepGC DisableExplicitGCDemo | |
VM option 'MaxDirectMemorySize=10m' | |
VM option '+PrintGCDetails' | |
VM option '+UseConcMarkSweepGC' | |
[Full GC (System) [CMS: 0K->10363K(63872K), 0.1021430 secs] 10579K->10363K(83008K), [CMS Perm : 2599K->2599K(21248K)], 0.1024130 secs] [Times: user=0.08 sys=0.02, real=0.11 secs] | |
[Full GC (System) [CMS: 10363K->10363K(63872K), 0.0917950 secs] 21205K->10363K(83008K), [CMS Perm : 2606K->2606K(21248K)], 0.0919150 secs] [Times: user=0.09 sys=0.00, real=0.10 secs] | |
[Full GC (System) [CMS: 10363K->10363K(63872K), 0.0899250 secs] 20676K->10363K(83008K), [CMS Perm : 2606K->2606K(21248K)], 0.0900240 secs] [Times: user=0.09 sys=0.00, real=0.09 secs] | |
[Full GC (System) [CMS: 10363K->10363K(63872K), 0.0897390 secs] 20880K->10363K(83008K), [CMS Perm : 2606K->2606K(21248K)], 0.0899360 secs] [Times: user=0.09 sys=0.00, real=0.10 secs] | |
[Full GC (System) [CMS: 10363K->10363K(63872K), 0.0893480 secs] 20680K->10363K(83008K), [CMS Perm : 2606K->2606K(21248K)], 0.0895060 secs] [Times: user=0.08 sys=0.00, real=0.09 secs] | |
[Full GC (System) [CMS: 10363K->10363K(63872K), 0.0896920 secs] 20763K->10363K(83008K), [CMS Perm : 2606K->2606K(21248K)], 0.0898880 secs] [Times: user=0.09 sys=0.00, real=0.09 secs] | |
[Full GC (System) [CMS: 10363K->10363K(63872K), 0.0923020 secs] 20817K->10363K(83008K), [CMS Perm : 2606K->2606K(21248K)], 0.0924120 secs] [Times: user=0.09 sys=0.00, real=0.09 secs] | |
[Full GC (System) [CMS: 10363K->10363K(63872K), 0.0897760 secs] 20852K->10363K(83008K), [CMS Perm : 2606K->2606K(21248K)], 0.0899290 secs] [Times: user=0.08 sys=0.01, real=0.08 secs] | |
[Full GC (System) [CMS: 10363K->10363K(63872K), 0.0906740 secs] 20875K->10363K(83008K), [CMS Perm : 2606K->2606K(21248K)], 0.0907880 secs] [Times: user=0.08 sys=0.00, real=0.09 secs] | |
[Full GC (System) [CMS: 10363K->10363K(63872K), 0.1135860 secs] 20890K->10363K(83008K), [CMS Perm : 2606K->2606K(21248K)], 0.1137280 secs] [Times: user=0.12 sys=0.00, real=0.11 secs] | |
[Full GC (System) [CMS: 10363K->10363K(63872K), 0.0876680 secs] 20900K->10363K(83008K), [CMS Perm : 2606K->2606K(21248K)], 0.0877790 secs] [Times: user=0.08 sys=0.00, real=0.09 secs] | |
[Full GC (System) [CMS: 10363K->10363K(63872K), 0.0894200 secs] 20906K->10363K(83008K), [CMS Perm : 2606K->2606K(21248K)], 0.0895200 secs] [Times: user=0.08 sys=0.00, real=0.09 secs] | |
Done | |
Heap | |
par new generation total 19136K, used 2722K [0x00000000f3000000, 0x00000000f44c0000, 0x00000000f44c0000) | |
eden space 17024K, 15% used [0x00000000f3000000, 0x00000000f32a88b0, 0x00000000f40a0000) | |
from space 2112K, 0% used [0x00000000f40a0000, 0x00000000f40a0000, 0x00000000f42b0000) | |
to space 2112K, 0% used [0x00000000f42b0000, 0x00000000f42b0000, 0x00000000f44c0000) | |
concurrent mark-sweep generation total 63872K, used 10363K [0x00000000f44c0000, 0x00000000f8320000, 0x00000000fae00000) | |
concurrent-mark-sweep perm gen total 21248K, used 2615K [0x00000000fae00000, 0x00000000fc2c0000, 0x0000000100000000) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ java -XX:MaxDirectMemorySize=10m -XX:+PrintGCDetails -XX:+DisableExplicitGC -XX:+UseConcMarkSweepGC DisableExplicitGCDemo | |
VM option 'MaxDirectMemorySize=10m' | |
VM option '+PrintGCDetails' | |
VM option '+DisableExplicitGC' | |
VM option '+UseConcMarkSweepGC' | |
Exception in thread "main" java.lang.OutOfMemoryError: Direct buffer memory | |
at java.nio.Bits.reserveMemory(Bits.java:633) | |
at java.nio.DirectByteBuffer.<init>(DirectByteBuffer.java:98) | |
at java.nio.ByteBuffer.allocateDirect(ByteBuffer.java:288) | |
at DisableExplicitGCDemo.main(DisableExplicitGCDemo.java:6) | |
Heap | |
par new generation total 16768K, used 11069K [0x00000000c4200000, 0x00000000c5430000, 0x00000000d6550000) | |
eden space 14912K, 74% used [0x00000000c4200000, 0x00000000c4ccf428, 0x00000000c5090000) | |
from space 1856K, 0% used [0x00000000c5090000, 0x00000000c5090000, 0x00000000c5260000) | |
to space 1856K, 0% used [0x00000000c5260000, 0x00000000c5260000, 0x00000000c5430000) | |
concurrent mark-sweep generation total 37376K, used 0K [0x00000000d6550000, 0x00000000d89d0000, 0x00000000fae00000) | |
concurrent-mark-sweep perm gen total 21248K, used 2190K [0x00000000fae00000, 0x00000000fc2c0000, 0x0000000100000000) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ java -XX:MaxDirectMemorySize=10m -XX:+PrintGCDetails -XX:+ExplicitGCInvokesConcurrentAndUnloadsClasses -XX:+UseConcMarkSweepGC DisableExplicitGCDemo | |
VM option 'MaxDirectMemorySize=10m' | |
VM option '+PrintGCDetails' | |
VM option '+ExplicitGCInvokesConcurrentAndUnloadsClasses' | |
VM option '+UseConcMarkSweepGC' | |
[GC [ParNew: 10788K->2112K(19136K), 0.1931370 secs] 10788K->10381K(83008K), 0.1972470 secs] [Times: user=0.17 sys=0.03, real=0.20 secs] | |
[GC [1 CMS-initial-mark: 8269K(63872K)] 10381K(83008K), 0.0066670 secs] [Times: user=0.01 sys=0.00, real=0.01 secs] | |
[CMS-concurrent-mark: 0.027/0.027 secs] [Times: user=0.04 sys=0.00, real=0.02 secs] | |
[CMS-concurrent-preclean: 0.003/0.003 secs] [Times: user=0.01 sys=0.00, real=0.01 secs] | |
[GC[YG occupancy: 2112 K (19136 K)][Rescan (parallel) , 0.0037810 secs][weak refs processing, 0.0093690 secs][class unloading, 0.0002380 secs][scrub symbol & string tables, 0.0004540 secs] [1 CMS-remark: 8269K(63872K)] 10381K(83008K), 0.0168260 secs] [Times: user=0.02 sys=0.00, real=0.02 secs] | |
[CMS-concurrent-sweep: 0.011/0.011 secs] [Times: user=0.02 sys=0.00, real=0.01 secs] | |
[CMS-concurrent-reset: 0.007/0.007 secs] [Times: user=0.01 sys=0.00, real=0.01 secs] | |
[GC [ParNew: 12715K->2112K(19136K), 0.1259510 secs] 20985K->20605K(83008K), 0.1260420 secs] [Times: user=0.18 sys=0.00, real=0.13 secs] | |
[GC [1 CMS-initial-mark: 18493K(63872K)] 20605K(83008K), 0.0069920 secs] [Times: user=0.01 sys=0.00, real=0.01 secs] | |
[CMS-concurrent-mark: 0.021/0.021 secs] [Times: user=0.02 sys=0.00, real=0.02 secs] | |
[CMS-concurrent-preclean: 0.002/0.002 secs] [Times: user=0.00 sys=0.00, real=0.01 secs] | |
[GC[YG occupancy: 2112 K (19136 K)][Rescan (parallel) , 0.0035530 secs][weak refs processing, 0.0070060 secs][class unloading, 0.0002610 secs][scrub symbol & string tables, 0.0004860 secs] [1 CMS-remark: 18493K(63872K)] 20605K(83008K), 0.0153800 secs] [Times: user=0.01 sys=0.00, real=0.01 secs] | |
[CMS-concurrent-sweep: 0.035/0.035 secs] [Times: user=0.06 sys=0.00, real=0.04 secs] | |
[CMS-concurrent-reset: 0.001/0.001 secs] [Times: user=0.00 sys=0.00, real=0.00 secs] | |
[GC [ParNew: 12473K->2112K(19136K), 0.0822220 secs] 20735K->20595K(83008K), 0.0823300 secs] [Times: user=0.13 sys=0.00, real=0.09 secs] | |
[GC [1 CMS-initial-mark: 18483K(63872K)] 20595K(83008K), 0.0066880 secs] [Times: user=0.00 sys=0.00, real=0.00 secs] | |
[CMS-concurrent-mark: 0.020/0.020 secs] [Times: user=0.01 sys=0.00, real=0.02 secs] | |
[CMS-concurrent-preclean: 0.002/0.002 secs] [Times: user=0.00 sys=0.00, real=0.00 secs] | |
[GC[YG occupancy: 2112 K (19136 K)][Rescan (parallel) , 0.0033380 secs][weak refs processing, 0.0080230 secs][class unloading, 0.0002630 secs][scrub symbol & string tables, 0.0004750 secs] [1 CMS-remark: 18483K(63872K)] 20595K(83008K), 0.0160330 secs] [Times: user=0.01 sys=0.00, real=0.02 secs] | |
[CMS-concurrent-sweep: 0.036/0.036 secs] [Times: user=0.05 sys=0.00, real=0.03 secs] | |
[CMS-concurrent-reset: 0.001/0.001 secs] [Times: user=0.00 sys=0.00, real=0.00 secs] | |
[GC [ParNew: 12660K->2112K(19136K), 0.1823210 secs] 20922K->20614K(83008K), 0.1823960 secs] [Times: user=0.47 sys=0.01, real=0.20 secs] | |
[GC [1 CMS-initial-mark: 18502K(63872K)] 20614K(83008K), 0.0063010 secs] [Times: user=0.00 sys=0.00, real=0.00 secs] | |
[CMS-concurrent-mark: 0.027/0.027 secs] [Times: user=0.06 sys=0.00, real=0.02 secs] | |
[CMS-concurrent-preclean: 0.006/0.007 secs] [Times: user=0.01 sys=0.00, real=0.02 secs] | |
[GC[YG occupancy: 2112 K (19136 K)][Rescan (parallel) , 0.0031630 secs][weak refs processing, 0.0074780 secs][class unloading, 0.0002650 secs][scrub symbol & string tables, 0.0004550 secs] [1 CMS-remark: 18502K(63872K)] 20614K(83008K), 0.0140040 secs] [Times: user=0.01 sys=0.00, real=0.01 secs] | |
[CMS-concurrent-sweep: 0.036/0.036 secs] [Times: user=0.03 sys=0.00, real=0.03 secs] | |
[CMS-concurrent-reset: 0.001/0.001 secs] [Times: user=0.00 sys=0.00, real=0.00 secs] | |
[GC [ParNew: 11448K->2111K(19136K), 0.1048120 secs] 19710K->19620K(83008K), 0.1048880 secs] [Times: user=0.21 sys=0.01, real=0.10 secs] | |
[GC [1 CMS-initial-mark: 17508K(63872K)] 19620K(83008K), 0.0067020 secs] [Times: user=0.00 sys=0.00, real=0.00 secs] | |
[CMS-concurrent-mark: 0.027/0.027 secs] [Times: user=0.04 sys=0.00, real=0.03 secs] | |
[CMS-concurrent-preclean: 0.002/0.002 secs] [Times: user=0.00 sys=0.00, real=0.00 secs] | |
[GC[YG occupancy: 2111 K (19136 K)][Rescan (parallel) , 0.0034350 secs][weak refs processing, 0.0082770 secs][class unloading, 0.0002560 secs][scrub symbol & string tables, 0.0004930 secs] [1 CMS-remark: 17508K(63872K)] 19620K(83008K), 0.0152530 secs] [Times: user=0.01 sys=0.00, real=0.02 secs] | |
[CMS-concurrent-sweep: 0.035/0.035 secs] [Times: user=0.05 sys=0.00, real=0.03 secs] | |
[CMS-concurrent-reset: 0.001/0.001 secs] [Times: user=0.00 sys=0.00, real=0.00 secs] | |
[GC [ParNew: 12525K->2112K(19136K), 0.1863730 secs] 20787K->20611K(83008K), 0.1864460 secs] [Times: user=0.50 sys=0.08, real=0.18 secs] | |
[GC [1 CMS-initial-mark: 18499K(63872K)] 20611K(83008K), 0.0063340 secs] [Times: user=0.01 sys=0.00, real=0.01 secs] | |
[CMS-concurrent-mark: 0.027/0.027 secs] [Times: user=0.06 sys=0.00, real=0.03 secs] | |
[CMS-concurrent-preclean: 0.007/0.009 secs] [Times: user=0.00 sys=0.00, real=0.01 secs] | |
[GC[YG occupancy: 2112 K (19136 K)][Rescan (parallel) , 0.0017540 secs][weak refs processing, 0.0076260 secs][class unloading, 0.0002960 secs][scrub symbol & string tables, 0.0004900 secs] [1 CMS-remark: 18499K(63872K)] 20611K(83008K), 0.0121430 secs] [Times: user=0.00 sys=0.01, real=0.01 secs] | |
[CMS-concurrent-sweep: 0.036/0.036 secs] [Times: user=0.05 sys=0.00, real=0.03 secs] | |
[CMS-concurrent-reset: 0.001/0.001 secs] [Times: user=0.00 sys=0.00, real=0.01 secs] | |
[GC [ParNew: 11562K->2112K(19136K), 0.0928580 secs] 19824K->19751K(83008K), 0.0929410 secs] [Times: user=0.30 sys=0.00, real=0.09 secs] | |
[GC [1 CMS-initial-mark: 17639K(63872K)] 19751K(83008K), 0.0065150 secs] [Times: user=0.00 sys=0.00, real=0.00 secs] | |
[CMS-concurrent-mark: 0.027/0.027 secs] [Times: user=0.05 sys=0.00, real=0.02 secs] | |
[CMS-concurrent-preclean: 0.005/0.006 secs] [Times: user=0.01 sys=0.00, real=0.01 secs] | |
[GC[YG occupancy: 2112 K (19136 K)][Rescan (parallel) , 0.0017200 secs][weak refs processing, 0.0090600 secs][class unloading, 0.0002650 secs][scrub symbol & string tables, 0.0005000 secs] [1 CMS-remark: 17639K(63872K)] 19751K(83008K), 0.0137580 secs] [Times: user=0.01 sys=0.00, real=0.01 secs] | |
[CMS-concurrent-sweep: 0.036/0.036 secs] [Times: user=0.02 sys=0.00, real=0.03 secs] | |
[CMS-concurrent-reset: 0.001/0.001 secs] [Times: user=0.00 sys=0.00, real=0.00 secs] | |
[GC [ParNew: 12267K->2111K(19136K), 0.1072350 secs] 20529K->20349K(83008K), 0.1073140 secs] [Times: user=0.32 sys=0.00, real=0.10 secs] | |
[GC [1 CMS-initial-mark: 18237K(63872K)] 20349K(83008K), 0.0070850 secs] [Times: user=0.01 sys=0.00, real=0.01 secs] | |
[CMS-concurrent-mark: 0.023/0.023 secs] [Times: user=0.02 sys=0.00, real=0.02 secs] | |
[CMS-concurrent-preclean: 0.004/0.005 secs] [Times: user=0.00 sys=0.00, real=0.00 secs] | |
[GC[YG occupancy: 2111 K (19136 K)][Rescan (parallel) , 0.0032370 secs][weak refs processing, 0.0081330 secs][class unloading, 0.0002680 secs][scrub symbol & string tables, 0.0004880 secs] [1 CMS-remark: 18237K(63872K)] 20349K(83008K), 0.0150690 secs] [Times: user=0.02 sys=0.00, real=0.01 secs] | |
[CMS-concurrent-sweep: 0.037/0.037 secs] [Times: user=0.03 sys=0.00, real=0.03 secs] | |
[CMS-concurrent-reset: 0.001/0.001 secs] [Times: user=0.00 sys=0.00, real=0.00 secs] | |
[GC [ParNew: 12288K->2112K(19136K), 0.1006860 secs] 20551K->20417K(83008K), 0.1007640 secs] [Times: user=0.26 sys=0.00, real=0.10 secs] | |
[GC [1 CMS-initial-mark: 18305K(63872K)] 20417K(83008K), 0.0061080 secs] [Times: user=0.00 sys=0.00, real=0.00 secs] | |
[CMS-concurrent-mark: 0.024/0.024 secs] [Times: user=0.03 sys=0.00, real=0.03 secs] | |
[CMS-concurrent-preclean: 0.006/0.006 secs] [Times: user=0.00 sys=0.00, real=0.01 secs] | |
[GC[YG occupancy: 2112 K (19136 K)][Rescan (parallel) , 0.0016830 secs][weak refs processing, 0.0088710 secs][class unloading, 0.0002830 secs][scrub symbol & string tables, 0.0004850 secs] [1 CMS-remark: 18305K(63872K)] 20417K(83008K), 0.0135350 secs] [Times: user=0.02 sys=0.00, real=0.01 secs] | |
[CMS-concurrent-sweep: 0.036/0.036 secs] [Times: user=0.03 sys=0.00, real=0.04 secs] | |
[CMS-concurrent-reset: 0.001/0.001 secs] [Times: user=0.00 sys=0.00, real=0.00 secs] | |
[GC [ParNew: 11961K->2111K(19136K), 0.1132900 secs] 20223K->21592K(83008K), 0.1133660 secs] [Times: user=0.35 sys=0.00, real=0.11 secs] | |
[GC [1 CMS-initial-mark: 19480K(63872K)] 21592K(83008K), 0.0076530 secs] [Times: user=0.00 sys=0.00, real=0.00 secs] | |
[CMS-concurrent-mark: 0.026/0.026 secs] [Times: user=0.05 sys=0.00, real=0.03 secs] | |
[CMS-concurrent-preclean: 0.005/0.005 secs] [Times: user=0.00 sys=0.00, real=0.00 secs] | |
[GC[YG occupancy: 2111 K (19136 K)][Rescan (parallel) , 0.0024100 secs][weak refs processing, 0.0081680 secs][class unloading, 0.0002630 secs][scrub symbol & string tables, 0.0004830 secs] [1 CMS-remark: 19480K(63872K)] 21592K(83008K), 0.0141750 secs] [Times: user=0.01 sys=0.00, real=0.02 secs] | |
[CMS-concurrent-sweep: 0.035/0.035 secs] [Times: user=0.04 sys=0.00, real=0.03 secs] | |
[CMS-concurrent-reset: 0.001/0.001 secs] [Times: user=0.01 sys=0.00, real=0.01 secs] | |
[GC [ParNew: 12310K->2112K(19136K), 0.1015390 secs] 22199K->22194K(83008K), 0.1016290 secs] [Times: user=0.30 sys=0.00, real=0.10 secs] | |
[GC [1 CMS-initial-mark: 20082K(63872K)] 22194K(83008K), 0.0065160 secs] [Times: user=0.00 sys=0.00, real=0.00 secs] | |
[CMS-concurrent-mark: 0.029/0.029 secs] [Times: user=0.05 sys=0.00, real=0.03 secs] | |
[CMS-concurrent-preclean: 0.007/0.009 secs] [Times: user=0.00 sys=0.00, real=0.01 secs] | |
[GC[YG occupancy: 2112 K (19136 K)][Rescan (parallel) , 0.0018150 secs][weak refs processing, 0.0094880 secs][class unloading, 0.0002700 secs][scrub symbol & string tables, 0.0004860 secs] [1 CMS-remark: 20082K(63872K)] 22194K(83008K), 0.0150240 secs] [Times: user=0.01 sys=0.00, real=0.01 secs] | |
[CMS-concurrent-sweep: 0.036/0.036 secs] [Times: user=0.06 sys=0.00, real=0.04 secs] | |
[CMS-concurrent-reset: 0.001/0.001 secs] [Times: user=0.00 sys=0.00, real=0.00 secs] | |
[GC [ParNew: 11976K->2111K(19136K), 0.0874070 secs] 22076K->22022K(83008K), 0.0874960 secs] [Times: user=0.27 sys=0.00, real=0.09 secs] | |
[GC [1 CMS-initial-mark: 19910K(63872K)] 22022K(83008K), 0.0064010 secs] [Times: user=0.01 sys=0.00, real=0.00 secs] | |
[CMS-concurrent-mark: 0.029/0.029 secs] [Times: user=0.05 sys=0.00, real=0.03 secs] | |
[CMS-concurrent-preclean: 0.006/0.007 secs] [Times: user=0.01 sys=0.00, real=0.01 secs] | |
[GC[YG occupancy: 2111 K (19136 K)][Rescan (parallel) , 0.0016650 secs][weak refs processing, 0.0085830 secs][class unloading, 0.0002590 secs][scrub symbol & string tables, 0.0005000 secs] [1 CMS-remark: 19910K(63872K)] 22022K(83008K), 0.0141460 secs] [Times: user=0.01 sys=0.00, real=0.01 secs] | |
[CMS-concurrent-sweep: 0.037/0.037 secs] [Times: user=0.05 sys=0.00, real=0.03 secs] | |
[CMS-concurrent-reset: 0.001/0.001 secs] [Times: user=0.00 sys=0.00, real=0.00 secs] | |
Done | |
Heap | |
par new generation total 19136K, used 8577K [0x00000000f3000000, 0x00000000f44c0000, 0x00000000f44c0000) | |
eden space 17024K, 37% used [0x00000000f3000000, 0x00000000f3650550, 0x00000000f40a0000) | |
from space 2112K, 99% used [0x00000000f40a0000, 0x00000000f42affe0, 0x00000000f42b0000) | |
to space 2112K, 0% used [0x00000000f42b0000, 0x00000000f42b0000, 0x00000000f44c0000) | |
concurrent mark-sweep generation total 63872K, used 10174K [0x00000000f44c0000, 0x00000000f8320000, 0x00000000fae00000) | |
concurrent-mark-sweep perm gen total 21248K, used 2615K [0x00000000fae00000, 0x00000000fc2c0000, 0x0000000100000000) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.nio.*; | |
public class DisableExplicitGCDemo { | |
public static void main(String[] args) { | |
for (int i = 0; i < 1000000; i++) { | |
ByteBuffer.allocateDirect(128); | |
} | |
System.out.println("Done"); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ java -version | |
java version "1.6.0_29" | |
Java(TM) SE Runtime Environment (build 1.6.0_29-b11) | |
Java HotSpot(TM) 64-Bit Server VM (build 20.4-b02, mixed mode) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment