Open harryyu1994 opened 4 years ago
Most modules show increased number of ticks with Java11: VM dll +500 (+150 from interpreter) JIT code: +220 GC: +200 (possibly more objects being allocated ?) Kernel: +220 Interestingly, this time, the JIT dll has less ticks in Java11.
To me this looks like larger pathlength overall.
One other thing we can try is to enable SVM during start-up. This is currently disabled because it creates bigger AOT bodies so it needs a larger SCC. In these experiments we are using a large SCC, so maybe it will provide some advantage.
$ENV{TR_DontDisableSVMDuringStartup} = 1;
Results for JDK=/home/harryayu2/sdks/java11 jvmOpts=-Xmx512m -Xshareclasses:name=liberty -Xscmx200m -Xscmaxaot80m pid=0
StartupTime avg=3971 min=3704 max=4285 stdDev=155.7 maxVar=15.7% confInt=1.04% samples= 40
Footprint avg=266909 min=232916 max=313344 stdDev=27096.5 maxVar=34.5% confInt=2.70% samples= 40
CThreadTime avg=2115 min=1625 max=3381 stdDev=440.4 maxVar=108.1% confInt=5.55% samples= 40
ProcessTime avg=7482 min=6700 max=8350 stdDev=383.4 maxVar=24.6% confInt=1.38% samples= 39
Outlier values: 10590
Stats for cold run:
StartupTime avg=17726 min=17578 max=17864 stdDev=106.7 maxVar=1.6% confInt=0.57% samples= 5
Footprint avg=352383 min=351732 max=352720 stdDev=563.6 maxVar=0.3% confInt=0.27% samples= 3
Outlier values: 361508 343980
CThreadTime avg=62721 min=62324 max=63270 stdDev=361.5 maxVar=1.5% confInt=0.55% samples= 5
ProcessTime avg=78234 min=77270 max=79950 stdDev=1045.8 maxVar=3.5% confInt=1.27% samples= 5
Results for JDK=/home/harryayu2/sdks/java8 jvmOpts=-Xmx512m -Xshareclasses:name=liberty -Xscmx200m -Xscmaxaot80m pid=0
StartupTime avg=3597 min=3403 max=3820 stdDev=102.1 maxVar=12.2% confInt=0.76% samples= 40
Footprint avg=290212 min=270768 max=307344 stdDev=7042.0 maxVar=13.5% confInt=0.69% samples= 35
Outlier values: 225696 239956 233140 225588 240432
CThreadTime avg=1683 min=1318 max=2532 stdDev=262.0 maxVar=92.1% confInt=4.37% samples= 36
Outlier values: 3889 3297 2663 3428
ProcessTime avg=7164 min=6440 max=7680 stdDev=309.5 maxVar=19.3% confInt=1.18% samples= 38
Outlier values: 10020 8570
Stats for cold run:
StartupTime avg=17073 min=16685 max=17342 stdDev=256.7 maxVar=3.9% confInt=1.43% samples= 5
Footprint avg=351838 min=335312 max=395768 stdDev=26002.7 maxVar=18.0% confInt=7.05% samples= 5
CThreadTime avg=60718 min=58886 max=62083 stdDev=1270.0 maxVar=5.4% confInt=1.99% samples= 5
ProcessTime avg=75816 min=74490 max=76530 stdDev=824.8 maxVar=2.7% confInt=1.04% samples= 5
base address = 0x00007F0E17859000
end address = 0x00007F0E24000000
allocation pointer = 0x00007F0E1A2467D8
cache layer = 0
cache size = 209714592
softmx bytes = 209714592
free bytes = 97384192
Reserved space for AOT bytes = -1
Maximum space for AOT bytes = 83886080
Reserved space for JIT data bytes = -1
Maximum space for JIT data bytes = -1
Metadata bytes = 2440196
Metadata % used = 2%
Class debug area size = 16744448
Class debug area used bytes = 7205370
Class debug area % used = 43%
ROMClass bytes = 43964376
AOT bytes = 48346200
Is it better with SVM during start-up? The gap used to be 15% and now I see it more like 10%. Probably the correct comparison is Java11 with and without SVM.
Java8 might have increased with SVM. Measuring Java11 with/without SVM right now.
Results for JDK=/home/harryayu2/sdks/java11 jvmOpts=-Xmx512m -Xshareclasses:name=liberty -Xscmx200m -Xscmaxaot80m pid=0
StartupTime avg=4056 min=3808 max=4512 stdDev=142.9 maxVar=18.5% confInt=0.94% samples= 40
Footprint avg=263900 min=231996 max=311096 stdDev=25478.5 maxVar=34.1% confInt=2.57% samples= 40
CThreadTime avg=2130 min=1640 max=3841 stdDev=509.4 maxVar=134.2% confInt=6.37% samples= 40
ProcessTime avg=7696 min=7060 max=8380 stdDev=361.5 maxVar=18.7% confInt=1.25% samples= 40
Stats for cold run:
StartupTime avg=18059 min=17747 max=18327 stdDev=235.9 maxVar=3.3% confInt=1.25% samples= 5
Footprint avg=347206 min=344096 max=349744 stdDev=2057.3 maxVar=1.6% confInt=0.56% samples= 5
CThreadTime avg=63422 min=62538 max=64175 stdDev=683.7 maxVar=2.6% confInt=1.27% samples= 4
Outlier values: 66780
ProcessTime avg=79218 min=77870 max=80230 stdDev=1086.1 maxVar=3.0% confInt=1.31% samples= 5
Results for JDK=/home/harryayu2/sdks/java11 jvmOpts=-Xmx512m -Xshareclasses:name=liberty -Xscmx200m -Xscmaxaot80m pid=0
StartupTime avg=4000 min=3815 max=4219 stdDev=106.2 maxVar=10.6% confInt=0.71% samples= 40
Footprint avg=265126 min=234108 max=302472 stdDev=25093.9 maxVar=29.2% confInt=2.52% samples= 40
CThreadTime avg=1556 min=1117 max=2672 stdDev=336.9 maxVar=139.2% confInt=5.84% samples= 39
Outlier values: 3740
ProcessTime avg=7287 min=6570 max=8220 stdDev=444.6 maxVar=25.1% confInt=1.62% samples= 40
Stats for cold run:
StartupTime avg=17101 min=17022 max=17144 stdDev=54.3 maxVar=0.7% confInt=0.37% samples= 4
Outlier values: 17323.627
Footprint avg=307909 min=299060 max=319316 stdDev=9930.5 maxVar=6.8% confInt=3.08% samples= 5
CThreadTime avg=46815 min=45810 max=47635 stdDev=865.1 maxVar=4.0% confInt=1.76% samples= 5
ProcessTime avg=67804 min=66310 max=70010 stdDev=1514.5 maxVar=5.6% confInt=2.13% samples= 5
<Loaded com/ibm/ws/kernel/instrument/EnvCheck>
< Class size 1843; ROM size 1320; debug size 0>
< Read time 0 usec; Load time 60 usec; Translate time 203 usec>
<Loaded com/ibm/ws/kernel/boot/cmdline/EnvCheck>
< Class size 2626; ROM size 1656; debug size 0>
< Read time 1 usec; Load time 33 usec; Translate time 61 usec>
Starting server dt7.
Server dt7 started with process ID 1593149.
JImage interface is using jimage library
<Loaded jdk/internal/module/SystemModuleFinders$SystemModuleReader$$Lambda$1/0x0000000000000000>
< Class size 858; ROM size 1048; debug size 0>
< Read time 0 usec; Load time 30 usec; Translate time 208 usec>
<Loaded jdk/internal/loader/BuiltinClassLoader$$Lambda$2/0x0000000000000000>
< Class size 820; ROM size 1008; debug size 0>
< Read time 0 usec; Load time 8 usec; Translate time 5419 usec>
<Loaded com/ibm/ws/kernel/instrument/EnvCheck>
< Class size 1843; ROM size 1328; debug size 0>
< Read time 0 usec; Load time 34 usec; Translate time 62 usec>
<Loaded com/ibm/ws/kernel/boot/cmdline/EnvCheck>
< Class size 2626; ROM size 1640; debug size 0>
< Read time 0 usec; Load time 32 usec; Translate time 82 usec>
<Loaded java/util/regex/Pattern$BitClass$$Lambda$3/0x0000000000000000>
< Class size 554; ROM size 744; debug size 0>
< Read time 0 usec; Load time 7 usec; Translate time 48 usec>
<Loaded java/util/regex/Pattern$$Lambda$4/0x0000000000000000>
< Class size 666; ROM size 856; debug size 0>
< Read time 0 usec; Load time 8 usec; Translate time 26 usec>
<Loaded java/util/regex/Pattern$CharPredicate$$Lambda$5/0x0000000000000000>
< Class size 620; ROM size 816; debug size 0>
< Read time 0 usec; Load time 7 usec; Translate time 81 usec>
<Loaded java/util/regex/Pattern$$Lambda$6/0x0000000000000000>
< Class size 535; ROM size 728; debug size 0>
< Read time 0 usec; Load time 7 usec; Translate time 30 usec>
<Loaded java/util/regex/Pattern$$Lambda$7/0x0000000000000000>
< Class size 369; ROM size 536; debug size 0>
< Read time 0 usec; Load time 5 usec; Translate time 26 usec>
<Loaded java/util/regex/CharPredicates$$Lambda$8/0x0000000000000000>
< Class size 546; ROM size 736; debug size 0>
< Read time 0 usec; Load time 20 usec; Translate time 29 usec>
<Loaded java/util/regex/Pattern$CharPredicate$$Lambda$9/0x0000000000000000>
< Class size 779; ROM size 984; debug size 0>
< Read time 0 usec; Load time 8 usec; Translate time 27 usec>
<Loaded java/util/ResourceBundle$ResourceBundleControlProviderHolder$$Lambda$10/0x0000000000000000>
< Class size 477; ROM size 648; debug size 0>
< Read time 0 usec; Load time 7 usec; Translate time 239 usec>
<Loaded java/lang/ModuleLayer$$Lambda$11/0x0000000000000000>
< Class size 683; ROM size 872; debug size 0>
< Read time 0 usec; Load time 11 usec; Translate time 175 usec>
<Loaded java/util/ResourceBundle$ResourceBundleControlProviderHolder$$Lambda$12/0x0000000000000000>
< Class size 462; ROM size 632; debug size 0>
< Read time 0 usec; Load time 6 usec; Translate time 26 usec>
<Loaded java/util/stream/Collectors$$Lambda$13/0x0000000000000000>
< Class size 360; ROM size 528; debug size 0>
< Read time 0 usec; Load time 6 usec; Translate time 301 usec>
<Loaded java/util/stream/Collectors$$Lambda$14/0x0000000000000000>
< Class size 417; ROM size 592; debug size 0>
< Read time 0 usec; Load time 6 usec; Translate time 32 usec>
<Loaded java/util/stream/Collectors$$Lambda$15/0x0000000000000000>
< Class size 512; ROM size 688; debug size 0>
< Read time 0 usec; Load time 6 usec; Translate time 28 usec>
<Loaded java/util/stream/Collectors$$Lambda$16/0x0000000000000000>
< Class size 417; ROM size 584; debug size 0>
< Read time 0 usec; Load time 6 usec; Translate time 26 usec>
<Loaded java/util/ResourceBundle$$Lambda$17/0x0000000000000000>
< Class size 596; ROM size 784; debug size 0>
< Read time 0 usec; Load time 8 usec; Translate time 29 usec>
<Loaded java/util/ResourceBundle$Control$$Lambda$18/0x0000000000000000>
< Class size 687; ROM size 880; debug size 0>
< Read time 0 usec; Load time 9 usec; Translate time 28 usec>
Starting server dt7.
<Loaded jdk/net/LinuxSocketOptions$$Lambda$62/0x0000000000000000>
< Class size 409; ROM size 576; debug size 0>
< Read time 0 usec; Load time 12 usec; Translate time 43 usec>
Server dt7 started with process ID 1597079.
<Loaded jdk/internal/loader/BuiltinClassLoader$$Lambda$2/0x0000000000000000>
< Class size 820; ROM size 1008; debug size 0>
< Read time 0 usec; Load time 8 usec; Translate time 5419 usec>
this one takes up majority of the time
<Loaded jdk/internal/loader/BuiltinClassLoader$$Lambda$2/0x0000000000000000>
For anon classes, we store them in the SCC hoping that we could get the AOT benefit from it. We won't get the class loading benefit if they are in the SCC. In fact class Translate will be slower because of additional comparisons. If the benefit of AOT is not big enough to offset the additional Translate time, we should just disable storing anon classes in the SCC .
I see it is all anon classes listed for java 11 in https://github.com/eclipse/openj9/issues/11015#issuecomment-729253847. So it is worth trying -XX:-ShareAnonymousClasses
(not sure if it has been tried or not). Probably also worth trying -XX:-ShareUnsafeClasses
.