Class Data Sharing

Sharing Economy in the HotSpot VM

Volker Simonis, SAP / volker.simonis@gmail.com

https://simonis.github.io/JBreak2018

Containers and Microservices everywhere

  • Small footprint
  • Fast startup

Native vs. Java Applications

Class Data Sharing & Ahead of Time Compilation

  • CDS: Cache preprocessed class metadata on disc
  • AOT: Cache precompiled Java code on disc
  • Improve startup performance
  • Reduce memory footprint

Short History of CDS in the HotSpot VM

  • Introduced 2004 with JDK 1.5
    • Only for Client VM, only Serial GC
    • Only system classes
  • Part of the initial OpenJDK 6/7 contribution
  • Since OpenJDK 9 / JDK 9:
    • Support for Server VM
    • Support for G1, Serial, Parallel and ParallelOld GCs
    • Support for shared strings (only with G1, non-Windows)
    • Support for application classes (commercial Oracle JDK feature)
  • Coming with OpenJDK 10:

CDS Basics

              
$ java -Xshare:dump
Loading classes to share ...   // from JAVA_HOME/lib/classlist
total    :  18.422.144 [100.0% ] // to JAVA_HOME/lib/server/classes.jsa
$ java -Xshare:on io.simonis.HelloCDS
HelloCDS
$ java -Xshare:on -Xlog:class+load io.simonis.HelloCDS
[class,load] java.lang.Object source: shared objects file
...
[class,load] j.i.l.URLClassPath$FileLoader source: jrt:/java.base
...
[class,load] io.simonis.HelloCDS2 source: file:/examples/bin/
HelloCDS
$ java -Xshare:on -Xlog:class+load io.simonis.HelloCDS \
      | grep "shared objects file" | wc
    477    2862   40977
$ java -Xshare:on -Xlog:class+load io.simonis.HelloCDS \
      | grep -v "shared objects file" | wc
      5      17     424
              
            

CDS Basics - Performance

              
$ time -f "%e sec\n" java -Xshare:off io.simonis.HelloCDS
Hello CDS
0.162 sec
$ time -f "%e sec\n" java -Xshare:on  io.simonis.HelloCDS          
Hello CDS
0.148 sec
              
            

About 9% overall performance improvement

              
$ java -Xshare:off -Xlog:class+load io.simonis.HelloCDS
[0,164s][class,load] io.simonis.HelloCDS source: file:/examples/bin
$ java -Xshare:on  -Xlog:class+load io.simonis.HelloCDS
[0,143s][class,load] io.simonis.HelloCDS source: file:/examples/bin
              
            

Application class loads about 13% faster

CDS & AppCDS with JRuby 9.1.16

              
$ export VERIFY_JRUBY=1
$ JAVA_OPTS="-Xshare:on \
             -Xlog:class+load:file=jruby_cds.classtrace" \
  jruby --dev -e 1
$ wc jruby.classtrace
  6621   28511 806148 jruby.classtrace
$ grep "shared objects file" jruby.classtrace | wc
   1008    6048  89449
$ JAVA_OPTS="-XX:DumpLoadedClassList=jruby_cds.cls" \
  jruby --dev -e 1
$ wc jruby_cds.cls
   1480   1480 51716 jruby_cds.cls
$ CATALINA_OPTS="-XX:DumpLoadedClassList=jruby_appcds.cls \
                 -XX:+UseAppCDS" \
  jruby --dev -e 1
$ wc jruby_appcds.cls
   6504   6504 262466 jruby_appcds.cls
              
            

CDS & AppCDS with JRuby 9.1.16

              
$ JAVA_OPTS="-Xshare:dump -XX:+UseAppCDS \
             -XX:SharedClassListFile=jruby_appcds.cls \
             -XX:+UnlockDiagnosticVMOptions \
             -XX:SharedArchiveFile=jruby_appcds.jsa" \
  jruby --dev -e 1
$ ll jruby_appcds.jsa
-r--r----- 58.994.688 Mär  3 23:01 jruby_appcds.jsa
$ JAVA_OPTS="-Xshare:on -XX:+UseAppCDS \
             -XX:+UnlockDiagnosticVMOptions \
             -XX:SharedArchiveFile=jruby_appcds.jsa \
             -Xlog:class+load:file=jruby_appcds.clstrace" \
  jruby --dev -e 1
$ wc jruby_appcds.clstrace
  6591   39257 630637 jruby_appcds.clstrace
$ grep "shared objects " jruby_appcds.clstrace | wc
   6447   38682  615284

              
            

AppCDS Performance with JRuby 9.1.16

              
$ JAVA_OPTS="-Xshare:on -XX:+UseAppCDS \
             -XX:+UnlockDiagnosticVMOptions \
             -XX:SharedArchiveFile=/tmp/jruby_appcds.jsa" \
  /usr/bin/time -f "%e sec\n" ./bin/jruby --dev -e 1
2.02 sec
$ JAVA_OPTS="-Xshare:off -XX:+UseAppCDS \
             -XX:+UnlockDiagnosticVMOptions \
             -XX:SharedArchiveFile=/tmp/jruby_appcds.jsa" \
  /usr/bin/time -f "%e sec\n" ./bin/jruby --dev -e 1
3.05 sec
              
            

About 30% startup performance improvement!!!

Charly is quite happy about this :)

CDS & AppCDS with Tomcat 9 & nGrinder

              
$ CATALINA_OPTS="-Xshare:on \
                 -Xlog:class+load:file=/tmp/tomcat.classtrace" \
  catalina.sh start
$ wc /tmp/tomcat.classtrace
  12644   50575 2075264 /tmp/tomcat.classtrace
$ grep "shared objects file" /tmp/tomcat.classtrace | wc
   1156    6936  103052
$ CATALINA_OPTS="-XX:DumpLoadedClassList=/tmp/tomcat.cls" \
  catalina.sh start
$ wc /tmp/tomcat.cls
   3261   3261 125647 /tmp/tomcat.cls
$ CATALINA_OPTS="-XX:DumpLoadedClassList=/tmp/tomcat_appcds.cls \
                 -XX:+UseAppCDS" \
  catalina.sh start
$ wc /tmp/tomcat_appcds.cls
   3520   3520 133431 /tmp/tomcat_appcds.cls
              
            

CDS & AppCDS with Tomcat 9 & nGrinder

              
$ CATALINA_OPTS="-Xshare:dump -XX:+UseAppCDS \
                 -XX:SharedClassListFile=/tmp/tomcat_appcds.cls \
                 -XX:+UnlockDiagnosticVMOptions \
                 -XX:SharedArchiveFile=/tmp/tomcat_appcds.jsa" \
  catalina.sh start
$ ll /tmp/tomcat_appcds.jsa
-r--r----- 49.979.392 Feb  2 23:57 /tmp/tomcat_appcds.jsa
$ CATALINA_OPTS="-Xshare:on -XX:+UseAppCDS \
                 -XX:+UnlockDiagnosticVMOptions \
                 -XX:SharedArchiveFile=/tmp/tomcat_appcds.jsa \
                 -Xlog:class+load:file=/tmp/tomcat_appcds.clstrace" \
  catalina.sh start
$ wc /tmp/tomcat_appcds.clstrace
  12645   57615 2088947 /tmp/tomcat_appcds.clstrace
$ grep "shared objects " /tmp/tomcat_appcds.clstrace | wc
   3518   21108  327511

              
            

AppCDS with Custom Class Loaders

  • OpenJDK 10: JEP 310 - Application Class-Data Sharing
  • Supports sharing of classes loaded by the application class loader
    (a.k.a. system class loader) with -XX:+UseAppCDS
  • Supports sharing of classes loaded by custom class loaders
  • Unfortunately -XX:DumpLoadedClassList=.. -XX:+UseAppCDS
    doesn't dump classes loaded by custom class loaders

AppCDS - Class List Format

  • -XX:DumpLoadedClassList=... creates a trivial class list:
                      
    $ cat /tmp/tomcat_appcds.cls
    java/lang/Object
    java/lang/String                                          
    ...
    org/apache/catalina/startup/Bootstrap
                      
                    
  • The format for classes loaded by custom class loaders isn't specified
    anywhere, except in classListParser.cpp
                      
    CLASSNAME [ ID ]?
    CLASSNAME ID super: ID [ interface: [ ID ]+ ]? source: URL
                      
                    

Creating a Class List for Custom Loaders

  • -Xlog:class+load=debug has all the information we need:
                      
    $ CATALINA_OPTS="-Xlog:class+load=debug" catalina.sh start
    [info ] java.lang.Object source: jrt:/java.base
    [debug]  klass: 0x100000eb0 super: 0x000000000 loader: [NULL class loader]
    ....
    [info ] java.sql.Timestamp source: jrt:/java.sql
    [debug]  klass: 0x100096c30 super: 0x100091a00 \
             loader: [0xff0172600 a 'ClassLoaders$PlatformClassLoader']
    ....
    [info ] org.apache.catalina.Server source: file:catalina.jar
    [debug]  klass: 0x1000e6410 super: 0x100000eb0 interfaces: 0x1000e6238 \
             loader: [0xff0310fb0 a 'java/net/URLClassLoader']
                      
                    
  • From this output we can easily create:
                      
    java/lang/Object           id: 0x100000eb0
    java/sql/Timestamp         id: 0x100096c30
    org/apache/catalina/Server id: 0x1000e6410 super: 0x100000eb0 \        
                               interfaces: 0x1000e6238 source: catalina.jar
                      
                    

cl4cds

cl4cds converts a class log into a CDS class list:
                  
$ CATALINA_OPTS="-Xlog:class+load=debug:file=tomcat_dbg.clstrace" \
  catalina.sh start
$ java io.simonis.cl4cds tomcat_dbg.clstrace tomcat_cl4cds.cls
$ CATALINA_OPTS="-Xshare:dump -XX:+UseAppCDS \
                 -XX:SharedClassListFile=tomcat_cl4cds.cls \
                 -XX:+UnlockDiagnosticVMOptions \
                 -XX:SharedArchiveFile=tomcat_cl4cds.jsa" \
  catalina.sh start
$ ll tomcat_cl4cds.jsa
-r--r----- 1 102.305.792 Feb  3 01:48 tomcat_cl4cds.jsa
$ CATALINA_OPTS="-Xshare:on -XX:+UseAppCDS \
                 -XX:+UnlockDiagnosticVMOptions \
                 -XX:SharedArchiveFile=tomcat_cl4cds.jsa \
                 -Xlog:class+load:file=tomcat_cl4cds.clstrace" \
  catalina.sh start
$ wc tomcat_cl4cds.clstrace
  12644   69335 1531203 tomcat_cl4cds.clstrace
$ grep "shared objects " tomcat_cl4cds.clstrace | wc
   9380   56280  963418
                  
                
Create HotSpot CDS archive in docker container: =============================================== docker run -v /c/Users/D046063/public_html/hotspot/JBreak2018/git/CDS/examples:/examples -p 8091:8080 -it - -rm -m 500m cds_demo_ojdk:latest /bin/bash /examples/tomcat_measure.sh 1 "-XX:TieredStopAtLevel=1 -XX:CICompilerCount=1 -Xmx64m -Xms64m -Xlog:class+load=debug:file=/tmp/tomcat_dbg.clstrace" java -cp /examples/cl4cds-1.0.0-SNAPSHOT.jar io.simonis.cl4cds /tmp/tomcat_dbg.clstrace /tmp/tomcat_cl4cds.cls /examples/tomcat_measure.sh 1 "-XX:TieredStopAtLevel=1 -XX:CICompilerCount=1 -Xmx64m -Xms64m -XX:+UseG1GC -Xshare:dump -XX:+UseAppCDS -XX:SharedClassListFile=/tmp/tomcat_cl4cds.cls -XX:+UnlockDiagnosticVMOptions -XX:SharedArchiveFile=/tmp/tomcat_cl4cds.jsa" Number of classes 9694 instance classes = 9602 obj array classes = 84 type array classes = 8 Updating ConstMethods ... done. Removing unshareable information ... done. Scanning all metaspace objects ... Allocating RW objects ... Allocating RO objects ... Relocating embedded pointers ... Relocating external roots ... Dumping symbol table ... Dumping String objects to closed archive heap region ... Dumping objects to open archive heap region ... Relocating SystemDictionary::_well_known_klasses[] ... Removing java_mirror ... done. mc space: 13264 [ 0.0% of total] out of 16384 bytes [ 81.0% used] at 0x0000000800000000 rw space: 22873296 [ 22.1% of total] out of 22876160 bytes [100.0% used] at 0x0000000800004000 ro space: 40262480 [ 38.9% of total] out of 40263680 bytes [100.0% used] at 0x00000008015d5000 md space: 6160 [ 0.0% of total] out of 8192 bytes [ 75.2% used] at 0x0000000803c3b000 od space: 36699784 [ 35.4% of total] out of 36700160 bytes [100.0% used] at 0x0000000803c3d000 st0 space: 417792 [ 0.4% of total] out of 417792 bytes [100.0% used] at 0x00000000ff400000 st1 space: 3145728 [ 3.0% of total] out of 3145728 bytes [100.0% used] at 0x00000000ff500000 oa0 space: 176128 [ 0.2% of total] out of 176128 bytes [100.0% used] at 0x00000000ff300000 total : 103594632 [100.0% of total] out of 103604224 bytes [100.0% used] Create HotSpot CDS archive in docker container (with extra string/symbol file): ------------------------------------------------------------------------------- docker run -v /c/Users/D046063/public_html/hotspot/JBreak2018/git/CDS/examples:/examples -p 8091:8080 -it - -rm -m 500m cds_demo_ojdk:latest /bin/bash /examples/tomcat_measure.sh 1 "-XX:TieredStopAtLevel=1 -XX:CICompilerCount=1 -Xmx64m -Xms64m -Xlog:class+load=debug:file=/tmp/tomcat_dbg.clstrace" java -cp /examples/cl4cds-1.0.0-SNAPSHOT.jar io.simonis.cl4cds /tmp/tomcat_dbg.clstrace /tmp/tomcat_cl4cds.cls jcmd `pgrep -f tomcat` VM.stringtable -verbose > /examples/docker_ojdk/tomcat_sa/stringtable.jcmd jcmd `pgrep -f tomcat` VM.symboltable -verbose > /examples/docker_ojdk/tomcat_sa/symboltable.jcmd combine stringtable.jcmd and symboltable.jcmd into string_symbol.cfg like this: VERSION: 1.0 @SECTION: String [stringtable.jcmd] @SECTION: Symbol [symboltable.jcmd] /examples/tomcat_measure.sh 1 "-XX:TieredStopAtLevel=1 -XX:CICompilerCount=1 -Xmx64m -Xms64m -XX:+UseG1GC -Xshare:dump -XX:+UseAppCDS -XX:SharedClassListFile=/tmp/tomcat_cl4cds.cls -XX:SharedArchiveConfigFile=/examples/docker_ojdk/tomcat_sa/string_symbol.cfg -XX:+UnlockDiagnosticVMOptions -XX:SharedArchiveFile=/tmp/tomcat_cl4cds.jsa" Rewriting and linking classes: done Number of classes 9682 instance classes = 9590 obj array classes = 84 type array classes = 8 Updating ConstMethods ... done. Removing unshareable information ... done. Scanning all metaspace objects ... Allocating RW objects ... Allocating RO objects ... Relocating embedded pointers ... Relocating external roots ... Dumping symbol table ... Dumping String objects to closed archive heap region ... Dumping objects to open archive heap region ... Relocating SystemDictionary::_well_known_klasses[] ... Removing java_mirror ... done. mc space: 13264 [ 0.0% of total] out of 16384 bytes [ 81.0% used] at 0x0000000800000000 rw space: 22853712 [ 21.5% of total] out of 22855680 bytes [100.0% used] at 0x0000000800004000 ro space: 41573200 [ 39.1% of total] out of 41574400 bytes [100.0% used] at 0x00000008015d0000 md space: 6160 [ 0.0% of total] out of 8192 bytes [ 75.2% used] at 0x0000000803d76000 od space: 36674096 [ 34.5% of total] out of 36675584 bytes [100.0% used] at 0x0000000803d78000 st0 space: 819200 [ 0.8% of total] out of 819200 bytes [100.0% used] at 0x00000000ff400000 st1 space: 4194304 [ 3.9% of total] out of 4194304 bytes [100.0% used] at 0x00000000ff500000 oa0 space: 176128 [ 0.2% of total] out of 176128 bytes [100.0% used] at 0x00000000ff300000 total : 106310064 [100.0% of total] out of 106319872 bytes [100.0% used] Create OpenJ9 CDS archive in docker container: ============================================== docker run -v /c/Users/D046063/public_html/hotspot/JBreak2018/git/CDS/examples:/examples -p 8091:8080 -it - -rm -m 500m cds_demo_oj9:latest /bin/bash /examples/tomcat_measure.sh 1 "-Xquickstart -Xmx64m -Xms64m -Xscmx128m -Xshareclasses:cacheDir=/tmp/tomcat_sa,name=tomcat,noaot,nojitdata,verbose -Xnoaot" java -Xshareclasses:cacheDir=/tmp/tomcat_sa,name=tomcat,printStats Current statistics for cache "tomcat": Cache created with: -Xnolinenumbers = false BCI Enabled = true Restrict Classpaths = false Feature = cr Cache contains only classes with line numbers base address = 0x00007FFFA4059000 end address = 0x00007FFFAC000000 allocation pointer = 0x00007FFFA5C1E7D8 cache size = 134217120 softmx bytes = 134217120 free bytes = 93735312 ROMClass bytes = 29120472 AOT bytes = 256 Reserved space for AOT bytes = -1 Maximum space for AOT bytes = -1 JIT data bytes = 0 Reserved space for JIT data bytes = -1 Maximum space for JIT data bytes = -1 Zip cache bytes = 0 Data bytes = 363936 Metadata bytes = 290200 Metadata % used = 0% Class debug area size = 10706944 Class debug area used bytes = 5234970 Class debug area % used = 48% # ROMClasses = 11921 # AOT Methods = 0 # Classpaths = 5 # URLs = 0 # Tokens = 0 # Zip caches = 0 # Stale classes = 0 % Stale classes = 0% Cache is 30% full Create OpenJ9 CDS archive with AOT/JIT: ======================================= JAVA_HOME=/share/software/Java/openJ9_jdk9-b181 CATALINA_HOME=/share/software/Java/apache-tomcat-9.0.2 /c/Users/D046063/public_html/hotspot/JBreak2018/git/CDS/examples/tomcat_measure.sh 1 "-Xquickstart -Xmx64m -Xms64m -Xscmx128m -Xshareclasses:cacheDir=/tmp/tomcat,name=tomcat,verbose" /share/software/Java/openJ9_jdk9-b181/bin/java -Xshareclasses:cacheDir=/tmp/tomcat,name=tomcat,printStats Current statistics for cache "tomcat": Cache created with: -Xnolinenumbers = false BCI Enabled = true Restrict Classpaths = false Feature = cr Cache contains only classes with line numbers base address = 0x00007FFFA4059000 end address = 0x00007FFFAC000000 allocation pointer = 0x00007FFFA5B11260 cache size = 134217120 softmx bytes = 134217120 free bytes = 80991164 ROMClass bytes = 28017248 AOT bytes = 13330160 Reserved space for AOT bytes = -1 Maximum space for AOT bytes = -1 JIT data bytes = 99072 Reserved space for JIT data bytes = -1 Maximum space for JIT data bytes = -1 Zip cache bytes = 0 Data bytes = 363936 Metadata bytes = 708596 Metadata % used = 1% Class debug area size = 10706944 Class debug area used bytes = 5041880 Class debug area % used = 47% # ROMClasses = 11589 # AOT Methods = 6329 # Classpaths = 5 # URLs = 0 # Tokens = 0 # Zip caches = 0 # Stale classes = 0 % Stale classes = 0% Cache is 39% full Cache is accessible to current user = true HotSpot Benchmarks (without G1) ================== (1) docker run -v /c/Users/D046063/public_html/hotspot/JBreak2018/git/CDS/examples:/examples -p 8091:8080 -i -x-rm -m 500m cds_demo_ojdk:latest /examples/tomcat_measure.sh 1 "-Xint -Xmx64m -Xms64m -Xshare:on -XX:+UseAppCDS -XX:+UnlockDiagnosticVMOptions -XX:SharedArchiveFile=/opt/tomcat_sa/tomcat_cl4cds.jsa" (2) docker run -v /c/Users/D046063/public_html/hotspot/JBreak2018/git/CDS/examples:/examples -p 8090:8080 -i -x-rm -m 500m cds_demo_ojdk:latest /examples/tomcat_measure.sh 1 "-Xint -Xmx64m -Xms64m -Xshare:on -XX:+UseAppCDS -XX:+UnlockDiagnosticVMOptions -XX:SharedArchiveFile=/opt/tomcat_sa/tomcat_cl4cds.jsa" (3) docker run -v /c/Users/D046063/public_html/hotspot/JBreak2018/git/CDS/examples:/examples -p 8080:8080 -i -x-rm -m 500m cds_demo_ojdk:latest /examples/tomcat_measure.sh 1 "-Xint -Xmx64m -Xms64m -Xshare:off -XX:+UseAppCDS -XX:+UnlockDiagnosticVMOptions -XX:SharedArchiveFile=/opt/tomcat_sa/tomcat_cl4cds.jsa" CONTAINER CPU % MEM USAGE / LIMIT MEM % NET I/O BLOCK I/O PIDS 1c567fbd3e5f 2.23% 200.2MiB / 500MiB 40.03% 424kB / 6.54kB 45.1kB / 840kB 0 (3) 4dff19a42e28 6.19% 164.1MiB / 500MiB 32.81% 425kB / 6.43kB 86kB / 840kB 0 (2) 9bd6557f0d98 3.98% 164.9MiB / 500MiB 32.98% 425kB / 6.7kB 4.1kB / 836kB 0 (1) CONTAINER CPU % MEM USAGE / LIMIT MEM % NET I/O BLOCK I/O PIDS 1c567fbd3e5f 5.26% 209.8MiB / 500MiB 41.95% 424kB / 6.54kB 45.1kB / 840kB 0 4dff19a42e28 2.98% 173.2MiB / 500MiB 34.63% 425kB / 6.43kB 86kB / 840kB 0 9bd6557f0d98 2.89% 173.9MiB / 500MiB 34.78% 425kB / 6.7kB 4.1kB / 836kB 0 docker run -v /c/Users/D046063/public_html/hotspot/JBreak2018/git/CDS/examples:/examples -p 8080:8080 -i -x-rm -m 500m cds_demo_ojdk:latest /examples/tomcat_measure.sh 11 "-XX:TieredStopAtLevel=1 -XX:CICompilerCount=1 -Xmx64m -Xms64m -Xshare:on -XX:+UseAppCDS -XX:+UnlockDiagnosticVMOptions -XX:SharedArchiveFile=/opt/tomcat_sa/tomcat_cl4cds.jsa" (15729+15051+15050+15373+15351+14951+14772+15372+14897+15234)/10 15178 docker run -v /c/Users/D046063/public_html/hotspot/JBreak2018/git/CDS/examples:/examples -p 8080:8080 -i -x-rm -m 500m cds_demo_ojdk:latest /examples/tomcat_measure.sh 11 "-XX:TieredStopAtLevel=1 -XX:CICompilerCount=1 -Xmx64m -Xms64m -Xshare:off" (15850+15522+15393+15529+15708+15844+15690+15570+15548+16217)/10 15687 HotSpot Benchmarks (with G1) ================== (1) docker run -v /c/Users/D046063/public_html/hotspot/JBreak2018/git/CDS/examples:/examples -p 8091:8080 -i --rm -m 500m cds_demo_ojdk:latest /examples/tomcat_measure.sh 1 "-Xint -Xmx64m -Xms64m -XX:+UseG1GC -Xshare:on -XX:+UseAppCDS -XX:+UnlockDiagnosticVMOptions -XX:SharedArchiveFile=/opt/tomcat_sa/tomcat_cl4cds.jsa" (PID 22322) (2) docker run -v /c/Users/D046063/public_html/hotspot/JBreak2018/git/CDS/examples:/examples -p 8090:8080 -i --rm -m 500m cds_demo_ojdk:latest /examples/tomcat_measure.sh 1 "-Xint -Xmx64m -Xms64m -XX:+UseG1GC -Xshare:on -XX:+UseAppCDS -XX:+UnlockDiagnosticVMOptions -XX:SharedArchiveFile=/opt/tomcat_sa/tomcat_cl4cds.jsa" (PID 22982) (3) docker run -v /c/Users/D046063/public_html/hotspot/JBreak2018/git/CDS/examples:/examples -p 8080:8080 -i --rm -m 500m cds_demo_ojdk:latest /examples/tomcat_measure.sh 1 "-Xint -Xmx64m -Xms64m -XX:+UseG1GC -Xshare:off -XX:+UseAppCDS -XX:+UnlockDiagnosticVMOptions -XX:SharedArchiveFile=/opt/tomcat_sa/tomcat_cl4cds.jsa" (PID 23693) CONTAINER CPU % MEM USAGE / LIMIT MEM % NET I/O BLOCK I/O PIDS 77d960c7a8b4 1.47% 164.3MiB / 500MiB 32.85% 423kB / 6.11kB 0B / 836kB 0 CONTAINER CPU % MEM USAGE / LIMIT MEM % NET I/O BLOCK I/O PIDS 5e35f512b41c 3.23% 217.5MiB / 500MiB 43.51% 424kB / 6.33kB 0B / 836kB 0 (3) b88085462057 3.74% 172.3MiB / 500MiB 34.46% 424kB / 6.22kB 0B / 836kB 0 (2) 77d960c7a8b4 3.54% 174.6MiB / 500MiB 34.92% 424kB / 6.11kB 0B / 836kB 0 (1) 22322: /opt/jdk/bin/java -Djava.util.logging.config.file=/opt/apache-tomcat-9.0.2/conf/logging.properties -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Djdk.tls.ephemeralDHKeySize=2048 -Djava.protocol.handler.pkgs=org.apache.catalina.webresources -Djava.security.egd=file:/dev/./urandom -Xint -Xmx64m -Xms64m -XX:+UseG1GC -Xshare:on -XX:+UseAppCDS -XX:+UnlockDiagnosticVMOptions -XX:SharedArchiveFile=/opt/tomcat_sa/tomcat_cl4cds.jsa -Dignore.endorsed.dirs= -classpath /opt/apache-tomcat-9.0.2/bi Address Perm Size Rss Pss Shared_Clean Shared_Dirty Private_Clean Private_Dirty Referenced Mapping 00400000 r-xp 4 4 1 4 0 0 0 4 /opt/jdk/bin/java 00601000 r--p 4 4 4 0 0 0 4 4 /opt/jdk/bin/java 00602000 rw-p 4 4 4 0 0 0 4 4 /opt/jdk/bin/java 00603000 rw-p 132 60 60 0 0 0 60 60 [heap] fc000000 rw-p 52224 52224 52224 0 0 0 52224 52224 ff300000 rw-p 172 172 160 24 0 0 148 172 /opt/tomcat_sa/tomcat_cl4cds.jsa ff32b000 rw-p 852 0 0 0 0 0 0 0 ff400000 rw-p 408 408 204 408 0 0 0 408 /opt/tomcat_sa/tomcat_cl4cds.jsa ff466000 rw-p 616 0 0 0 0 0 0 0 ff500000 rw-p 3072 3072 1536 3072 0 0 0 3072 /opt/tomcat_sa/tomcat_cl4cds.jsa ff800000 rw-p 8192 8192 8192 0 0 0 8192 8192 800000000 rwxp 16 16 16 0 0 0 16 16 /opt/tomcat_sa/tomcat_cl4cds.jsa 800004000 rw-p 22340 22340 21518 1644 0 0 20696 22224 /opt/tomcat_sa/tomcat_cl4cds.jsa 8015d5000 r--p 39320 39320 19660 39320 0 0 0 39320 /opt/tomcat_sa/tomcat_cl4cds.jsa 803c3b000 rw-p 8 8 8 0 0 0 8 8 /opt/tomcat_sa/tomcat_cl4cds.jsa 803c3d000 r--p 35840 35840 17920 35840 0 0 0 35840 /opt/tomcat_sa/tomcat_cl4cds.jsa 840000000 rw-p 3328 3204 3204 0 0 0 3204 3200 840340000 ---p 1045248 0 0 0 0 0 0 0 After killing 22982 and 23693: 22322: /opt/jdk/bin/java -Djava.util.logging.config.file=/opt/apache-tomcat-9.0.2/conf/logging.properties -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Djdk.tls.ephemeralDHKeySize=2048 -Djava.protocol.handler.pkgs=org.apache.catalina.webresources -Djava.security.egd=file:/dev/./urandom -Xint -Xmx64m -Xms64m -XX:+UseG1GC -Xshare:on -XX:+UseAppCDS -XX:+UnlockDiagnosticVMOptions -XX:SharedArchiveFile=/opt/tomcat_sa/tomcat_cl4cds.jsa -Dignore.endorsed.dirs= -classpath /opt/apache-tomcat-9.0.2/bi Address Perm Size Rss Pss Shared_Clean Shared_Dirty Private_Clean Private_Dirty Referenced Mapping 00400000 r-xp 4 4 4 0 0 4 0 4 /opt/jdk/bin/java 00601000 r--p 4 4 4 0 0 0 4 4 /opt/jdk/bin/java 00602000 rw-p 4 4 4 0 0 0 4 4 /opt/jdk/bin/java 00603000 rw-p 132 60 60 0 0 0 60 60 [heap] fc000000 rw-p 52224 52224 52224 0 0 0 52224 52220 ff300000 rw-p 172 172 172 0 0 24 148 172 /opt/tomcat_sa/tomcat_cl4cds.jsa ff32b000 rw-p 852 0 0 0 0 0 0 0 ff400000 rw-p 408 408 408 0 0 408 0 408 /opt/tomcat_sa/tomcat_cl4cds.jsa ff466000 rw-p 616 0 0 0 0 0 0 0 ff500000 rw-p 3072 3072 3072 0 0 3072 0 3072 /opt/tomcat_sa/tomcat_cl4cds.jsa ff800000 rw-p 8192 8192 8192 0 0 0 8192 8192 800000000 rwxp 16 16 16 0 0 0 16 16 /opt/tomcat_sa/tomcat_cl4cds.jsa 800004000 rw-p 22340 22340 22340 0 0 1644 20696 22248 /opt/tomcat_sa/tomcat_cl4cds.jsa 8015d5000 r--p 39320 39320 39320 0 0 39320 0 39320 /opt/tomcat_sa/tomcat_cl4cds.jsa 803c3b000 rw-p 8 8 8 0 0 0 8 8 /opt/tomcat_sa/tomcat_cl4cds.jsa 803c3d000 r--p 35840 35840 35840 0 0 35840 0 35840 /opt/tomcat_sa/tomcat_cl4cds.jsa 840000000 rw-p 3328 3204 3204 0 0 0 3204 3188 840340000 ---p 1045248 0 0 0 0 0 0 0 (1) docker run -v /c/Users/D046063/public_html/hotspot/JBreak2018/git/CDS/examples:/examples -p 8091:8080 -i --rm -m 500m cds_demo_ojdk:latest /examples/tomcat_measure.sh 1 "-Xint -Xmx64m -Xms64m -XX:+UseG1GC -Xshare:on -XX:+UseAppCDS -XX:+UnlockDiagnosticVMOptions -XX:SharedArchiveFile=/opt/tomcat_sa/tomcat_cl4cds.jsa" (PID 1508) (2) docker run -v /c/Users/D046063/public_html/hotspot/JBreak2018/git/CDS/examples:/examples -p 8090:8080 -i --rm -m 500m cds_demo_ojdk:latest /examples/tomcat_measure.sh 1 "-Xint -Xmx64m -Xms64m -XX:+UseG1GC -Xshare:on -XX:+UseAppCDS -XX:+UnlockDiagnosticVMOptions -XX:SharedArchiveFile=/opt/tomcat_sa/tomcat_cl4cds.jsa" (PID 1750) (3) docker run -v /c/Users/D046063/public_html/hotspot/JBreak2018/git/CDS/examples:/examples -p 8080:8080 -i --rm -m 500m cds_demo_ojdk:latest /examples/tomcat_measure.sh 1 "-Xint -Xmx64m -Xms64m -XX:+UseG1GC -Xshare:off -XX:+UseAppCDS -XX:+UnlockDiagnosticVMOptions -XX:SharedArchiveFile=/opt/tomcat_sa/tomcat_cl4cds.jsa" (PID 1993) CONTAINER CPU % MEM USAGE / LIMIT MEM % NET I/O BLOCK I/O PIDS fd41c34a085e 2.97% 207.7MiB / 500MiB 41.54% 423kB / 5.89kB 0B / 836kB 0 4e205647ee0f 3.25% 163MiB / 500MiB 32.59% 424kB / 6.49kB 0B / 836kB 0 e007e650adb9 3.35% 163.4MiB / 500MiB 32.67% 425kB / 6.65kB 32.8kB / 840kB 0 CONTAINER CPU % MEM USAGE / LIMIT MEM % NET I/O BLOCK I/O PIDS fd41c34a085e 5.28% 221.2MiB / 500MiB 44.24% 425kB / 5.89kB 0B / 836kB 0 4e205647ee0f 3.73% 176MiB / 500MiB 35.21% 426kB / 6.49kB 0B / 836kB 0 e007e650adb9 4.59% 176.5MiB / 500MiB 35.30% 426kB / 6.65kB 32.8kB / 840kB 0 1508: /opt/jdk/bin/java -Djava.util.logging.config.file=/opt/apache-tomcat-9.0.2/conf/logging.properties -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Djdk.tls.ephemeralDHKeySize=2048 -Djava.protocol.handler.pkgs=org.apache.catalina.webresources -Djava.security.egd=file:/dev/./urandom -Xint -Xmx64m -Xms64m -XX:+UseG1GC -Xshare:on -XX:+UseAppCDS -XX:+UnlockDiagnosticVMOptions -XX:SharedArchiveFile=/opt/tomcat_sa/tomcat_cl4cds.jsa -Dignore.endorsed.dirs= -classpath /opt/apache-tomcat-9.0.2/bi Address Perm Size Rss Pss Shared_Clean Shared_Dirty Private_Clean Private_Dirty Referenced Mapping 00400000 r-xp 4 4 1 4 0 0 0 4 /opt/jdk/bin/java 00601000 r--p 4 4 4 0 0 0 4 4 /opt/jdk/bin/java 00602000 rw-p 4 4 4 0 0 0 4 0 /opt/jdk/bin/java 00603000 rw-p 132 88 88 0 0 0 88 84 [heap] fc000000 rw-p 52224 52224 52224 0 0 0 52224 52224 ff300000 rw-p 172 172 160 24 0 0 148 172 /opt/tomcat_sa/tomcat_cl4cds.jsa ff32b000 rw-p 852 0 0 0 0 0 0 0 ff400000 rw-p 408 408 204 408 0 0 0 408 /opt/tomcat_sa/tomcat_cl4cds.jsa ff466000 rw-p 616 0 0 0 0 0 0 0 ff500000 rw-p 3072 3072 1536 3072 0 0 0 3072 /opt/tomcat_sa/tomcat_cl4cds.jsa ff800000 rw-p 8192 8192 8192 0 0 0 8192 8192 800000000 rwxp 16 16 16 0 0 0 16 16 /opt/tomcat_sa/tomcat_cl4cds.jsa 800004000 rw-p 22340 22340 21520 1640 0 0 20700 22016 /opt/tomcat_sa/tomcat_cl4cds.jsa 8015d5000 r--p 39320 39320 19660 39320 0 0 0 39320 /opt/tomcat_sa/tomcat_cl4cds.jsa 803c3b000 rw-p 8 8 8 0 0 0 8 8 /opt/tomcat_sa/tomcat_cl4cds.jsa 803c3d000 r--p 35840 35840 17920 35840 0 0 0 35840 /opt/tomcat_sa/tomcat_cl4cds.jsa 840000000 rw-p 3328 3204 3204 0 0 0 3204 3204 840340000 ---p 1045248 0 0 0 0 0 0 0 ======= ====== ====== ============ ============ ============= ============= ========== 3941460 280800 221471 108632 0 112 172056 273492 KB 1508: /opt/jdk/bin/java -Djava.util.logging.config.file=/opt/apache-tomcat-9.0.2/conf/logging.properties -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Djdk.tls.ephemeralDHKeySize=2048 -Djava.protocol.handler.pkgs=org.apache.catalina.webresources -Djava.security.egd=file:/dev/./urandom -Xint -Xmx64m -Xms64m -XX:+UseG1GC -Xshare:on -XX:+UseAppCDS -XX:+UnlockDiagnosticVMOptions -XX:SharedArchiveFile=/opt/tomcat_sa/tomcat_cl4cds.jsa -Dignore.endorsed.dirs= -classpath /opt/apache-tomcat-9.0.2/bi Address Perm Size Rss Pss Shared_Clean Shared_Dirty Private_Clean Private_Dirty Referenced Mapping 00400000 r-xp 4 4 4 0 0 4 0 4 /opt/jdk/bin/java 00601000 r--p 4 4 4 0 0 0 4 4 /opt/jdk/bin/java 00602000 rw-p 4 4 4 0 0 0 4 0 /opt/jdk/bin/java 00603000 rw-p 132 88 88 0 0 0 88 84 [heap] fc000000 rw-p 52224 52224 52224 0 0 0 52224 52224 ff300000 rw-p 172 172 172 0 0 24 148 172 /opt/tomcat_sa/tomcat_cl4cds.jsa ff32b000 rw-p 852 0 0 0 0 0 0 0 ff400000 rw-p 408 408 408 0 0 408 0 408 /opt/tomcat_sa/tomcat_cl4cds.jsa ff466000 rw-p 616 0 0 0 0 0 0 0 ff500000 rw-p 3072 3072 3072 0 0 3072 0 3072 /opt/tomcat_sa/tomcat_cl4cds.jsa ff800000 rw-p 8192 8192 8192 0 0 0 8192 8192 800000000 rwxp 16 16 16 0 0 0 16 16 /opt/tomcat_sa/tomcat_cl4cds.jsa 800004000 rw-p 22340 22340 22340 0 0 1640 20700 22016 /opt/tomcat_sa/tomcat_cl4cds.jsa 8015d5000 r--p 39320 39320 39320 0 0 39320 0 39320 /opt/tomcat_sa/tomcat_cl4cds.jsa 803c3b000 rw-p 8 8 8 0 0 0 8 8 /opt/tomcat_sa/tomcat_cl4cds.jsa 803c3d000 r--p 35840 35840 35840 0 0 35840 0 35840 /opt/tomcat_sa/tomcat_cl4cds.jsa 840000000 rw-p 3328 3204 3204 0 0 0 3204 3204 840340000 ---p 1045248 0 0 0 0 0 0 0 ======= ====== ====== ============ ============ ============= ============= ========== 3941460 280804 279958 1688 0 107056 172060 273556 KB 1993: /opt/jdk/bin/java -Djava.util.logging.config.file=/opt/apache-tomcat-9.0.2/conf/logging.properties -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Djdk.tls.ephemeralDHKeySize=2048 -Djava.protocol.han dler.pkgs=org.apache.catalina.webresources -Djava.security.egd=file:/dev/./urandom -Xint -Xmx64m -Xms64m -XX:+UseG1GC -Xshare:off -XX:+UseAppCDS -XX:+UnlockDiagnosticVMOptions -XX:SharedArchiveFile=/opt/tomcat_sa/tomcat_cl4cds .jsa -Dignore.endorsed.dirs= -classpath /opt/apache-tomcat-9.0.2/b Address Perm Size Rss Pss Shared_Clean Shared_Dirty Private_Clean Private_Dirty Referenced Mapping 00400000 r-xp 4 4 1 4 0 0 0 4 /opt/jdk/bin/java 00601000 r--p 4 4 4 0 0 0 4 4 /opt/jdk/bin/java 00602000 rw-p 4 4 4 0 0 0 4 4 /opt/jdk/bin/java 00603000 rw-p 132 104 104 0 0 0 104 56 [heap] fc000000 rw-p 74288 74228 74228 0 0 0 74228 74228 10088c000 ---p 1039824 0 0 0 0 0 0 0 ======= ====== ====== ============ ============ ============= ============= ========== 3880800 249176 230013 28300 0 3056 217820 237724 KB 5783: /opt/jdk/bin/java -Djava.util.logging.config.file=/opt/apache-tomcat-9.0.2/conf/logging.properties -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Djdk.tls.ephemeralDHKeySize=2048 -Djava.protocol.handler.pkgs=org.apache.catalina.webresources -Djava.security.egd=file:/dev/./urandom -Xint -Xmx64m -Xms64m -XX:+UseG1GC -Xshare:off -XX:+UseAppCDS -XX:+UnlockDiagnosticVMOptions -XX:SharedArchiveFile=/opt/tomcat_sa/tomcat_cl4cds.jsa -Dignore.endorsed.dirs= -classpath /opt/apache-tomcat-9.0.2/b Address Perm Size Rss Pss Shared_Clean Shared_Dirty Private_Clean Private_Dirty Referenced Mapping 00400000 r-xp 4 4 2 4 0 0 0 4 /opt/jdk/bin/java 00601000 r--p 4 4 4 0 0 0 4 4 /opt/jdk/bin/java 00602000 rw-p 4 4 4 0 0 0 4 0 /opt/jdk/bin/java 00603000 rw-p 132 56 56 0 0 0 56 56 [heap] fc000000 rw-p 74288 74220 74220 0 0 0 74220 74220 10088c000 ---p 1039824 0 0 0 0 0 0 0 ======= ====== ====== ============ ============ ============= ============= ========== 3880800 248004 233431 28300 0 3056 216648 243800 KB 5783: /opt/jdk/bin/java -Djava.util.logging.config.file=/opt/apache-tomcat-9.0.2/conf/logging.properties -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Djdk.tls.ephemeralDHKeySize=2048 -Djava.protocol.handler.pkgs=org.apache.catalina.webresources -Djava.security.egd=file:/dev/./urandom -Xint -Xmx64m -Xms64m -XX:+UseG1GC -Xshare:off -XX:+UseAppCDS -XX:+UnlockDiagnosticVMOptions -XX:SharedArchiveFile=/opt/tomcat_sa/tomcat_cl4cds.jsa -Dignore.endorsed.dirs= -classpath /opt/apache-tomcat-9.0.2/b Address Perm Size Rss Pss Shared_Clean Shared_Dirty Private_Clean Private_Dirty Referenced Mapping 00400000 r-xp 4 4 4 0 0 4 0 4 /opt/jdk/bin/java 00601000 r--p 4 4 4 0 0 0 4 4 /opt/jdk/bin/java 00602000 rw-p 4 4 4 0 0 0 4 0 /opt/jdk/bin/java 00603000 rw-p 132 56 56 0 0 0 56 56 [heap] fc000000 rw-p 74288 74220 74220 0 0 0 74220 74220 10088c000 ---p 1039824 0 0 0 0 0 0 0 ======= ====== ====== ============ ============ ============= ============= ========== 3880800 248004 247158 1688 0 29668 216648 243800 KB docker run -v /c/Users/D046063/public_html/hotspot/JBreak2018/git/CDS/examples:/examples -p 8090:8080 -i --rm -m 500m cds_demo_ojdk:latest /examples/tomcat_measure.sh 11 "-XX:TieredStopAtLevel=1 -XX:CICompilerCount=1 -Xmx64m -Xms64m -XX:+UseG1GC -Xshare:on -XX:+UseAppCDS -XX:+UnlockDiagnosticVMOptions -XX:SharedArchiveFile=/opt/tomcat_sa/tomcat_cl4cds.jsa" (17437+17334+17159+17232+17089+17245+17150+17072+17212+17396)/10 17232 docker run -v /c/Users/D046063/public_html/hotspot/JBreak2018/git/CDS/examples:/examples -p 8080:8080 -i --rm -m 500m cds_demo_ojdk:latest /examples/tomcat_measure.sh 11 "-XX:TieredStopAtLevel=1 -XX:CICompilerCount=1 -Xmx64m -Xms64m -XX:+UseG1GC -Xshare:off -XX:+UseAppCDS -XX:+UnlockDiagnosticVMOptions -XX:SharedArchiveFile=/opt/tomcat_sa/tomcat_cl4cds.jsa" (17577+19170+17816+17092+17901+17687+17351+17486+17768+17883)/10 17773 With Symbol and String sharing ------------------------------ CONTAINER CPU % MEM USAGE / LIMIT MEM % NET I/O BLOCK I/O PIDS 7b1e0fc0ec28 2.10% 156.3MiB / 500MiB 31.25% 7.13kB / 2.21kB 32.8kB / 840kB 0 22102: /opt/jdk/bin/java -Djava.util.logging.config.file=/opt/apache-tomcat-9.0.2/conf/logging.properties -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Djdk.tls.ephemeralDHKeySize=2048 -Djava.protocol.handler.pkgs=org.apache.catalina.webresources -Djava.security.egd=file:/dev/./urandom -Xint -Xmx64m -Xms64m -XX:+UseG1GC -Xshare:on -XX:+UseAppCDS -XX:+UnlockDiagnosticVMOptions -XX:SharedArchiveFile=/opt/tomcat_sa/tomcat_cl4cds.jsa -Dignore.endorsed.dirs= -classpath /opt/apache-tomcat-9.0.2/bi Address Perm Size Rss Pss Shared_Clean Shared_Dirty Private_Clean Private_Dirty Referenced Mapping 00400000 r-xp 4 4 4 0 0 4 0 4 /opt/jdk/bin/java 00601000 r--p 4 4 4 0 0 0 4 4 /opt/jdk/bin/java 00602000 rw-p 4 4 4 0 0 0 4 4 /opt/jdk/bin/java 00603000 rw-p 132 44 44 0 0 0 44 44 [heap] fc000000 rw-p 52224 52224 52224 0 0 0 52224 52224 ff300000 rw-p 172 172 172 0 0 24 148 172 /opt/tomcat_sa/tomcat_cl4cds.jsa ff32b000 rw-p 852 0 0 0 0 0 0 0 ff400000 rw-p 800 800 800 0 0 800 0 800 /opt/tomcat_sa/tomcat_cl4cds.jsa ff4c8000 rw-p 224 0 0 0 0 0 0 0 ff500000 rw-p 4096 4096 4096 0 0 4096 0 4096 /opt/tomcat_sa/tomcat_cl4cds.jsa ff900000 rw-p 7168 7168 7168 0 0 0 7168 7168 800000000 rwxp 16 16 16 0 0 0 16 16 /opt/tomcat_sa/tomcat_cl4cds.jsa 800004000 rw-p 22320 22320 22320 0 0 2052 20268 22320 /opt/tomcat_sa/tomcat_cl4cds.jsa 8015d0000 r--p 40600 40600 40600 0 0 40600 0 40600 /opt/tomcat_sa/tomcat_cl4cds.jsa 803d76000 rw-p 8 8 8 0 0 0 8 8 /opt/tomcat_sa/tomcat_cl4cds.jsa 803d78000 r--p 35816 35816 35816 0 0 35816 0 35816 /opt/tomcat_sa/tomcat_cl4cds.jsa 840000000 rw-p 3200 2888 2888 0 0 0 2888 2888 840320000 ---p 1045376 0 0 0 0 0 0 0 OpenJ9 Benchmarks ================= (1) docker run -v /c/Users/D046063/public_html/hotspot/JBreak2018/git/CDS/examples:/examples -p 8091:8080 -i -x-rm -m 500m cds_demo_oj9:latest /examples/tomcat_measure.sh 1 "-Xmx64m -Xms64m -Xscmx128m -Xshareclasses:cacheDir=/opt/tomcat_sa,name=tomcat,noaot,nojitdata,verbose -Xint -Xnoaot -Xnojit" (PID 3768) (2) docker run -v /c/Users/D046063/public_html/hotspot/JBreak2018/git/CDS/examples:/examples -p 8090:8080 -i -x-rm -m 500m cds_demo_oj9:latest /examples/tomcat_measure.sh 1 "-Xmx64m -Xms64m -Xscmx128m -Xshareclasses:cacheDir=/opt/tomcat_sa,name=tomcat,noaot,nojitdata,verbose -Xint -Xnoaot -Xnojit" (PID 5003) (3) docker run -v /c/Users/D046063/public_html/hotspot/JBreak2018/git/CDS/examples:/examples -p 8080:8080 -i -x-rm -m 500m cds_demo_oj9:latest /examples/tomcat_measure.sh 1 "-Xmx64m -Xms64m -Xscmx128m -Xshareclasses:none -Xint -Xnoaot -Xnojit" (PID 5386) CONTAINER CPU % MEM USAGE / LIMIT MEM % NET I/O BLOCK I/O PIDS 6d2e95e90154 1.53% 150.9MiB / 500MiB 30.18% 425kB / 6.77kB 28.7kB / 840kB 0 (3) 1e595c6d8bb4 2.13% 124.5MiB / 500MiB 24.89% 423kB / 6.07kB 53.2kB / 840kB 0 (2) 7d01485605be 2.17% 124.6MiB / 500MiB 24.93% 424kB / 6.4kB 0B / 840kB 0 (1) CONTAINER CPU % MEM USAGE / LIMIT MEM % NET I/O BLOCK I/O PIDS 6d2e95e90154 3.69% 155.6MiB / 500MiB 31.12% 425kB / 6.77kB 28.7kB / 840kB 0 1e595c6d8bb4 5.25% 129.3MiB / 500MiB 25.86% 424kB / 6.07kB 53.2kB / 840kB 0 7d01485605be 2.89% 129.2MiB / 500MiB 25.83% 424kB / 6.4kB 0B / 840kB 0 3768: /opt/jdk-9+181/bin/java -Djava.util.logging.config.file=/opt/apache-tomcat-9.0.2/conf/logging.properties -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Djdk.tls.ephemeralDHKeySize=2048 -Djava.protoc ol.handler.pkgs=org.apache.catalina.webresources -Djava.security.egd=file:/dev/./urandom -Xmx64m -Xms64m -Xscmx128m -Xshareclasses:cacheDir=/opt/tomcat_sa,name=tomcat,noaot,nojitdata,verbose -Xint -Xnoaot -Xnojit -Dignore.endo rsed.dirs= -classpath /opt/apache-tomcat-9.0.2/bin/bootstrap.jar:/ Address Perm Size Rss Pss Shared_Clean Shared_Dirty Private_Clean Private_Dirty Referenced Mapping 00400000 r-xp 4 4 1 4 0 0 0 4 /opt/jdk-9+181/bin/java 00601000 r--p 4 4 4 0 0 0 4 0 /opt/jdk-9+181/bin/java 00602000 rw-p 4 4 4 0 0 0 4 4 /opt/jdk-9+181/bin/java 00603000 rw-p 132 116 116 0 0 0 116 116 [heap] 00624000 rw-p 51200 24376 24376 0 0 0 24376 24256 [heap] 03824000 ---p 153600 0 0 0 0 0 0 0 fbff1000 ---p 60 0 0 0 0 0 0 0 fc000000 rw-p 65536 63488 63488 0 0 0 63488 63488 7fffde614000 rw-s 4 4 4 0 0 4 0 4 /opt/tomcat_sa/C290M5F1A64P_tomcat_G35 7fffde615000 r--s 29332 29332 29332 0 0 29332 0 29236 /opt/tomcat_sa/C290M5F1A64P_tomcat_G35 7fffe02ba000 rw-s 90992 0 0 0 0 0 0 0 /opt/tomcat_sa/C290M5F1A64P_tomcat_G35 7fffe5b96000 r--s 28 28 28 0 0 28 0 28 /opt/tomcat_sa/C290M5F1A64P_tomcat_G35 7fffe5b9d000 rw-s 8 8 8 0 0 8 0 8 /opt/tomcat_sa/C290M5F1A64P_tomcat_G35 7fffe5b9f000 r--s 4 4 4 0 0 4 0 4 /opt/tomcat_sa/C290M5F1A64P_tomcat_G35 7fffe5ba0000 rw-s 4 4 4 0 0 4 0 4 /opt/tomcat_sa/C290M5F1A64P_tomcat_G35 7fffe5ba1000 r--s 16 16 16 0 0 16 0 16 /opt/tomcat_sa/C290M5F1A64P_tomcat_G35 7fffe5ba5000 rw-s 12 12 12 0 0 12 0 12 /opt/tomcat_sa/C290M5F1A64P_tomcat_G35 7fffe5ba8000 r--s 8 8 8 0 0 8 0 8 /opt/tomcat_sa/C290M5F1A64P_tomcat_G35 7fffe5baa000 rw-s 4 4 4 0 0 4 0 4 /opt/tomcat_sa/C290M5F1A64P_tomcat_G35 7fffe5bab000 r--s 4 4 4 0 0 4 0 4 /opt/tomcat_sa/C290M5F1A64P_tomcat_G35 7fffe5bac000 rw-s 4 4 4 0 0 4 0 4 /opt/tomcat_sa/C290M5F1A64P_tomcat_G35 7fffe5bad000 r--s 24 24 24 0 0 24 0 24 /opt/tomcat_sa/C290M5F1A64P_tomcat_G35 7fffe5bb3000 rw-s 8 8 8 0 0 8 0 8 /opt/tomcat_sa/C290M5F1A64P_tomcat_G35 7fffe5bb5000 r--s 12 12 12 0 0 12 0 12 /opt/tomcat_sa/C290M5F1A64P_tomcat_G35 7fffe5bb8000 rw-s 4 4 4 0 0 4 0 4 /opt/tomcat_sa/C290M5F1A64P_tomcat_G35 7fffe5bb9000 r--s 12 12 12 0 0 12 0 12 /opt/tomcat_sa/C290M5F1A64P_tomcat_G35 7fffe5bbc000 rw-s 4 4 4 0 0 4 0 4 /opt/tomcat_sa/C290M5F1A64P_tomcat_G35 7fffe5bbd000 r--s 4 4 4 0 0 4 0 4 /opt/tomcat_sa/C290M5F1A64P_tomcat_G35 7fffe5bbe000 rw-s 4 4 4 0 0 4 0 4 /opt/tomcat_sa/C290M5F1A64P_tomcat_G35 7fffe5bbf000 r--s 44 44 44 0 0 44 0 44 /opt/tomcat_sa/C290M5F1A64P_tomcat_G35 7fffe5bca000 rw-s 4 4 4 0 0 4 0 4 /opt/tomcat_sa/C290M5F1A64P_tomcat_G35 7fffe5bcb000 r--s 20 20 20 0 0 20 0 20 /opt/tomcat_sa/C290M5F1A64P_tomcat_G35 7fffe5bd0000 rw-s 4 4 4 0 0 4 0 4 /opt/tomcat_sa/C290M5F1A64P_tomcat_G35 7fffe5bd1000 r--s 36 36 36 0 0 36 0 36 /opt/tomcat_sa/C290M5F1A64P_tomcat_G35 7fffe5bda000 rw-s 4 4 4 0 0 4 0 4 /opt/tomcat_sa/C290M5F1A64P_tomcat_G35 7fffe5bdb000 r--s 2132 2132 2132 0 0 2132 0 2132 /opt/tomcat_sa/C290M5F1A64P_tomcat_G35 7fffe5df0000 rw-s 5340 0 0 0 0 0 0 0 /opt/tomcat_sa/C290M5F1A64P_tomcat_G35 7fffe6327000 r--s 2996 2560 2560 0 0 2560 0 2560 /opt/tomcat_sa/C290M5F1A64P_tomcat_G35 7fffe6614000 r--s 138388 16304 5857 16304 0 0 0 16096 /opt/jdk-9+181/lib/modules 7fffeed39000 r-xp 100 64 21 64 0 0 0 64 /opt/jdk-9+181/lib/libjimage.so 7fffeed52000 ---p 2048 0 0 0 0 0 0 0 /opt/jdk-9+181/lib/libjimage.so 7fffeef52000 r--p 8 8 8 0 0 0 8 8 /opt/jdk-9+181/lib/libjimage.so 7fffeef54000 rw-p 4 4 4 0 0 0 4 4 /opt/jdk-9+181/lib/libjimage.so 7ffff77f5000 r-xp 1792 1696 343 1696 0 0 0 1696 /lib/x86_64-linux-gnu/libc-2.23.so 7ffff79b5000 ---p 2048 0 0 0 0 0 0 0 /lib/x86_64-linux-gnu/libc-2.23.so 7ffff7bb5000 r--p 16 16 16 0 0 0 16 16 /lib/x86_64-linux-gnu/libc-2.23.so 7ffff7bb9000 rw-p 8 8 8 0 0 0 8 8 /lib/x86_64-linux-gnu/libc-2.23.so 7ffff7bbb000 rw-p 16 16 16 0 0 0 16 16 7ffff7bbf000 r-xp 92 92 30 92 0 0 0 92 /opt/jdk-9+181/lib/jli/libjli.so 7ffff7bd6000 ---p 2044 0 0 0 0 0 0 0 /opt/jdk-9+181/lib/jli/libjli.so 7ffff7dd5000 r--p 4 4 4 0 0 0 4 4 /opt/jdk-9+181/lib/jli/libjli.so 7ffff7dd6000 rw-p 4 4 4 0 0 0 4 4 /opt/jdk-9+181/lib/jli/libjli.so ======= ====== ====== ============ ============ ============= ============= ========== 2722488 184164 167064 25956 0 34388 123820 181776 KB 5003: /opt/jdk-9+181/bin/java -Djava.util.logging.config.file=/opt/apache-tomcat-9.0.2/conf/logging.properties -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Djdk.tls.ephemeralDHKeySize=2048 -Djava.protocol.handler.pkgs=org.apache.catalina.webresources -Djava.security.egd=file:/dev/./urandom -Xmx64m -Xms64m -Xscmx128m -Xshareclasses:cacheDir=/opt/tomcat_sa,name=tomcat,noaot,nojitdata,verbose -Xint -Xnoaot -Xnojit -Dignore.endorsed.dirs= -classpath /opt/apache-tomcat-9.0.2/bin/bootstrap.jar:/ Address Perm Size Rss Pss Shared_Clean Shared_Dirty Private_Clean Private_Dirty Referenced Mapping 00400000 r-xp 4 4 1 4 0 0 0 4 /opt/jdk-9+181/bin/java 00601000 r--p 4 4 4 0 0 0 4 4 /opt/jdk-9+181/bin/java 00602000 rw-p 4 4 4 0 0 0 4 0 /opt/jdk-9+181/bin/java 00603000 rw-p 132 28 28 0 0 0 28 28 [heap] 00624000 rw-p 51200 24376 24376 0 0 0 24376 24320 [heap] 03824000 ---p 153600 0 0 0 0 0 0 0 fbff1000 ---p 60 0 0 0 0 0 0 0 fc000000 rw-p 65536 63488 63488 0 0 0 63488 63488 7fffde614000 rw-s 4 4 4 0 0 4 0 4 /opt/tomcat_sa/C290M5F1A64P_tomcat_G35 7fffde615000 r--s 29332 29332 29332 0 0 29332 0 29236 /opt/tomcat_sa/C290M5F1A64P_tomcat_G35 7fffe02ba000 rw-s 90992 0 0 0 0 0 0 0 /opt/tomcat_sa/C290M5F1A64P_tomcat_G35 7fffe5b96000 r--s 28 28 28 0 0 28 0 28 /opt/tomcat_sa/C290M5F1A64P_tomcat_G35 7fffe5b9d000 rw-s 8 8 8 0 0 8 0 8 /opt/tomcat_sa/C290M5F1A64P_tomcat_G35 7fffe5b9f000 r--s 4 4 4 0 0 4 0 4 /opt/tomcat_sa/C290M5F1A64P_tomcat_G35 7fffe5ba0000 rw-s 4 4 4 0 0 4 0 4 /opt/tomcat_sa/C290M5F1A64P_tomcat_G35 7fffe5ba1000 r--s 16 16 16 0 0 16 0 16 /opt/tomcat_sa/C290M5F1A64P_tomcat_G35 7fffe5ba5000 rw-s 12 12 12 0 0 12 0 12 /opt/tomcat_sa/C290M5F1A64P_tomcat_G35 7fffe5ba8000 r--s 8 8 8 0 0 8 0 8 /opt/tomcat_sa/C290M5F1A64P_tomcat_G35 7fffe5baa000 rw-s 4 4 4 0 0 4 0 4 /opt/tomcat_sa/C290M5F1A64P_tomcat_G35 7fffe5bab000 r--s 4 4 4 0 0 4 0 4 /opt/tomcat_sa/C290M5F1A64P_tomcat_G35 7fffe5bac000 rw-s 4 4 4 0 0 4 0 4 /opt/tomcat_sa/C290M5F1A64P_tomcat_G35 7fffe5bad000 r--s 24 24 24 0 0 24 0 24 /opt/tomcat_sa/C290M5F1A64P_tomcat_G35 7fffe5bb3000 rw-s 8 8 8 0 0 8 0 8 /opt/tomcat_sa/C290M5F1A64P_tomcat_G35 7fffe5bb5000 r--s 12 12 12 0 0 12 0 12 /opt/tomcat_sa/C290M5F1A64P_tomcat_G35 7fffe5bb8000 rw-s 4 4 4 0 0 4 0 4 /opt/tomcat_sa/C290M5F1A64P_tomcat_G35 7fffe5bb9000 r--s 12 12 12 0 0 12 0 12 /opt/tomcat_sa/C290M5F1A64P_tomcat_G35 7fffe5bbc000 rw-s 4 4 4 0 0 4 0 4 /opt/tomcat_sa/C290M5F1A64P_tomcat_G35 7fffe5bbd000 r--s 4 4 4 0 0 4 0 4 /opt/tomcat_sa/C290M5F1A64P_tomcat_G35 7fffe5bbe000 rw-s 4 4 4 0 0 4 0 4 /opt/tomcat_sa/C290M5F1A64P_tomcat_G35 7fffe5bbf000 r--s 44 44 44 0 0 44 0 44 /opt/tomcat_sa/C290M5F1A64P_tomcat_G35 7fffe5bca000 rw-s 4 4 4 0 0 4 0 4 /opt/tomcat_sa/C290M5F1A64P_tomcat_G35 7fffe5bcb000 r--s 20 20 20 0 0 20 0 20 /opt/tomcat_sa/C290M5F1A64P_tomcat_G35 7fffe5bd0000 rw-s 4 4 4 0 0 4 0 4 /opt/tomcat_sa/C290M5F1A64P_tomcat_G35 7fffe5bd1000 r--s 36 36 36 0 0 36 0 36 /opt/tomcat_sa/C290M5F1A64P_tomcat_G35 7fffe5bda000 rw-s 4 4 4 0 0 4 0 4 /opt/tomcat_sa/C290M5F1A64P_tomcat_G35 7fffe5bdb000 r--s 2132 2132 2132 0 0 2132 0 2132 /opt/tomcat_sa/C290M5F1A64P_tomcat_G35 7fffe5df0000 rw-s 5340 0 0 0 0 0 0 0 /opt/tomcat_sa/C290M5F1A64P_tomcat_G35 7fffe6614000 r--s 138388 16304 5857 16304 0 0 0 16060 /opt/jdk-9+181/lib/modules 7fffeed39000 r-xp 100 64 21 64 0 0 0 64 /opt/jdk-9+181/lib/libjimage.so 7fffeed52000 ---p 2048 0 0 0 0 0 0 0 /opt/jdk-9+181/lib/libjimage.so 7fffeef52000 r--p 8 8 8 0 0 0 8 8 /opt/jdk-9+181/lib/libjimage.so 7fffeef54000 rw-p 4 4 4 0 0 0 4 4 /opt/jdk-9+181/lib/libjimage.so 7ffff77f5000 r-xp 1792 1696 343 1696 0 0 0 1696 /lib/x86_64-linux-gnu/libc-2.23.so 7ffff79b5000 ---p 2048 0 0 0 0 0 0 0 /lib/x86_64-linux-gnu/libc-2.23.so 7ffff7bb5000 r--p 16 16 16 0 0 0 16 12 /lib/x86_64-linux-gnu/libc-2.23.so 7ffff7bb9000 rw-p 8 8 8 0 0 0 8 8 /lib/x86_64-linux-gnu/libc-2.23.so 7ffff7bbb000 rw-p 16 16 16 0 0 0 16 16 7ffff7bbf000 r-xp 92 92 30 92 0 0 0 92 /opt/jdk-9+181/lib/jli/libjli.so 7ffff7bd6000 ---p 2044 0 0 0 0 0 0 0 /opt/jdk-9+181/lib/jli/libjli.so 7ffff7dd5000 r--p 4 4 4 0 0 0 4 4 /opt/jdk-9+181/lib/jli/libjli.so 7ffff7dd6000 rw-p 4 4 4 0 0 0 4 4 /opt/jdk-9+181/lib/jli/libjli.so ======= ====== ====== ============ ============ ============= ============= ========== 2722488 184296 167196 25956 0 34388 123952 181460 KB 5386: /opt/jdk-9+181/bin/java -Djava.util.logging.config.file=/opt/apache-tomcat-9.0.2/conf/logging.properties -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Djdk.tls.ephemeralDHKeySize=2048 -Djava.protocol.handler.pkgs=org.apache.catalina.webresources -Djava.security.egd=file:/dev/./urandom -Xmx64m -Xms64m -Xscmx128m -Xshareclasses:none -Xint -Xnoaot -Xnojit -Dignore.endorsed.dirs= -classpath /opt/apache-tomcat-9.0.2/bin/boot strap.jar:/opt/apache-tomcat-9.0.2/bin/tomcat-juli.jar -Dcatalina. Address Perm Size Rss Pss Shared_Clean Shared_Dirty Private_Clean Private_Dirty Referenced Mapping 00400000 r-xp 4 4 1 4 0 0 0 4 /opt/jdk-9+181/bin/java 00601000 r--p 4 4 4 0 0 0 4 4 /opt/jdk-9+181/bin/java 00602000 rw-p 4 4 4 0 0 0 4 4 /opt/jdk-9+181/bin/java 00603000 rw-p 132 80 80 0 0 0 80 60 [heap] 00624000 rw-p 51200 24368 24368 0 0 0 24368 24280 [heap] 03824000 ---p 153600 0 0 0 0 0 0 0 fbff1000 ---p 60 0 0 0 0 0 0 0 fc000000 rw-p 65536 63488 63488 0 0 0 63488 63488 ======= ====== ====== ============ ============ ============= ============= ========== 2587408 177772 162206 22888 0 3100 151784 173512 KB After killing 5003 and 5386: 3768: /opt/jdk-9+181/bin/java -Djava.util.logging.config.file=/opt/apache-tomcat-9.0.2/conf/logging.properties -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Djdk.tls.ephemeralDHKeySize=2048 -Djava.protocol.handler.pkgs=org.apache.catalina.webresources -Djava.security.egd=file:/dev/./urandom -Xmx64m -Xms64m -Xscmx128m -Xshareclasses:cacheDir=/opt/tomcat_sa,name=tomcat,noaot,nojitdata,verbose -Xint -Xnoaot -Xnojit -Dignore.endorsed.dirs= -classpath /opt/apache-tomcat-9.0.2/bin/bootstrap.jar:/ Address Perm Size Rss Pss Shared_Clean Shared_Dirty Private_Clean Private_Dirty Referenced Mapping 00400000 r-xp 4 4 4 0 0 4 0 4 /opt/jdk-9+181/bin/java 00601000 r--p 4 4 4 0 0 0 4 0 /opt/jdk-9+181/bin/java 00602000 rw-p 4 4 4 0 0 0 4 4 /opt/jdk-9+181/bin/java 00603000 rw-p 132 116 116 0 0 0 116 116 [heap] 00624000 rw-p 51200 24376 24376 0 0 0 24376 24236 [heap] 03824000 ---p 153600 0 0 0 0 0 0 0 fbff1000 ---p 60 0 0 0 0 0 0 0 fc000000 rw-p 65536 63488 63488 0 0 0 63488 63488 7fffde614000 rw-s 4 4 4 0 0 4 0 4 /opt/tomcat_sa/C290M5F1A64P_tomcat_G35 7fffde615000 r--s 29332 29332 29332 0 0 29332 0 29224 /opt/tomcat_sa/C290M5F1A64P_tomcat_G35 7fffe02ba000 rw-s 90992 0 0 0 0 0 0 0 /opt/tomcat_sa/C290M5F1A64P_tomcat_G35 7fffe5b96000 r--s 28 28 28 0 0 28 0 28 /opt/tomcat_sa/C290M5F1A64P_tomcat_G35 7fffe5b9d000 rw-s 8 8 8 0 0 8 0 8 /opt/tomcat_sa/C290M5F1A64P_tomcat_G35 7fffe5b9f000 r--s 4 4 4 0 0 4 0 4 /opt/tomcat_sa/C290M5F1A64P_tomcat_G35 7fffe5ba0000 rw-s 4 4 4 0 0 4 0 4 /opt/tomcat_sa/C290M5F1A64P_tomcat_G35 7fffe5ba1000 r--s 16 16 16 0 0 16 0 16 /opt/tomcat_sa/C290M5F1A64P_tomcat_G35 7fffe5ba5000 rw-s 12 12 12 0 0 12 0 12 /opt/tomcat_sa/C290M5F1A64P_tomcat_G35 7fffe5ba8000 r--s 8 8 8 0 0 8 0 8 /opt/tomcat_sa/C290M5F1A64P_tomcat_G35 7fffe5baa000 rw-s 4 4 4 0 0 4 0 4 /opt/tomcat_sa/C290M5F1A64P_tomcat_G35 7fffe5bab000 r--s 4 4 4 0 0 4 0 4 /opt/tomcat_sa/C290M5F1A64P_tomcat_G35 7fffe5bac000 rw-s 4 4 4 0 0 4 0 4 /opt/tomcat_sa/C290M5F1A64P_tomcat_G35 7fffe5bad000 r--s 24 24 24 0 0 24 0 24 /opt/tomcat_sa/C290M5F1A64P_tomcat_G35 7fffe5bb3000 rw-s 8 8 8 0 0 8 0 8 /opt/tomcat_sa/C290M5F1A64P_tomcat_G35 7fffe5bb5000 r--s 12 12 12 0 0 12 0 12 /opt/tomcat_sa/C290M5F1A64P_tomcat_G35 7fffe5bb8000 rw-s 4 4 4 0 0 4 0 4 /opt/tomcat_sa/C290M5F1A64P_tomcat_G35 7fffe5bb9000 r--s 12 12 12 0 0 12 0 12 /opt/tomcat_sa/C290M5F1A64P_tomcat_G35 7fffe5bbc000 rw-s 4 4 4 0 0 4 0 4 /opt/tomcat_sa/C290M5F1A64P_tomcat_G35 7fffe5bbd000 r--s 4 4 4 0 0 4 0 4 /opt/tomcat_sa/C290M5F1A64P_tomcat_G35 7fffe5bbe000 rw-s 4 4 4 0 0 4 0 4 /opt/tomcat_sa/C290M5F1A64P_tomcat_G35 7fffe5bbf000 r--s 44 44 44 0 0 44 0 44 /opt/tomcat_sa/C290M5F1A64P_tomcat_G35 7fffe5bca000 rw-s 4 4 4 0 0 4 0 4 /opt/tomcat_sa/C290M5F1A64P_tomcat_G35 7fffe5bcb000 r--s 20 20 20 0 0 20 0 20 /opt/tomcat_sa/C290M5F1A64P_tomcat_G35 7fffe5bd0000 rw-s 4 4 4 0 0 4 0 4 /opt/tomcat_sa/C290M5F1A64P_tomcat_G35 7fffe5bd1000 r--s 36 36 36 0 0 36 0 36 /opt/tomcat_sa/C290M5F1A64P_tomcat_G35 7fffe5bda000 rw-s 4 4 4 0 0 4 0 4 /opt/tomcat_sa/C290M5F1A64P_tomcat_G35 7fffe5bdb000 r--s 2132 2132 2132 0 0 2132 0 2132 /opt/tomcat_sa/C290M5F1A64P_tomcat_G35 7fffe5df0000 rw-s 5340 0 0 0 0 0 0 0 /opt/tomcat_sa/C290M5F1A64P_tomcat_G35 7fffe6327000 r--s 2996 2560 2560 0 0 2560 0 2560 /opt/tomcat_sa/C290M5F1A64P_tomcat_G35 7fffe6614000 r--s 138388 16304 16304 0 0 16304 0 16004 /opt/jdk-9+181/lib/modules 7fffeed39000 r-xp 100 64 64 0 0 64 0 64 /opt/jdk-9+181/lib/libjimage.so 7fffeed52000 ---p 2048 0 0 0 0 0 0 0 /opt/jdk-9+181/lib/libjimage.so 7fffeef52000 r--p 8 8 8 0 0 0 8 8 /opt/jdk-9+181/lib/libjimage.so 7fffeef54000 rw-p 4 4 4 0 0 0 4 4 /opt/jdk-9+181/lib/libjimage.so 7ffff77f5000 r-xp 1792 1696 1030 1332 0 364 0 1696 /lib/x86_64-linux-gnu/libc-2.23.so 7ffff79b5000 ---p 2048 0 0 0 0 0 0 0 /lib/x86_64-linux-gnu/libc-2.23.so 7ffff7bb5000 r--p 16 16 16 0 0 0 16 16 /lib/x86_64-linux-gnu/libc-2.23.so 7ffff7bb9000 rw-p 8 8 8 0 0 0 8 8 /lib/x86_64-linux-gnu/libc-2.23.so 7ffff7bbb000 rw-p 16 16 16 0 0 0 16 16 7ffff7bbf000 r-xp 92 92 92 0 0 92 0 92 /opt/jdk-9+181/lib/jli/libjli.so 7ffff7bd6000 ---p 2044 0 0 0 0 0 0 0 /opt/jdk-9+181/lib/jli/libjli.so 7ffff7dd5000 r--p 4 4 4 0 0 0 4 4 /opt/jdk-9+181/lib/jli/libjli.so 7ffff7dd6000 rw-p 4 4 4 0 0 0 4 4 /opt/jdk-9+181/lib/jli/libjli.so ======= ====== ====== ============ ============ ============= ============= ========== 2722488 186084 185240 1684 0 58660 125740 183452 KB docker run -v /c/Users/D046063/public_html/hotspot/JBreak2018/git/CDS/examples:/examples -p 8091:8080 -i --rm -m 500m cds_demo_oj9:latest /examples/tomcat_measure.sh 11 "-Xquickstart -Xmx64m -Xms64m -Xscmx128m -Xshareclasses:cacheDir=/opt/tomcat_sa,name=tomcat,noaot,nojitdata,verbose -Xnoaot" (18654+18884+18887+18697+17852+18508+19411+19153+18242+18518)/10 18680 docker run -v /c/Users/D046063/public_html/hotspot/JBreak2018/git/CDS/examples:/examples -p 8091:8080 -i --rm -m 500m cds_demo_oj9:latest /examples/tomcat_measure.sh 11 "-Xquickstart -Xmx64m -Xms64m -Xscmx128m -Xshareclasses:none -Xnoaot" (19250+18684+18427+18868+18501+18133+18339+17942+18473+19185)/10 18580 cat /sys/fs/cgroup/memory/docker/72ea9bf5ec4bb653ed42378099b2cdbef723f204d62222e3cb9705728d58702a/memory.stat curl -x-unix-socket /var/run/docker.sock http://docker/containers/72ea9bf5ec4b/stats?stream=false docker stats -x-no-stream CONTAINER CPU % MEM USAGE / LIMIT MEM % NET I/O BLOCK I/O PIDS 72ea9bf5ec4b 0.94% 215.1MiB / 500MiB 43.01% 427kB / 6.92kB 868kB / 840kB 0 "-Xquickstart -Xmx64m -Xms64m -Xscmx128m -Xshareclasses:cacheDir=/tmp/xxx,name=tomcat,noaot,nojitdata,verbose -Xnoaot" Create OpenJ9 jimage: ===================== /share/software/Java/openJ9_jdk9-b181/bin/jlink -x-module-path /share/software/Java/openJ9_jdk9-b181/jmods -x-add-modules java.instrument,java.management,java.naming,java.security.jgss,java.sql,java.xml.ws -x-strip-debug -x-compress=2 -x-output /tmp/oj9 mv /tmp/oj9/lib/server /tmp/oj9/lib/j9vm cp /share/software/Java/openJ9_jdk9-b181/lib/compressedrefs/lib* /tmp/oj9/lib/ simonis@simonis:/tmp$ JAVA_HOME=/share/software/Java/openJ9_jdk9-b181 /c/Users/D046063/public_html/hotspot/JBreak2018/git/CDS/examples/tomcat_measure.sh 5 "-Xquickstart -Xmx64m -Xms64m" 19-Feb-2018 11:53:03.824 INFO [main] org.apache.catalina.startup.Catalina.start Server startup in 16099 ms 2963224 212184 200569 KB 19-Feb-2018 11:53:22.442 INFO [main] org.apache.catalina.startup.Catalina.start Server startup in 16608 ms 2948560 199180 189485 KB 19-Feb-2018 11:53:41.380 INFO [main] org.apache.catalina.startup.Catalina.start Server startup in 16531 ms 2949080 196952 187257 KB 19-Feb-2018 11:54:00.408 INFO [main] org.apache.catalina.startup.Catalina.start Server startup in 16589 ms 2932440 196628 186933 KB 19-Feb-2018 11:54:19.104 INFO [main] org.apache.catalina.startup.Catalina.start Server startup in 16196 ms 2932700 196548 186853 KB simonis@simonis:/tmp$ JAVA_HOME=/share/software/Java/openJ9_jdk9-b181 /c/Users/D046063/public_html/hotspot/JBreak2018/git/CDS/examples/tomcat_measure.sh 5 "-Xquickstart -Xmx64m -Xms64m" 19-Feb-2018 14:18:58.598 INFO [main] org.apache.catalina.startup.Catalina.start Server startup in 16784 ms 2932176 196832 187094 KB 19-Feb-2018 14:19:16.927 INFO [main] org.apache.catalina.startup.Catalina.start Server startup in 16113 ms 2932696 196736 186998 KB 19-Feb-2018 14:19:36.479 INFO [main] org.apache.catalina.startup.Catalina.start Server startup in 16719 ms 2948564 200324 190586 KB 19-Feb-2018 14:19:55.444 INFO [main] org.apache.catalina.startup.Catalina.start Server startup in 16763 ms 2948564 203256 193628 KB 19-Feb-2018 14:20:13.889 INFO [main] org.apache.catalina.startup.Catalina.start Server startup in 16301 ms 2932700 196796 187168 KB simonis@simonis:/tmp$ JAVA_HOME=/share/software/Java/openJ9_jdk9-b181 /c/Users/D046063/public_html/hotspot/JBreak2018/git/CDS/examples/tomcat_measure.sh 5 "-Xquickstart -Xmx64m -Xms64m -Xscmx256m -Xshareclasses:verbose -Xshareclasses:noaot -Xshareclasses:nojitdata" 19-Feb-2018 14:25:16.751 INFO [main] org.apache.catalina.startup.Catalina.start Server startup in 19371 ms 3225312 237000 227246 KB 19-Feb-2018 14:25:33.059 INFO [main] org.apache.catalina.startup.Catalina.start Server startup in 14591 ms 3206636 225172 215418 KB 19-Feb-2018 14:25:49.733 INFO [main] org.apache.catalina.startup.Catalina.start Server startup in 14296 ms 3223544 226944 217306 KB 19-Feb-2018 14:26:06.749 INFO [main] org.apache.catalina.startup.Catalina.start Server startup in 14455 ms 3222764 237044 227286 KB 19-Feb-2018 14:26:21.943 INFO [main] org.apache.catalina.startup.Catalina.start Server startup in 13592 ms 3206640 225888 216137 KB simonis@simonis:/tmp$ JAVA_HOME=/share/software/Java/openJ9_jdk9-b181 /c/Users/D046063/public_html/hotspot/JBreak2018/git/CDS/examples/tomcat_measure.sh 5 "-Xquickstart -Xmx64m -Xms64m -Xscmx256m -Xshareclasses:verbose -Xshareclasses:noaot -Xshareclasses:nojitdata" 19-Feb-2018 14:26:49.003 INFO [main] org.apache.catalina.startup.Catalina.start Server startup in 13686 ms 3206636 226688 217050 KB 19-Feb-2018 14:27:05.188 INFO [main] org.apache.catalina.startup.Catalina.start Server startup in 13702 ms 3206636 227920 218184 KB 19-Feb-2018 14:27:21.027 INFO [main] org.apache.catalina.startup.Catalina.start Server startup in 13482 ms 3206636 230304 220691 KB 19-Feb-2018 14:27:37.104 INFO [main] org.apache.catalina.startup.Catalina.start Server startup in 13646 ms 3206640 229184 219525 KB 19-Feb-2018 14:27:53.062 INFO [main] org.apache.catalina.startup.Catalina.start Server startup in 13517 ms 3207160 231864 222213 KB simonis@simonis:/tmp$ JAVA_HOME=/share/software/Java/openJ9_jdk9-b181 /c/Users/D046063/public_html/hotspot/JBreak2018/git/CDS/examples/tomcat_measure.sh 5 "-Xquickstart -Xmx64m -Xms64m -Xscmx256m -Xshareclasses:verbose -Xshareclasses:noaot -Xshareclasses:nojitdata" 19-Feb-2018 14:29:30.032 INFO [main] org.apache.catalina.startup.Catalina.start Server startup in 13798 ms 3206636 233044 223311 KB 19-Feb-2018 14:29:46.330 INFO [main] org.apache.catalina.startup.Catalina.start Server startup in 13784 ms 3223020 243312 233674 KB 19-Feb-2018 14:30:02.132 INFO [main] org.apache.catalina.startup.Catalina.start Server startup in 13606 ms 3223020 244496 234837 KB 19-Feb-2018 14:30:17.984 INFO [main] org.apache.catalina.startup.Catalina.start Server startup in 13362 ms 3207160 237320 227555 KB 19-Feb-2018 14:30:34.549 INFO [main] org.apache.catalina.startup.Catalina.start Server startup in 14034 ms 3222764 239712 229968 KB simonis@simonis:/tmp$ JAVA_HOME=/share/software/Java/openJ9_jdk9-b181 /c/Users/D046063/public_html/hotspot/JBreak2018/git/CDS/examples/tomcat_measure.sh 5 "-Xquickstart -Xmx64m -Xms64m -Xscmx256m -Xshareclasses:verbose -Xshareclasses:noaot -Xshareclasses:nojitdata -Xnoaot" 19-Feb-2018 14:36:24.340 INFO [main] org.apache.catalina.startup.Catalina.start Server startup in 16621 ms 3203052 231264 221643 KB 19-Feb-2018 14:36:43.364 INFO [main] org.apache.catalina.startup.Catalina.start Server startup in 16409 ms 3219436 241256 231635 KB 19-Feb-2018 14:37:02.522 INFO [main] org.apache.catalina.startup.Catalina.start Server startup in 16651 ms 3219436 232380 222759 KB 19-Feb-2018 14:37:21.444 INFO [main] org.apache.catalina.startup.Catalina.start Server startup in 16566 ms 3219436 233212 223591 KB 19-Feb-2018 14:37:40.325 INFO [main] org.apache.catalina.startup.Catalina.start Server startup in 16518 ms 3234360 235804 224252 KB simonis@simonis:/tmp$ JAVA_HOME=/share/software/Java/openJ9_jdk9-b181 /c/Users/D046063/public_html/hotspot/JBreak2018/git/CDS/examples/tomcat_measure.sh 5 "-Xquickstart -Xmx64m -Xms64m -Xscmx256m -Xshareclasses:verbose -Xshareclasses:noaot -Xshareclasses:nojitdata -Xnoaot" 19-Feb-2018 14:38:12.367 INFO [main] org.apache.catalina.startup.Catalina.start Server startup in 16644 ms 3219436 236060 226447 KB 19-Feb-2018 14:38:31.562 INFO [main] org.apache.catalina.startup.Catalina.start Server startup in 16726 ms 3218916 241380 231759 KB 19-Feb-2018 14:38:50.429 INFO [main] org.apache.catalina.startup.Catalina.start Server startup in 16718 ms 3202532 235012 225399 KB 19-Feb-2018 14:39:09.394 INFO [main] org.apache.catalina.startup.Catalina.start Server startup in 16766 ms 3217456 237232 225680 KB 19-Feb-2018 14:39:28.338 INFO [main] org.apache.catalina.startup.Catalina.start Server startup in 16745 ms 3204076 238464 228843 KB Skipping java.lang.invoke.BoundMethodHandle$Species_LII from __JVM_DefineClass__ - reason: dynamically generated class Skipping jdk.internal.reflect.GeneratedMethodAccessor1 from __JVM_DefineClass__ - reason: dynamically generated class Skipping com.sun.proxy.$Proxy0 from __JVM_DefineClass__ - reason: dynamically generated class Skipping org.slf4j.Logger from /share/software/Java/apache-tomcat-9.0.2/webapps/ngrinder-controller-3.4.1/WEB-INF/lib/slf4j-api-1.6.4.jar - reason: class is pre 1.5 Skipping org.ngrinder.infra.spring.Redirect404DispatcherServlet from /share/software/Java/apache-tomcat-9.0.2/webapps/ngrinder-controller-3.4.1/WEB-INF/classes/ - reason: loaded from class file (try '-Dio.simonis.cl4cds.dumpFromClassFile=true') Skipping org.slf4j.impl.StaticLoggerBinder from /share/software/Java/apache-tomcat-9.0.2/webapps/ngrinder-controller-3.4.1/WEB-INF/lib/logback-classic-1.0.0.jar - reason: failed dependencies $ /c/Users/D046063/public_html/hotspot/JBreak2018/git/CDS/examples/tomcat_measure.sh 5 16-Feb-2018 14:38:34.851 INFO [main] org.apache.catalina.startup.Catalina.start Server startup in 18840 ms 5989256 572544 563985 KB 16-Feb-2018 14:39:16.051 INFO [main] org.apache.catalina.startup.Catalina.start Server startup in 19467 ms 6002124 599876 589484 KB 16-Feb-2018 14:39:55.655 INFO [main] org.apache.catalina.startup.Catalina.start Server startup in 18411 ms 5989256 600472 592014 KB 16-Feb-2018 14:40:35.948 INFO [main] org.apache.catalina.startup.Catalina.start Server startup in 18142 ms 5991312 622492 613929 KB 16-Feb-2018 14:41:17.925 INFO [main] org.apache.catalina.startup.Catalina.start Server startup in 19419 ms 5985144 665980 657421 KB 16-Feb-2018 14:43:02.200 INFO [main] org.apache.catalina.startup.Catalina.start Server startup in 18407 ms 5990280 627868 619305 KB 16-Feb-2018 14:43:43.513 INFO [main] org.apache.catalina.startup.Catalina.start Server startup in 19007 ms 5988228 625600 617037 KB 16-Feb-2018 14:44:24.130 INFO [main] org.apache.catalina.startup.Catalina.start Server startup in 19071 ms 5989256 636224 627665 KB 16-Feb-2018 14:45:04.853 INFO [main] org.apache.catalina.startup.Catalina.start Server startup in 19093 ms 6004180 676396 666004 KB 16-Feb-2018 14:45:44.603 INFO [main] org.apache.catalina.startup.Catalina.start Server startup in 18317 ms 6006236 560472 550080 KB $ /c/Users/D046063/public_html/hotspot/JBreak2018/git/CDS/examples/tomcat_measure.sh 5 "-Xshare:on -XX:+UseAppCDS -XX:+UnlockDiagnosticVMOptions -XX:SharedArchiveFile=/tmp/tomcat_cl4cds.jsa" 16-Feb-2018 14:50:45.985 INFO [main] org.apache.catalina.startup.Catalina.start Server startup in 17953 ms 6043244 623932 615501 KB 16-Feb-2018 14:51:26.752 INFO [main] org.apache.catalina.startup.Catalina.start Server startup in 18501 ms 6044272 658360 649929 KB 16-Feb-2018 14:52:06.598 INFO [main] org.apache.catalina.startup.Catalina.start Server startup in 17723 ms 6045300 573684 565253 KB 16-Feb-2018 14:52:46.966 INFO [main] org.apache.catalina.startup.Catalina.start Server startup in 17462 ms 6045300 619712 611281 KB 16-Feb-2018 14:53:27.908 INFO [main] org.apache.catalina.startup.Catalina.start Server startup in 17738 ms 6044272 628384 619953 KB pmap - - read-rc-from=/c/Users/D046063/public_html/hotspot/FOSDEM2018/git/examples/pmap_slides.rc `pgrep -f tomcat`| less CATALINA_OPTS="-Djava.security.edg=file:/dev/./urandom" $CATALINA_HOME/bin/catalina.sh start 16-Feb-2018 11:04:09.878 INFO [main] org.apache.catalina.startup.Catalina.start Server startup in 19368 ms 16-Feb-2018 11:09:11.988 INFO [main] org.apache.catalina.startup.Catalina.start Server startup in 19600 ms Address Perm Size Rss Pss Mapping 5996964 642776 638454 KB 5989768 578628 574310 KB

Sharing additional Strings and Symbols

Create the SharedArchiveConfigFile

              
$ jcmd `pgrep -f tomcat` VM.stringtable -verbose                   
1619:
VERSION: 1.1
23: java.nio.file.attribute                            
16: javax.swing.plaf                                   
...                                                    
$ jcmd `pgrep -f tomcat` VM.symboltable -verbose
1619:
VERSION: 1.0
34 2: Ljava/util/List<Ljava/net/Proxy;>;               
9 -1: java.net.                                        
...                                                    
              
            
              
$ vi string_symbol.cfg
VERSION: 1.0                                                       
@SECTION: String
<output of jcmd VM.stringtable>
@SECTION: Symbol
<output of jcmd VM.symboltable>
              
            

Using the SharedArchiveConfigFile

              
$ CATALINA_OPTS="-Xshare:dump -XX:+UseAppCDS \
                 -XX:SharedClassListFile=tomcat_cl4cds.cls \
                 -XX:+UnlockDiagnosticVMOptions \
                 -XX:SharedArchiveFile=tomcat_cl4cds.jsa" \
  catalina.sh start
$ ll tomcat_cl4cds.jsa
-r--r----- 1 102.305.792 Feb  3 01:48 tomcat_cl4cds.jsa
$ CATALINA_OPTS="-Xshare:dump -XX:+UseAppCDS \
                 -XX:SharedClassListFile=tomcat_cl4cds.cls \
                 -XX:SharedArchiveConfigFile=string_symbol.cfg \
                 -XX:+UnlockDiagnosticVMOptions \
                 -XX:SharedArchiveFile=tomcat_cl4cds.jsa" \
  catalina.sh start
$ ll tomcat_cl4cds.jsa
-r--r----- 1 106.323.968 Mär  2 13:15 tomcat_cl4cds.jsa
              
            
JDK-8179302 Pre-resolve constant pool string entries and cache resolved_reference arrays in CDS archive https://bugs.openjdk.java.net/browse/JDK-8179302 JDK-8134448 Document XX:SharedArchiveConfigFile=shared_input_file https://bugs.openjdk.java.net/browse/JDK-8134448 JDK-8015086 add interned strings to the shared archive https://bugs.openjdk.java.net/browse/JDK-8015086 JDK-8059510 Compact symbol table layout inside shared archive https://bugs.openjdk.java.net/browse/JDK-8059510 http://openjdk.java.net/jeps/250 JDK-8059092 JEP 250: Store Interned Strings in CDS Archives https://bugs.openjdk.java.net/browse/JDK-8059092 https://docs.oracle.com/javase/9/tools/java.htm#JSWOR-GUID-31503FCE-93D0-4175-9B4F-F6A738B2F4C4 Sharing a Shared Archive Across Multiple Application Processes You can share the same archive file across multiple applications processes. This reduces memory usage because the archive is memory-mapped into the address space of the processes. The operating system automatically shares the read-only pages across these processes. The following steps demonstrate how to create a common archive that can be shared by different applications. Only the classes from common.jar are archived in the common.jsa (step 3). Classes from hello.jar and hi.jar are not archived in this particular example because they are not in the -cp path during the archiving step (step 3). To include classes from hello.jar and hi.jar, the .jar files must be added to the -cp path. Create a list of all classes used by the Hello application and another list for the Hi application: java -XX:+UnlockCommercialFeatures -XX:DumpLoadedClassList=hello.classlist -XX:+UseAppCDS -cp common.jar:hello.jar Hello java -XX:+UnlockCommercialFeatures -XX:DumpLoadedClassList=hi.classlist -XX:+UseAppCDS -cp common.jar:hi.jar Hi Create a single list of classes used by all the applications that will share the shared archive file. Oracle Solaris, Linux, and OS X:: The following commands combine the files hello.classlist and hi.classlist into one file, common.classlist: cat hello.classlist hi.classlist > common.classlist Windows: The following commands combine the files hello.classlist and hi.classlist into one file, common.classlist: type hello.classlist hi.classlist > common.classlist Create a shared archive, named common.jsa, that contains all the classes in common.classlist: java -XX:+UnlockCommercialFeatures -Xshare:dump -XX:SharedArchiveFile=common.jsa -XX:+UseAppCDS -XX:SharedClassListFile=common.classlist -cp common.jar:hello.jar:hi.jar The value of the -cp parameter is the common class path prefix shared by the Hello and Hi applications. Run the Hello and Hi applications with the same shared archive: java -XX:+UnlockCommercialFeatures -Xshare:on -XX:SharedArchiveFile=common.jsa -XX:+UseAppCDS -cp common.jar:hello.jar:hi.jar Hello java -XX:+UnlockCommercialFeatures -Xshare:on -XX:SharedArchiveFile=common.jsa -XX:+UseAppCDS -cp common.jar:hello.jar:hi.jar Hi Specifying Additional Shared Data Added to an Archive File -XX:SharedArchiveConfigFile=shared_config_file The option is used to specify additional shared data added to the archive file. In JDK 9, it supports strings and symbols. The string data and symbol data should be generated by the jcmd tool attaching to a running JVM process. See jcmd. The following is an example of the string and symbol dumping command in jcmd: jcmd pid VM.stringtable -verbose jcmd pid VM.symboltable -verbose The following is an example of a configuration file: VERSION: 1.0 @SECTION: String 7: test123 1: * 8: segments @SECTION: Symbol 10 -1: linkMethod In the configuration file example: The string entries under @SECTION: String use the following format: length: string The @SECTION: Symbol entry uses the following format: length refcount: symbol The refcount for a shared symbol is always -1. @SECTION specifies the type of the section that follows it. All data within the section must be the same type that's specified by @SECTION. Different types of data can’t be mixed. Multiple separated data sections for the same type specified by different @SECTION are allowed within one shared_config_file . SharedClassUtil::read_extra_data() in share/classfile/sharedClassUtil.cpp

Memory savings with CDS/AppCDS

 
 
 
Running tomcat 9.0.2 with ngrinder 3.4.1 on OpenJDK 10 in an Ubuntu 16.04 Docker container with CDS archive at /opt/tomcat_cl4cds.jsa
and Address Randomization switched off (i.e. `sudo sh -c "echo 0 > /proc/sys/kernel/randomize_va_space"`)
CATALINA_OPTS="-Xint -Xmx64m -Xms64m -XX:+UseG1GC -Djava.security.egd=file:/dev/./urandom
               -XX:+UseAppCDS -XX:+UnlockDiagnosticVMOptions -XX:SharedArchiveFile=/opt/tomcat_cl4cds.jsa" catalina.sh start

The HotSpot Footprint/Performance Uncertainty Principle

 
 
 
 

Class representation in the HotSpot VM

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

CDS Details - Create the Archive

              
$ java -Xshare:dump
Allocated shared space: 3221225472 bytes at 0x0000000800000000
Loading classes to share ... // from JAVA_HOME/lib/classlist
Rewriting and linking classes ...  // Verification, ...
Number of classes 1240
Removing unshareable information ... done.
Relocating embedded pointers ...
Dumping symbol table ...                                
Dumping String objects to closed archive heap region ...
Dumping objects to open archive heap region ...
Removing java_mirror ... done.  // java.lang.Class<?>
mc  space:     21832 [  0,1% ] ... at 0x0000000800000000
rw  space:   4093816 [ 22,2% ] ... at 0x0000000800006000
ro  space:   7313320 [ 39,7% ] ... at 0x00000008003ee000
md  space:      6352 [  0,0% ] ... at 0x0000000800ae8000
od  space:   6462536 [ 35,1% ] ... at 0x0000000800aea000
st0 space:    458752 [  2,5% ] ... at 0x00000000fff00000
oa0 space:     65536 [  0,4% ] ... at 0x00000000ffe00000
total    :  18422144 [100.0% ] 
              
            

CDS Details - Memory Sharing

              
$ docker run -p 8080:8080 --rm -m 500m cds_demo_ojdk
$ pmap -XX 1508
1508:   /opt/jdk/bin/java ... org.apache.catalina.startup.Bootstrap start

  Address Perm    Size    Rss Shared_Clean Private_Clean Private_Dirty Mapping
 00400000 r-xp       4      4            0             4             0 java
 fc000000 rw-p   52224  52224            0             0         52224 // [Java heap]
 ff300000 rw-p     172    172            0            24           148 tomcat_cl4cds.jsa
 ff400000 rw-p     408    408            0           408             0 tomcat_cl4cds.jsa
 ff500000 rw-p    3072   3072            0          3072             0 tomcat_cl4cds.jsa
800000000 rwxp      16     16            0             0            16 tomcat_cl4cds.jsa
800004000 rw-p   22340  22340            0          1640         20700 tomcat_cl4cds.jsa
8015d5000 r--p   39320  39320            0         39320             0 tomcat_cl4cds.jsa
803c3b000 rw-p       8      8            0             0             8 tomcat_cl4cds.jsa
803c3d000 r--p   35840  35840            0         35840             0 tomcat_cl4cds.jsa
              
            

CDS Details - Memory Sharing

              
$ docker run -p 8090:8080 --rm -m 500m cds_demo_ojdk
$ pmap -XX 1508
1508:   /opt/jdk/bin/java ... org.apache.catalina.startup.Bootstrap start

  Address Perm    Size    Rss Shared_Clean Private_Clean Private_Dirty Mapping
 00400000 r-xp       4      4            4             0             0 java
 fc000000 rw-p   52224  52224            0             0         52224 // [Java heap]
 ff300000 rw-p     172    172           24             0           148 tomcat_cl4cds.jsa
 ff400000 rw-p     408    408          408             0             0 tomcat_cl4cds.jsa
 ff500000 rw-p    3072   3072         3072             0             0 tomcat_cl4cds.jsa
800000000 rwxp      16     16            0             0            16 tomcat_cl4cds.jsa
800004000 rw-p   22340  22340         1640             0         20700 tomcat_cl4cds.jsa
8015d5000 r--p   39320  39320        39320             0             0 tomcat_cl4cds.jsa
803c3b000 rw-p       8      8            0             0             8 tomcat_cl4cds.jsa
803c3d000 r--p   35840  35840        35840             0             0 tomcat_cl4cds.jsa
              
            

8194759: Support caching class mirror objects

 
 

AppCDS - Current Limitations

  • Can't share pre 1.5 classes
  • Can't share dynamically generated classes
  • Can't share classes loaded from files (only .jar archives)
  • Can't share classes modified by the class loader
  • Classes loaded by several class loaders can only be shared once
  • No bytecode-rewriting (slow interpreter)

Class Data Sharing in IBM J9 / Eclipse OpenJ9

Eclipse OpenJ9 CDS with Tomcat 9 & nGrinder

              
$ CATALINA_OPTS="-Xscmx128m -Xshareclasses:cacheDir=/tmp/tomcat,name=tomcat,verbose" \
  catalina.sh start
[-Xshareclasses persistent cache enabled]
JVMSHRC236I Created shared classes persistent cache tomcat
JVMSHRC246I Attached shared classes persistent cache tomcat
JVMSHRC168I Total shared class bytes read=3738038. Total bytes stored=47196956
$ ls -l /tmp/tomcat
-rw-r----- 1 simonis simonis 134217728 Feb 23 17:44 C290M5F1A64P_tomcat_G35
$ java -Xshareclasses:cacheDir=/tmp/tomcat,name=tomcat,printStats
Current statistics for cache "tomcat":
cache size                           = 134_217_120
free bytes                           =  80_991_164
ROMClass bytes                       =  28_017_248
AOT bytes                            =  13_330_160
JIT data bytes                       =      99_072
Data bytes                           =     363_936
Metadata bytes                       =     70_8596
# ROMClasses                         =      11_589
# AOT Methods                        =       6_329
Cache is 39% full
              
            

Memory savings with CDS/AppCDS

 
 
tomcat 9.0.2 & ngrinder 3.4.1 on OpenJDK 10 / OpenJ9 9 in an Ubuntu 16.04 Docker container with CDS archives at /opt/tomcat_cl4cds.jsa & /opt/tomcat/C290M5F1A64P_tomcat_G35
and Address Randomization switched off (i.e. `sudo sh -c "echo 0 > /proc/sys/kernel/randomize_va_space"`)
CATALINA_OPTS="-Xint -Xmx64m -Xms64m -XX:+UseG1GC -Djava.security.egd=file:/dev/./urandom
               -XX:+UseAppCDS -XX:+UnlockDiagnosticVMOptions -XX:SharedArchiveFile=/opt/tomcat_cl4cds.jsa" catalina.sh start
CATALINA_OPTS="-Xint -Xmx64m -Xms64m -Djava.security.egd=file:/dev/./urandom
               -Xshareclasses:cacheDir=/opt/tomcat,name=tomcat,noaot,nojitdata -Xnoaot -Xnojit" catalina.sh start

https://simonis.github.io/JBreak2018