java™ performance testing for everyone - eclipsecon 2020...– modern language runtimes care about...

19
Java™ Performance Testing for Everyone Presented By: Shelley Lambert (AdoptOpenJDK Committer, Eclipse OpenJ9 Committer, IBM Runtimes Test Lead)

Upload: others

Post on 15-Oct-2020

2 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Java™ Performance Testing for Everyone - EclipseCon 2020...– Modern language runtimes care about many different metrics • Throughput, Startup Time, Ramp-up Time, Compile Time

Java™PerformanceTestingforEveryone

PresentedBy:

ShelleyLambert(AdoptOpenJDKCommitter,EclipseOpenJ9Committer,IBMRuntimesTestLead)

Page 2: Java™ Performance Testing for Everyone - EclipseCon 2020...– Modern language runtimes care about many different metrics • Throughput, Startup Time, Ramp-up Time, Compile Time

WhoAmI?

VariousRolesDeveloper/TestLeadDevelopmentManagerYogaTeachertuneupfitness.com/teacher/shelley-lambert

ChiefFoodForesterottawafoodforests.comnanabushfoodforests.com

Page 3: Java™ Performance Testing for Everyone - EclipseCon 2020...– Modern language runtimes care about many different metrics • Throughput, Startup Time, Ramp-up Time, Compile Time

TheScope

AdoptOpenJDK

•  Projects:EclipseOMR,EclipseOpenJ9,AdoptOpenJDK•  EnsuringFreeandVerifiedJava™fortheCommunity•  6+Jenkinsservers

•  18+platforms•  6+versions,4+implementations•  7+testcategories->100,000’softests

•  18x6x4x100000=~43milliontests…nightly,aroundtheworld!

Page 4: Java™ Performance Testing for Everyone - EclipseCon 2020...– Modern language runtimes care about many different metrics • Throughput, Startup Time, Ramp-up Time, Compile Time

Wheretostartwithperformance?•  ThestoryofJavaperformance

– Nosinglerecipe(Manyfactors:JVMimplementation,hardware,applicationdesign)

–  JVMsevolve,performanceimproves

•  JVMs“complex,intricate,subtle”

•  Wouldn’titbegreatifitweresimple?-XX:goFaster,-XX:useLessResources

Page 5: Java™ Performance Testing for Everyone - EclipseCon 2020...– Modern language runtimes care about many different metrics • Throughput, Startup Time, Ramp-up Time, Compile Time

TheIntersection•  Necessary

–  developersneedtoknowifthecodetheywriteaffectsperformance

–  currentlyusingdiversesetoftoolsandapproaches,home-madescripts,duplication,lostlearningopportunities

•  Impossible–  measuringperformanceoftenstatedas“toohard”todo

Necessary Impossible

Page 6: Java™ Performance Testing for Everyone - EclipseCon 2020...– Modern language runtimes care about many different metrics • Throughput, Startup Time, Ramp-up Time, Compile Time

Definingthe“Impossible”•  Whatisperformancetesting?

–  Oftencalled”Experimentalscience”–  “Testingifasystemaccomplishesitsdesignatedfunctionswithingivenconstraintsregardingprocessingtimeandthroughputrate.”*

•  Goodperformance?Speed,resourcesorablend– Modernlanguageruntimescareaboutmanydifferentmetrics

•  Throughput,StartupTime,Ramp-upTime,CompileTime•  Footprint

–  AverageResidentSetSize–  CompilationMemoryConsumption–  PeakResidentSetSize

*Witteveen,Albert.Performancetesting-apracticalguide(KindleLocations176-177).

Page 7: Java™ Performance Testing for Everyone - EclipseCon 2020...– Modern language runtimes care about many different metrics • Throughput, Startup Time, Ramp-up Time, Compile Time

WhattomeasureMetricname Whatto

measure?Constraints Inputstovary

Throughput #oftransactions time

Latency Timeforsingletransaction

#oftransactions Workload(increases)

Capacity #ofsimultaneoustransactions

Throughputorlatency Parallelloadonthesystem

Utilization Useofresources workload

Efficiency Throughput/utilization

Scalability Throughputorcapacity

Resources(added)

Degradation Latencyorthroughput

utilization Workload(increases)

Explicitorimplicit‘inputs’tonormalize:HW,OS,systemsetup

Page 8: Java™ Performance Testing for Everyone - EclipseCon 2020...– Modern language runtimes care about many different metrics • Throughput, Startup Time, Ramp-up Time, Compile Time

BasicSteps•  Setagoal–whichmetric(s)toimprove

•  Measure–buthow?tools?

•  Adjust–applyyourexperiments

•  Measureagain–howexhaustive?

•  Verifygoal–didthemetricsimprove?enough?

Page 9: Java™ Performance Testing for Everyone - EclipseCon 2020...– Modern language runtimes care about many different metrics • Throughput, Startup Time, Ramp-up Time, Compile Time

AdoptOpenJDKTestinggithub.com/AdoptOpenJDK/openjdk-tests

•  Thewildlydifferent‘fruit’,howtomakethemeasilyconsumable

“ConsolidateandCurate”

functional openjdk perfjckexternalsystem

testkitgen

testNG,cmdlinetester

STF junit&others javatest Assorted

benchmarksjtreg

Page 10: Java™ Performance Testing for Everyone - EclipseCon 2020...– Modern language runtimes care about many different metrics • Throughput, Startup Time, Ramp-up Time, Compile Time

PerformanceBenchmarks(Large-scaleandMicrobenchmarksatAdoptOpenJDK)

bbenchacme-air libertydt jmhidlespark odm

perf

Assortedbenchmarks

… … … …

Largescale

Microbenchmarks

Page 11: Java™ Performance Testing for Everyone - EclipseCon 2020...– Modern language runtimes care about many different metrics • Throughput, Startup Time, Ramp-up Time, Compile Time

Introducinggithub.com/AdoptOpenJDK/openjdk-test-tools

•  PerfNext-configure,tuneandlaunchperformancebenchmarks.

•  TestResultsSummaryService(TRSS)-summarizeandvisualizedifferenttestresultsincludingperfresults,pushdifferentsetsoftestresultstoaDB,searchtestandcompareresultsacrossdifferentplatforms,reportondifferencesbetweenjobs

•  Futureservices–resultanalytics,testgeneration,coreanalytics,bugprediction

Page 12: Java™ Performance Testing for Everyone - EclipseCon 2020...– Modern language runtimes care about many different metrics • Throughput, Startup Time, Ramp-up Time, Compile Time
Page 13: Java™ Performance Testing for Everyone - EclipseCon 2020...– Modern language runtimes care about many different metrics • Throughput, Startup Time, Ramp-up Time, Compile Time

Tracktheprogressofbenchmarkrunsandverifytheiroutput

Page 14: Java™ Performance Testing for Everyone - EclipseCon 2020...– Modern language runtimes care about many different metrics • Throughput, Startup Time, Ramp-up Time, Compile Time

TRSS–PerformanceComparison

Page 15: Java™ Performance Testing for Everyone - EclipseCon 2020...– Modern language runtimes care about many different metrics • Throughput, Startup Time, Ramp-up Time, Compile Time

TRSS–PerformanceComparison

Page 16: Java™ Performance Testing for Everyone - EclipseCon 2020...– Modern language runtimes care about many different metrics • Throughput, Startup Time, Ramp-up Time, Compile Time

TRSS–RegressionAnalysis

1month

All data

7days

Page 17: Java™ Performance Testing for Everyone - EclipseCon 2020...– Modern language runtimes care about many different metrics • Throughput, Startup Time, Ramp-up Time, Compile Time

BumbleBench“MicrobenchmarksSimplified”

github.com/AdoptOpenJDK/bumblebench

•  WritingagoodmicrobenchwithanoptimizingJITrunningyourcodeishard– areyoumeasuringwhatyouthinkyouaremeasuring?

•  BumbleBenchisaJavaframeworkthatprovideahookpointtoimplementthebenchmarkpayload

•  Frameworkprovidestheoutertimingloop,scoringinfrastructure,etc.

Page 18: Java™ Performance Testing for Everyone - EclipseCon 2020...– Modern language runtimes care about many different metrics • Throughput, Startup Time, Ramp-up Time, Compile Time

Conclusion•  Perfishard(notimpossible)

– Highresourcerequirementsforfull-scaletesting– Microbenchmarksdifficulttowrite– Dataisnoisyandsubjecttointerpretation

•  Buildingtoolstomakeperfeasier– TRSS/PerfNext / BumbleBench

•  AdoptOpenJDKgitrepos:openjdk-tests,openjdk-test-tools,bumblebench

•  Comingsoon->trss.adoptopenjdk.net

•  OpenCollaborationleadstogreaterInnovation–  “Innovationiscreativitywithajobtodo.”–JohnEmmerling

Page 19: Java™ Performance Testing for Everyone - EclipseCon 2020...– Modern language runtimes care about many different metrics • Throughput, Startup Time, Ramp-up Time, Compile Time

AdoptOpenJDK

adoptopenjdk.netAdoptOpenJDK/openjdk-tests @adoptopenjdk

eclipse.org/openj9eclipse/openj9 @openj9

eclipse.org/omreclipse.org/omr @eclipseomr

UpcomingTalks:PerformanceTestingforEveryoneAdoptOpenJDK:EnsuringFreeJavafortheCommunityFuzzyPlansandOtherTestIntegrationsShakingSticksandTestingOpenJDKImplementations

Connect&Collaborate!WebsiteGithubTwitter

8thdaytesting.comsmlambert @ShelleyMLambert