-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Java 11 native image builds are about 20% slower #2129
Comments
JDK 11 changed the default GC from parallel GC to G1. Please check if that is the reason for the difference. @pejovica We talked about switching the default GC to the parallel GC on JDK 11, but I think that is not done yet? |
I did one run with parallel GC on 11 and it was only slightly better than the original run (76,412.91 ms). So it's not that - or rather, it's not just that. It's possible that there are some defaults that need to be adjusted in terms of memory sizes and that sort of thing. I'm trying to figure out what the defaults are on the 8 build so I can replicated them for 11. |
Here is a sample comparison of 8 versus 11 in terms of GC events. 8 is running with Java 8
Java 11:
Naturally the GC log format is different between 8 and 11, but I think we can see a similar number of GC events. But the final stats seem pretty divergent. |
Here is a comparison of the final stats in tabular form for readability:
|
Here's a detailed diff of the options being used as reported by --- 8.filt.txt 2020-02-04 14:04:55.258981173 -0600
+++ 11.filt.txt 2020-02-04 14:04:50.427146608 -0600
@@ -2,18 +2,17 @@
ActiveProcessorCount=-1
AdaptiveSizeDecrementScaleFactor=4
AdaptiveSizeMajorGCDecayTimeScale=10
-AdaptiveSizePausePolicy=0
AdaptiveSizePolicyCollectionCostMargin=50
AdaptiveSizePolicyInitializingSteps=20
AdaptiveSizePolicyOutputInterval=0
AdaptiveSizePolicyWeight=10
AdaptiveSizeThroughPutPolicy=0
AdaptiveTimeWeight=25
-AdjustConcurrency=false
AggressiveHeap=false
AggressiveOpts=false
AliasLevel=3
AlignVector=false
+AllocateHeapAt=
AllocateInstancePrefetchLines=1
AllocatePrefetchDistance=192
AllocatePrefetchInstr=0
@@ -24,29 +23,28 @@
AllowNonVirtualCalls=false
AllowParallelDefineClass=false
AllowUserSignalHandlers=false
+AllowVectorizeOnDemand=true
AlwaysActAsServerClassMachine=false
AlwaysCompileLoopMethods=false
AlwaysLockClassLoader=false
AlwaysPreTouch=false
AlwaysRestoreFPU=false
AlwaysTenure=false
+ArrayCopyLoadStoreMaxElem=8
AssertOnSuspendWaitFailure=false
-AssumeMP=false
+AssumeMP=true
AutoBoxCacheMax=128
-AutoGCSelectPauseMillis=5000
BCEATraceLevel=0
-BackEdgeThreshold=100000
BackgroundCompilation=true
BaseFootPrintEstimate=268435456
BiasedLockingBulkRebiasThreshold=20
BiasedLockingBulkRevokeThreshold=40
BiasedLockingDecayTime=25000
-BiasedLockingStartupDelay=4000
+BiasedLockingStartupDelay=0
BindGCTaskThreadsToCPUs=false
BlockLayoutByFrequency=true
BlockLayoutMinDiamondPercentage=20
BlockLayoutRotateLoops=true
-BootstrapJVMCI=false
BranchOnRegister=false
BytecodeVerificationLocal=false
BytecodeVerificationRemote=true
@@ -57,7 +55,7 @@
C1ProfileInlinedCalls=true
C1ProfileVirtualCalls=true
C1UpdateMethodData=true
-CICompilerCount:=4
+CICompilerCount=4
CICompilerCountPerCPU=true
CITime=false
CMSAbortSemantics=false
@@ -68,20 +66,12 @@
CMSClassUnloadingEnabled=true
CMSClassUnloadingMaxInterval=0
CMSCleanOnEnter=true
-CMSCompactWhenClearAllSoftRefs=true
CMSConcMarkMultiple=32
CMSConcurrentMTEnabled=true
CMSCoordinatorYieldSleepCount=10
-CMSDumpAtPromotionFailure=false
CMSEdenChunksRecordAlways=true
CMSExpAvgFactor=50
CMSExtrapolateSweep=false
-CMSFullGCsBeforeCompaction=0
-CMSIncrementalDutyCycle=10
-CMSIncrementalDutyCycleMin=0
-CMSIncrementalMode=false
-CMSIncrementalOffset=0
-CMSIncrementalPacing=true
CMSIncrementalSafetyFactor=10
CMSIndexedFreeListReplenish=4
CMSInitiatingOccupancyFraction=-1
@@ -98,7 +88,6 @@
CMSOldPLABResizeQuicker=false
CMSOldPLABToleranceFactor=4
CMSPLABRecordAlways=true
-CMSParPromoteBlocksToClaim=16
CMSParallelInitialMarkEnabled=true
CMSParallelRemarkEnabled=true
CMSParallelSurvivorRemarkEnabled=true
@@ -112,7 +101,6 @@
CMSPrecleanThreshold=1000
CMSPrecleaningEnabled=true
CMSPrintChunksInDump=false
-CMSPrintEdenSurvivorChunks=false
CMSPrintObjectsInDump=false
CMSRemarkVerifyVariant=1
CMSReplenishIntermediate=true
@@ -137,48 +125,41 @@
CMS_SweepPadding=1
CMS_SweepTimerThresholdMillis=10
CMS_SweepWeight=75
-CheckEndorsedAndExtDirs=false
+CalculateClassFingerprint=false
CheckJNICalls=false
ClassUnloading=true
ClassUnloadingWithConcurrentMark=true
-ClearFPUAtPark=0
ClipInlining=true
CodeCacheExpansionSize=65536
-CodeCacheMinimumFreeSpace=512000
-CodeInstallSafepointChecks=true
-CollectGen0First=false
CompactFields=true
-CompilationPolicyChoice=3
+CompactStrings=true
+CompilationPolicyChoice=2
CompileCommand=
CompileCommandFile=
CompileOnly=
CompileThreshold=10000
-CompilerThreadHintNoPreempt=true
+CompileThresholdScaling=1.000000
+CompilerThreadHintNoPreempt=false
CompilerThreadPriority=-1
CompilerThreadStackSize=2048
CompressedClassSpaceSize=1073741824
ConcGCThreads=0
ConditionalMoveLimit=3
ContendedPaddingWidth=128
-ConvertSleepToYield=true
-ConvertYieldToSleep=false
CrashOnOutOfMemoryError=false
-CreateMinidumpOnCrash=false
+CreateCoredumpOnCrash=true
CriticalJNINatives=true
DTraceAllocProbes=false
DTraceMethodProbes=false
DTraceMonitorProbes=false
Debugging=false
-DefaultMaxRAMFraction=4
-DefaultThreadPriority=-1
-DeferPollingPageLoopCount=-1
-DeferThrSuspendLoopCount=4000
DeoptimizeRandom=false
DisableAttachMechanism=false
DisableExplicitGC=false
DisplayVMOutputToStderr=false
DisplayVMOutputToStdout=false
DoEscapeAnalysis=true
+DoReserveCopyInSuperWord=true
DontCompileHugeMethods=true
DontYieldALot=false
DumpLoadedClassList=
@@ -191,28 +172,30 @@
EliminateAutoBox=true
EliminateLocks=true
EliminateNestedLocks=true
-EmitSync=0
EnableContended=true
+EnableDynamicAgentLoading=true
EnableJVMCI=true
-EnableTracing=false
+EnableJVMCIProduct=true
ErgoHeapSizeLimit=0
ErrorFile=
+ErrorLogTimeout=120
ErrorReportServer=
EscapeAnalysisTimeout=20.000000
EstimateArgEscape=true
+ExecutingUnitTests=false
ExitOnOutOfMemoryError=false
ExplicitGCInvokesConcurrent=false
-ExplicitGCInvokesConcurrentAndUnloadsClasses=false
ExtendedDTraceProbes=false
+ExtensiveErrorReports=false
ExtraSharedClassListFile=
FLSAlwaysCoalesceLarge=false
FLSCoalescePolicy=2
FLSLargestBlockCoalesceProximity=0.990000
FailOverToOldVerifier=true
-FastTLABRefill=true
-FenceInstruction=0
FieldsAllocationStyle=1
FilterSpuriousWakeups=true
+FlightRecorder=false
+FlightRecorderOptions=
ForceNUMA=false
ForceTimeHighResolution=false
FreqInlineSize=325
@@ -223,7 +206,7 @@
G1ConcRefinementRedZone=0
G1ConcRefinementServiceIntervalMillis=300
G1ConcRefinementThreads=0
-G1ConcRefinementThresholdStep=0
+G1ConcRefinementThresholdStep=2
G1ConcRefinementYellowZone=0
G1ConfidencePercent=50
G1HeapRegionSize=0
@@ -233,17 +216,17 @@
G1RSetScanBlockSize=64
G1RSetSparseRegionEntries=0
G1RSetUpdatingPauseTimePercent=10
-G1RefProcDrainInterval=10
+G1RefProcDrainInterval=1000
G1ReservePercent=10
G1SATBBufferEnqueueingThresholdPercent=60
G1SATBBufferSize=1024
G1UpdateBufferSize=256
G1UseAdaptiveConcRefinement=true
+G1UseAdaptiveIHOP=true
GCDrainStackTargetSize=64
GCHeapFreeLimit=2
GCLockerEdenExpansionPercent=5
GCLockerInvokesConcurrent=false
-GCLogFileSize=8192
GCPauseIntervalMillis=0
GCTaskTimeStampEntries=200
GCTimeLimit=98
@@ -255,14 +238,15 @@
HeapDumpPath=
HeapFirstMaximumCompactionCount=3
HeapMaximumCompactionInterval=20
-HeapSizePerGCThread=87241520
+HeapSearchSteps=3
+HeapSizePerGCThread=43620760
IgnoreEmptyClassPaths=false
IgnoreUnrecognizedVMOptions=false
IncreaseFirstTierCompileThresholdAt=50
IncrementalInline=true
InitialBootClassLoaderMetaspaceSize=4194304
InitialCodeCacheSize=2555904
-InitialHeapSize:=526385152
+InitialHeapSize=526385152
InitialRAMFraction=64
InitialRAMPercentage=1.562500
InitialSurvivorRatio=8
@@ -275,16 +259,13 @@
InsertMemBarAfterArraycopy=true
InteriorEntryAlignment=16
InterpreterProfilePercentage=33
-JNIDetachReleasesMonitors=true
JVMCICounterSize=0
JVMCICountersExcludeCompiler=true
-JVMCIHostThreads=1
JVMCILibDumpJNIConfig=
JVMCILibPath=
JVMCINMethodSizeLimit=655360
JVMCIPrintProperties=false
JVMCIThreads=1
-JVMCITraceLevel=0
JavaMonitorsInStackTrace=true
JavaPriority10_To_OSPriority=-1
JavaPriority1_To_OSPriority=-1
@@ -299,11 +280,13 @@
LIRFillDelaySlots=false
LargePageHeapSizeThreshold=134217728
LargePageSizeInBytes=0
-LazyBootClassLoader=true
LiveNodeCountInliningCutoff=40000
LoadExecStackDllInVMThread=true
LoopMaxUnroll=16
LoopOptsCount=43
+LoopPercentProfileLimit=30
+LoopStripMiningIter=0
+LoopStripMiningIterShortLoop=0
LoopUnrollLimit=60
LoopUnrollMin=4
LoopUnswitching=true
@@ -317,9 +300,9 @@
MaxDirectMemorySize=0
MaxFDLimit=true
MaxGCMinorPauseMillis=18446744073709551615
-MaxGCPauseMillis=18446744073709551615
+MaxGCPauseMillis=18446744073709551614
MaxHeapFreeRatio=100
-MaxHeapSize:=8405385216
+MaxHeapSize=8405385216
MaxInlineLevel=9
MaxInlineSize=35
MaxJNILocalCapacity=65536
@@ -331,8 +314,8 @@
MaxMetaspaceExpansion=5451776
MaxMetaspaceFreeRatio=70
MaxMetaspaceSize=18446744073709547520
-MaxNewSize:=2801795072
-MaxNodeLimit=75000
+MaxNewSize=2801795072
+MaxNodeLimit=80000
MaxRAM=137438953472
MaxRAMFraction=4
MaxRAMPercentage=25.000000
@@ -342,8 +325,7 @@
MaxVectorSize=32
MetaspaceSize=21807104
MethodFlushing=true
-MethodProfileWidth=0
-MinHeapDeltaBytes:=524288
+MinHeapDeltaBytes=524288
MinHeapFreeRatio=0
MinInliningThreshold=250
MinJumpTableSize=10
@@ -354,9 +336,8 @@
MinSurvivorRatio=3
MinTLABSize=2048
MonitorBound=0
-MonitorInUseLists=false
+MonitorInUseLists=true
MultiArrayExpandLimit=6
-MustCallLoadClassInternal=false
NUMAChunkResizeWeight=20
NUMAInterleaveGranularity=2097152
NUMAPageScanRate=256
@@ -367,18 +348,17 @@
NeverActAsServerClassMachine=false
NeverTenure=false
NewRatio=2
-NewSize:=175112192
+NewSize=175112192
NewSizeThreadIncrease=5320
NmethodSweepActivity=10
-NmethodSweepCheckInterval=5
-NmethodSweepFraction=16
NodeLimitFudgeFactor=2000
-NumberOfGCLogFiles=0
+NonNMethodCodeHeapSize=5836300
+NonProfiledCodeHeapSize=122910970
NumberOfLoopInstrToAlign=4
ObjectAlignmentInBytes=8
OldPLABSize=1024
OldPLABWeight=50
-OldSize:=351272960
+OldSize=351272960
OmitStackTraceInFastThrow=true
OnError=
OnOutOfMemoryError=
@@ -388,6 +368,7 @@
OptimizeStringConcat=true
OptoBundling=false
OptoLoopAlignment=16
+OptoRegScheduling=true
OptoScheduling=false
PLABWeight=75
PSChunkLargeArrays=true
@@ -397,7 +378,6 @@
ParGCUseLocalOverflow=false
ParallelGCBufferWastePct=10
ParallelGCThreads=8
-ParallelGCVerbose=false
ParallelOldDeadWoodLimiterMean=50
ParallelOldDeadWoodLimiterStdDev=80
ParallelRefProcBalancingEnabled=true
@@ -418,7 +398,7 @@
PerfDataSaveToFile=false
PerfDisableSharedMem=false
PerfMaxStringConstLength=1024
-PreInflateSpin=10
+PreTouchParallelChunkSize=1073741824
PreferContainerQuotaForCPUCount=true
PreferInterpreterNativeStubs=false
PrefetchCopyIntervalInBytes=576
@@ -427,54 +407,26 @@
PreserveAllAnnotations=false
PreserveFramePointer=false
PretenureSizeThreshold=0
-PrintAdaptiveSizePolicy=false
-PrintBootstrap=true
-PrintCMSInitiationStatistics=false
-PrintCMSStatistics=0
PrintClassHistogram=false
-PrintClassHistogramAfterFullGC=false
-PrintClassHistogramBeforeFullGC=false
PrintCodeCache=false
PrintCodeCacheOnCompilation=false
PrintCommandLineFlags=false
PrintCompilation=false
PrintConcurrentLocks=false
-PrintDeoptimizationDetails=false
-PrintFLSCensus=0
-PrintFLSStatistics=0
-PrintFlagsFinal:=true
+PrintExtendedThreadInfo=false
+PrintFlagsFinal=true
PrintFlagsInitial=false
+PrintFlagsRanges=false
PrintGC=false
-PrintGCApplicationConcurrentTime=false
-PrintGCApplicationStoppedTime=false
-PrintGCCause=true
-PrintGCDateStamps=false
PrintGCDetails=false
-PrintGCID=false
-PrintGCTaskTimeStamps=false
-PrintGCTimeStamps=false
-PrintHeapAtGC=false
-PrintHeapAtGCExtended=false
PrintHeapAtSIGBREAK=true
-PrintJNIGCStalls=false
PrintJNIResolving=false
-PrintNMethodStatistics=false
-PrintOldPLAB=false
-PrintOopAddress=false
-PrintPLAB=false
-PrintParallelOldGCPhaseTimes=false
-PrintPromotionFailure=false
-PrintReferenceGC=false
PrintSafepointStatistics=false
PrintSafepointStatisticsCount=300
PrintSafepointStatisticsTimeout=-1
PrintSharedArchiveAndExit=false
PrintSharedDictionary=false
-PrintSharedSpaces=false
-PrintStringDeduplicationStatistics=false
PrintStringTableStatistics=false
-PrintTLAB=false
-PrintTenuringDistribution=false
PrintTieredEvents=false
PrintVMOptions=false
PrintVMQWaitTime=false
@@ -485,20 +437,19 @@
ProfileIntervalsTicks=100
ProfileMaturityPercentage=20
ProfileVM=false
+ProfiledCodeHeapSize=122910970
ProfilerPrintByteCodeStatistics=false
ProfilerRecordPC=false
PromotedPadding=3
QueuedAllocationWarningCount=0
RTMRetryCount=5
RangeCheckElimination=true
-ReadPrefetchInstr=0
ReassociateInvariants=true
ReduceBulkZeroing=true
ReduceFieldZeroing=true
ReduceInitialCardMarks=true
ReduceSignalUsage=false
RefDiscoveryPolicy=0
-ReflectionWrapResolutionErrors=true
RegisterFinalizersAtInit=true
RelaxAccessControlCheck=false
ReplayDataFile=
@@ -509,42 +460,41 @@
ResizeTLAB=true
RestoreMXCSROnJNICalls=false
RestrictContended=true
+RestrictReservedStack=true
RewriteBytecodes=true
RewriteFrequentPairs=true
-SafepointPollOffset=256
-SafepointSpinBeforeYield=2000
SafepointTimeout=false
SafepointTimeoutDelay=10000
ScavengeBeforeFullGC=true
+SegmentedCodeCache=true
SelfDestructTimer=0
-ShareDebugInfo=true
+SharedArchiveConfigFile=
+SharedArchiveFile=
SharedBaseAddress=34359738368
SharedClassListFile=
-SharedMiscCodeSize=122880
-SharedMiscDataSize=4194304
-SharedReadOnlySize=16777216
-SharedReadWriteSize=16777216
+SharedSymbolTableBucketSize=4
ShowMessageBoxOnError=false
+ShrinkHeapInSteps=true
SoftRefLRUPolicyMSPerMB=1000
-SpecialEncodeISOArray=true
SplitIfBlocks=true
StackRedPages=1
+StackReservedPages=1
StackShadowPages=20
StackTraceInThrowable=true
StackYellowPages=2
+StartAggressiveSweepingAt=10
StartAttachListener=false
-StarvationMonitorInterval=200
+StartFlightRecording=
StressLdcRewrite=false
StringDeduplicationAgeThreshold=3
-StringTableSize=60013
+StringTableSize=65536
+SuperWordLoopUnrollAnalysis=true
+SuperWordReductions=true
SuppressFatalErrorMessage=false
SurvivorPadding=3
SurvivorRatio=8
SuspendRetryCount=50
SuspendRetryDelay=5
-SyncFlags=0
-SyncKnobs=
-SyncVerbose=0
TLABAllocationWeight=35
TLABRefillWasteFraction=64
TLABSize=0
@@ -556,9 +506,9 @@
TenuredGenerationSizeIncrement=20
TenuredGenerationSizeSupplement=80
TenuredGenerationSizeSupplementDecay=2
+ThreadLocalHandshakes=true
ThreadPriorityPolicy=0
ThreadPriorityVerbose=false
-ThreadSafetyMargin=52428800
ThreadStackSize=1024
ThresholdTolerance=10
Tier0BackedgeNotifyFreqLog=10
@@ -569,6 +519,10 @@
Tier2BackedgeNotifyFreqLog=14
Tier2CompileThreshold=0
Tier2InvokeNotifyFreqLog=11
+Tier3AOTBackEdgeThreshold=120000
+Tier3AOTCompileThreshold=15000
+Tier3AOTInvocationThreshold=10000
+Tier3AOTMinInvocationThreshold=1000
Tier3BackEdgeThreshold=60000
Tier3BackedgeNotifyFreqLog=13
Tier3CompileThreshold=2000
@@ -589,39 +543,20 @@
TieredRateUpdateMinTime=1
TieredStopAtLevel=4
TimeLinearScan=false
-TraceBiasedLocking=false
-TraceClassLoading=false
-TraceClassLoadingCause=
-TraceClassLoadingPreorder=false
-TraceClassPaths=false
-TraceClassResolution=false
-TraceClassUnloading=false
-TraceDeoptimization=false
-TraceDynamicGCThreads=false
-TraceGen0Time=false
-TraceGen1Time=false
TraceJVMTI=
-TraceLoaderConstraints=false
-TraceMetadataHumongousAllocation=false
-TraceMonitorInflation=false
-TraceParallelOldGCTasks=false
-TraceRedefineClasses=0
-TraceSafepointCleanupTime=false
TraceSuspendWaitFailures=false
TrackedInitializationLimit=50
TransmitErrorReport=false
TrapBasedNullChecks=false
TrapBasedRangeChecks=false
TypeProfileArgsLimit=2
-TypeProfileLevel=111
+TypeProfileLevel=0
TypeProfileMajorReceiverPercent=90
TypeProfileParmsLimit=2
TypeProfileWidth=8
UnguardOnExecutionViolation=0
UnlinkSymbolsALot=false
-Use486InstrsOnly=false
UseAES=true
-UseAESIntrinsics=true
UseAVX=2
UseAdaptiveGCBoundary=false
UseAdaptiveGenerationSizePolicyAtMajorCollection=true
@@ -632,24 +567,20 @@
UseAdaptiveSizePolicyFootprintGoal=true
UseAdaptiveSizePolicyWithSystemGC=false
UseAddressNop=true
-UseAltSigs=false
-UseAutoGCSelectPolicy=false
+UseBASE64Intrinsics=false
UseBMI1Instructions=true
UseBMI2Instructions=true
UseBiasedLocking=true
UseBimorphicInlining=true
-UseBoundThreads=true
UseCLMUL=true
UseCMSBestFit=true
-UseCMSCollectionPassing=true
-UseCMSCompactAtFullCollection=true
UseCMSInitiatingOccupancyOnly=false
-UseCRC32Intrinsics=true
+UseCMoveUnconditionally=false
+UseCodeAging=true
UseCodeCacheFlushing=true
UseCompiler=true
-UseCompilerSafepoints=true
-UseCompressedClassPointers:=true
-UseCompressedOops:=true
+UseCompressedClassPointers=true
+UseCompressedOops=true
UseConcMarkSweepGC=false
UseCondCardMark=false
UseContainerSupport=true
@@ -658,22 +589,19 @@
UseCountedLoopSafepoints=false
UseCounterDecay=true
UseDivMod=true
-UseDynamicNumberOfGCThreads=false
+UseDynamicNumberOfCompilerThreads=true
+UseDynamicNumberOfGCThreads=true
+UseFMA=true
UseFPUForSpilling=true
-UseFastAccessorMethods=false
-UseFastEmptyMethods=false
UseFastJNIAccessors=true
UseFastStosb=true
UseG1GC=false
-UseGCLogFileRotation=false
UseGCOverheadLimit=true
UseGCTaskAffinity=false
-UseGHASHIntrinsics=true
UseHeavyMonitors=false
UseHugeTLBFS=false
UseInlineCaches=true
UseInterpreter=true
-UseJVMCIClassLoader=true
UseJVMCICompiler=true
UseJVMCINativeLibrary=true
UseJumpTables=true
@@ -682,48 +610,38 @@
UseLargePagesInMetaspace=false
UseLargePagesIndividualAllocation=false
UseLinuxPosixThreadCPUClocks=true
-UseLockedTracing=false
UseLoopCounter=true
UseLoopInvariantCodeMotion=true
UseLoopPredicate=true
-UseMathExactIntrinsics=true
UseMaximumCompactionOnSystemGC=true
-UseMembar=false
-UseMontgomeryMultiplyIntrinsic=true
-UseMontgomerySquareIntrinsic=true
-UseMulAddIntrinsic=true
-UseMultiplyToLenIntrinsic=true
+UseMembar=true
UseNUMA=false
UseNUMAInterleaving=false
UseNewLongLShift=false
UseOSErrorReporting=false
-UseOldInlining=true
UseOnStackReplacement=true
UseOnlyInlinedBimorphic=true
UseOprofile=false
UseOptoBiasInlining=true
UsePSAdaptiveSurvivorSizePolicy=true
-UseParNewGC=false
-UseParallelGC:=true
+UseParallelGC=true
UseParallelOldGC=true
UsePerfData=true
UsePopCountInstruction=true
+UseProfiledLoopPredicate=true
UseRDPCForConstantTableBase=false
UseRTMDeopt=false
UseRTMLocking=false
-UseSHA=false
-UseSHA1Intrinsics=false
-UseSHA256Intrinsics=false
-UseSHA512Intrinsics=false
+UseSHA=true
UseSHM=false
UseSSE=4
UseSSE42Intrinsics=true
UseSerialGC=false
-UseSharedSpaces=false
+UseSharedSpaces=true
UseSignalChaining=true
-UseSquareToLenIntrinsic=true
UseStoreImmI16=false
UseStringDeduplication=false
+UseSubwordForMaxVector=true
UseSuperWord=true
UseTLAB=true
UseThreadPriorities=true
@@ -731,8 +649,9 @@
UseTypeProfile=true
UseTypeSpeculation=true
UseUnalignedLoadStores=true
-UseVMInterruptibleIO=false
+UseVectorCmov=false
UseXMMForArrayCopy=true
+UseXMMForObjInit=false
UseXmmI2D=false
UseXmmI2F=false
UseXmmLoadAndClearUpper=true
@@ -745,11 +664,15 @@
ValueSearchLimit=1000
VerifyMergedCPBytecodes=true
VerifySharedSpaces=false
-WorkAroundNPTLTimedWaitHang=1
YoungGenerationSizeIncrement=20
YoungGenerationSizeSupplement=80
YoungGenerationSizeSupplementDecay=8
YoungPLABSize=4096
-ZapTLAB=false
+ZAllocationSpikeTolerance=2.000000
+ZCollectionInterval=0
+ZFragmentationLimit=25.000000
+ZMarkStacksMax=8589934592
+ZPath=
+ZStallOnOutOfMemory=true
+ZStatisticsInterval=10
ZeroTLAB=false |
@christianwimmer Yes, it's not done yet. |
Setting it manually didn't make any significant difference. Was there some other tuning involved as well? |
Breaking down the times a bit: You can see that the initial setup times are actually a little bit better on Java 11. It's only once analysis begins that things take longer. So I guess the next step is to see whether there is a substantially larger number of classes/methods being processed under Java 11. |
Maybe create an cpu flamegraph via async-profiler? I will try to do so with the agent tomorrow. |
I remember seeing a similar issue a couple of months back when I was looking into something related to Quarkus with Now seeing this, I decided to dig a bit deeper. I used Byteman[1] to debug this issue. Since I had an idea that there's something different in
All it does is prints out the I ran this rule against the
I ran this with both the Java 8 and Java 11 variant of
which explains why it pulls in those additional For reference, I've attached a [1] https://byteman.jboss.org/ |
Nice detective work, Jaikiran. That Byteman thing sounds very useful ;-) |
Indeed :) |
So I tweaked that byteman rule a bit to print out the count of the
For Java 8 the results are:
For Java 11 the results are:
|
Great @jaikiran, thanks, and nice job with the analysis! |
Not strictly related to this issue but adding truffle to the mix make some build fail on environments whit limited memory such as GitHub Actions ( ~ 7 GB ), see: https://gist.github.com/lburgazzoli/6dc563f6a1d76fc815a8297e6607735f |
@jaikiran Just because the extra classes from @olpaw why do we add
That combined with the |
@cstancu we should fix that. Only if truffle-api.jar is actually needed we should have it on the module path. I'm currently working on several improvements in our handling of |
@cstancu having graal/substratevm/src/com.oracle.svm.hosted/src/com/oracle/svm/hosted/ImageClassLoader.java Lines 154 to 166 in 5b5dd48
This code unconditionally loads the classes from all modules in native-image-modules.list with NativeImageClassLoader . I'm currently testing if 4a5f6ae is a way to improve the situation. (I.e. only when truffles native-image.properties file is active we have -Dtruffle.TruffleRuntime=com.oracle.svm.truffle.api.SubstrateTruffleRuntime . Thus we should be able to use it as an indicator for building truffle images. cc @christianwimmer
|
Yes, but if the |
Last week I had a look to see how different build times are. Running David's native image test in the description in my local environment, GraalVM CE 21.0.0.2 Java 11 is ~8-9% slower compared to the Java 8 version. As @cstancu said on this comment, the fact that Looking at the reports coming out of analysis (e.g. printed when passing in I didn't dig into the differences in |
Native Image build times have been improved since this report. |
Describe GraalVM and your environment :
19.3.1
Linux 5.1.11-200.fc29.x86_64 #1 SMP Mon Jun 17 19:30:44 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
java -Xinternalversion
:and
Have you verified this issue still happens when using the latest snapshot?
Not yet.
Describe the issue
A repeated build of the same project takes about 20% longer when building for Java 11 than Java 8. Practically speaking, this is causing capacity issues on our CI.
Describe the full native-image command
Code snippet or code repository that reproduces the issue
In order to characterize this issue in a rational way, we've reproduced the issue in the context of an existing example Quarkus-based project built into a native image. Here are the steps to reproduce my results. Requires Maven 3.6.0 and Git.
git clone [email protected]:quarkusio/quarkus.git
cd quarkus
git checkout a63bba571d2a7b0d9f569b8a2a9df369f8378137
mvn install -DskipTests -DskipITs
In a new directory:
git clone [email protected]:quarkusio/quarkus-quickstarts.git
cd quarkus-quickstarts/validation-quickstart
java
andnative-image
are in yourPATH
GRAALVM_HOME
andJAVA_HOME
env vars point to the GraalVM instance being tested (8 or 11)mvn clean -Dquarkus.version=999-SNAPSHOT
mvn install -Dquarkus.version=999-SNAPSHOT -Dnative
Expected behavior
It is expected that build times between Java 8 and 11 be largely similar.
Additional context
Viewing the build timings that are displayed by
native-image
, it seems that there isn't one single place where things run slower. Rather it's fairly evenly distributed. So, there might be some overall problem like GC having an effect.We're going to try to gather additional data around things like memory usage and so forth.
Here's a graph showing total time across 5 runs:
The text was updated successfully, but these errors were encountered: