Skip to content

Commit 592661e

Browse files
committed
[GR-35619] [GR-49817] [GR-49813] Enable microservice benchmarks on aarch64.
PullRequest: graal/15949
2 parents ba61de6 + df436d1 commit 592661e

File tree

5 files changed

+60
-52
lines changed

5 files changed

+60
-52
lines changed

compiler/ci/ci_common/benchmark-suites.libsonnet

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@
214214
bench_upload,
215215
self.benchmark_cmd + ["petclinic-wrk:mixed-medium"] + hwlocBind_4C_4T + ["--"] + self.extra_vm_args + ["-Xms80m", "-Xmx256m", "-XX:ActiveProcessorCount=4"],
216216
bench_upload,
217-
self.benchmark_cmd + ["petclinic-wrk:mixed-large"] + hwlocBind_16C_16T + ["--"] + self.extra_vm_args + ["-Xms320m", "-Xmx1280m", "-XX:ActiveProcessorCount=16"],
217+
self.benchmark_cmd + ["petclinic-wrk:mixed-large"] + hwlocBind_16C_16T + ["--"] + self.extra_vm_args + ["-Xms128m", "-Xmx512m", "-XX:ActiveProcessorCount=16"],
218218
bench_upload,
219219
self.benchmark_cmd + ["petclinic-wrk:mixed-huge"] + hwlocBind_16C_32T + ["--"] + self.extra_vm_args + ["-Xms640m", "-Xmx3072m", "-XX:ActiveProcessorCount=32"],
220220
bench_upload,
@@ -226,7 +226,6 @@
226226
bench_upload
227227
],
228228
timelimit: "7:00:00",
229-
restricted_archs:: ["amd64"], # load testers only work on amd64 at the moment: GR-35619
230229
min_jdk_version:: 11,
231230
max_jdk_version:: null
232231
},

java-benchmarks/mx.java-benchmarks/mx_java_benchmarks.py

Lines changed: 8 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -250,11 +250,8 @@ def uses_bundles(self):
250250

251251

252252
class BasePetClinicBenchmarkSuite(BaseSpringBenchmarkSuite):
253-
def availableSuiteVersions(self):
254-
return ["3.0.0"]
255-
256-
def defaultSuiteVersion(self):
257-
return "3.0.0"
253+
def version(self):
254+
return "3.0.1"
258255

259256
def applicationDist(self):
260257
return mx.library("PETCLINIC_" + self.version(), True).get_path(True)
@@ -295,11 +292,8 @@ def rules(self, out, benchmarks, bmSuiteArgs):
295292

296293

297294
class BaseSpringHelloWorldBenchmarkSuite(BaseSpringBenchmarkSuite):
298-
def availableSuiteVersions(self):
299-
return ["3.0.5"]
300-
301-
def defaultSuiteVersion(self):
302-
return "3.0.5"
295+
def version(self):
296+
return "3.0.6"
303297

304298
def applicationDist(self):
305299
return mx.library("SPRING_HW_" + self.version(), True).get_path(True)
@@ -378,7 +372,7 @@ def extra_image_build_argument(self, benchmark, args):
378372

379373
class BaseTikaBenchmarkSuite(BaseQuarkusBenchmarkSuite):
380374
def version(self):
381-
return "1.0.8"
375+
return "1.0.10"
382376

383377
def applicationDist(self):
384378
return mx.library("TIKA_" + self.version(), True).get_path(True)
@@ -418,7 +412,7 @@ def rules(self, out, benchmarks, bmSuiteArgs):
418412

419413
class BaseQuarkusHelloWorldBenchmarkSuite(BaseQuarkusBenchmarkSuite):
420414
def version(self):
421-
return "1.0.3"
415+
return "1.0.5"
422416

423417
def applicationDist(self):
424418
return mx.library("QUARKUS_HW_" + self.version(), True).get_path(True)
@@ -593,7 +587,7 @@ def extra_image_build_argument(self, benchmark, args):
593587

594588
class BaseShopCartBenchmarkSuite(BaseMicronautBenchmarkSuite):
595589
def version(self):
596-
return "0.3.8"
590+
return "0.3.9"
597591

598592
def applicationDist(self):
599593
return mx.library("SHOPCART_" + self.version(), True).get_path(True)
@@ -641,7 +635,7 @@ def rules(self, out, benchmarks, bmSuiteArgs):
641635

642636
class BaseMicronautHelloWorldBenchmarkSuite(BaseMicronautBenchmarkSuite):
643637
def version(self):
644-
return "1.0.5"
638+
return "1.0.6"
645639

646640
def applicationDist(self):
647641
return mx.library("MICRONAUT_HW_" + self.version(), True).get_path(True)

java-benchmarks/mx.java-benchmarks/suite.py

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,9 @@
3232
"javac.lint.overrides": "none",
3333

3434
"libraries" : {
35-
"TIKA_1.0.8": {
36-
"urls": ["https://lafo.ssw.uni-linz.ac.at/pub/graal-external-deps/tika-1.0.8.zip"],
37-
"digest": "sha512:2b7d147f27eba65a5a38385de9b08b5520d4960219acf09ceae5525e5b51fda118ea4b4b46d91594de0794a739eb8709850bf673f5fce49b2f27962cd5d8af3d",
35+
"TIKA_1.0.10": {
36+
"urls": ["https://lafo.ssw.uni-linz.ac.at/pub/graal-external-deps/tika-1.0.10.zip"],
37+
"digest": "sha512:023e3c575c88fa2754538bf9f61a0642f12f34b6239d17df184f92c5708e1b2fdc3b4219c9d658ab88d5f9ed444d2883a500014df3c7942263050da256c6a5a3",
3838
"packedResource": True,
3939
},
4040

@@ -50,33 +50,33 @@
5050
"packedResource": True
5151
},
5252

53-
"PETCLINIC_3.0.0": {
54-
"urls": ["https://lafo.ssw.uni-linz.ac.at/pub/graal-external-deps/spring-petclinic-3.0.0.zip"],
55-
"digest": "sha512:cacbedf0456a769ae5bd022480b1ceeb8f157684b79f682b70c27fd715a4523cd80e030f127c7a9cff8c6b256a83677d2285e6197b82ecd53f99a5231dfd76e9",
53+
"PETCLINIC_3.0.1": {
54+
"urls": ["https://lafo.ssw.uni-linz.ac.at/pub/graal-external-deps/spring-petclinic-3.0.1.zip"],
55+
"digest": "sha512:37d50049530ac23342a0e5adcf1c2a72b64312685ce407bc9dac577835d0df5e0548e72676e8a3a7bc670cf603d6b0c6e450f1ce8592f1f17681b6ddea602cda",
5656
"packedResource": True,
5757
},
5858

59-
"SHOPCART_0.3.8": {
60-
"urls": ["https://lafo.ssw.uni-linz.ac.at/pub/graal-external-deps/shopcart-0.3.8.zip"],
61-
"digest": "sha512:07eb59fae6a2245ef7dd628488e3c970336ba75c6a379899d222c418bb14d4b34019b25ce422e0f0e90cdd79c4ae7fc38f47c9c5a25d504e8a0f922fa28fa90a",
59+
"SHOPCART_0.3.9": {
60+
"urls": ["https://lafo.ssw.uni-linz.ac.at/pub/graal-external-deps/shopcart-0.3.9.zip"],
61+
"digest": "sha512:8a6095426c14fab7146c2ffd368c38069321983b38b2e8c75ab4b900ccda7c86723854a61d20f9c7779a49b41fc0ddfd806988458cc76088a8ab2be5acb4df48",
6262
"packedResource": True,
6363
},
6464

65-
"SPRING_HW_3.0.5": {
66-
"urls": ["https://lafo.ssw.uni-linz.ac.at/pub/graal-external-deps/spring-hello-world-3.0.5.zip"],
67-
"digest": "sha512:fc016eecfdbb8fe29a825470630fbfe7fe2742d5241894bf0a15cbb14170b8d6eff540714a9a4f66cf233422570c8918665d8564a7a8a3d73c003df71b370a52",
65+
"SPRING_HW_3.0.6": {
66+
"urls": ["https://lafo.ssw.uni-linz.ac.at/pub/graal-external-deps/spring-hello-world-3.0.6.zip"],
67+
"digest": "sha512:15a7fd76e47af62b25f66be0b12020f068202ced3b5cb96e6aed8b23cd60a037595ebb1b843a2e123051c08a18b5348133bc419c2b1f94364d263c13b3268ee1",
6868
"packedResource": True,
6969
},
7070

71-
"QUARKUS_HW_1.0.3": {
72-
"urls": ["https://lafo.ssw.uni-linz.ac.at/pub/graal-external-deps/quarkus-hello-world-1.0.3.zip"],
73-
"digest": "sha512:dd9502099953f2ac977e2505fca07a74bd3ac012badfd762918172d121c567fb7ce6ca9420c5c45e64a3343d1796232eea2f74ccb2d5c30c86759c1f73b565c0",
71+
"QUARKUS_HW_1.0.5": {
72+
"urls": ["https://lafo.ssw.uni-linz.ac.at/pub/graal-external-deps/quarkus-hello-world-1.0.5.zip"],
73+
"digest": "sha512:682a5dd39c27717d1e96a0c55f531a308f97266cc5abf4a9b7ecf3094a18b4a71cfb9630cb74be29b0580794190e25f538b5587856fa44cd35c34e1cab6ddcff",
7474
"packedResource": True,
7575
},
7676

77-
"MICRONAUT_HW_1.0.5": {
78-
"urls": ["https://lafo.ssw.uni-linz.ac.at/pub/graal-external-deps/micronaut-hello-world-1.0.5.zip"],
79-
"digest": "sha512:71b998f46784ec807de8e8b6cc9c55ee043171a4601ea5594f51d9d982b396c72bf59c0e426d3dbf44db9162cb34c73bfef9be48f57b79590777e6ff7081262c",
77+
"MICRONAUT_HW_1.0.6": {
78+
"urls": ["https://lafo.ssw.uni-linz.ac.at/pub/graal-external-deps/micronaut-hello-world-1.0.6.zip"],
79+
"digest": "sha512:62f5c22c7217f42ffb0e53fffdbdf7add7ad4b6828c59967a2cae29e94120d0f88699ce14aca1b0cc39150119532d7c20c8e8b60fe097524b471094512b2ce58",
8080
"packedResource": True,
8181
},
8282

sdk/mx.sdk/mx_sdk_benchmark.py

Lines changed: 31 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -569,13 +569,14 @@ def run_stage(self, vm, stage, server_command, out, err, cwd, nonZeroIsFatal):
569569
mx.abort("The server application unexpectedly ended with return code " + str(returnCode))
570570

571571
if self.measureLatency:
572-
# Calibrate for latency measurements (without RSS tracker)
573-
with EmptyEnv(self.get_env()):
574-
measurementThread = self.startDaemonThread(BaseMicroserviceBenchmarkSuite.calibrateLatencyTestInBackground, [self])
575-
returnCode = mx.run(serverCommandWithoutTracker, out=out, err=err, cwd=cwd, nonZeroIsFatal=nonZeroIsFatal)
576-
measurementThread.join()
577-
if not self.validateReturnCode(returnCode):
578-
mx.abort("The server application unexpectedly ended with return code " + str(returnCode))
572+
if not any([c.get("requests-per-second") for c in self.loadConfiguration("latency")]):
573+
# Calibrate for latency measurements (without RSS tracker) if no fixed request rate has been provided in the config
574+
with EmptyEnv(self.get_env()):
575+
measurementThread = self.startDaemonThread(BaseMicroserviceBenchmarkSuite.calibrateLatencyTestInBackground, [self])
576+
returnCode = mx.run(serverCommandWithoutTracker, out=out, err=err, cwd=cwd, nonZeroIsFatal=nonZeroIsFatal)
577+
measurementThread.join()
578+
if not self.validateReturnCode(returnCode):
579+
mx.abort("The server application unexpectedly ended with return code " + str(returnCode))
579580

580581
# Measure latency (without RSS tracker)
581582
with EmptyEnv(self.get_env()):
@@ -696,12 +697,13 @@ def run(self, benchmarks, bmSuiteArgs):
696697
measurementThread.join()
697698

698699
if self.measureLatency:
699-
# Calibrate for latency measurements (without RSS tracker)
700-
mx_benchmark.disable_tracker()
701-
with EmptyEnv(self.get_env()):
702-
measurementThread = self.startDaemonThread(BaseMicroserviceBenchmarkSuite.calibrateLatencyTestInBackground, [self])
703-
datapoints += super(BaseMicroserviceBenchmarkSuite, self).run(benchmarks, remainder)
704-
measurementThread.join()
700+
if not [c.get("requests-per-second") for c in self.loadConfiguration("latency") if c.get("requests-per-second")]:
701+
# Calibrate for latency measurements (without RSS tracker) if no fixed request rate has been provided in the config
702+
mx_benchmark.disable_tracker()
703+
with EmptyEnv(self.get_env()):
704+
measurementThread = self.startDaemonThread(BaseMicroserviceBenchmarkSuite.calibrateLatencyTestInBackground, [self])
705+
datapoints += super(BaseMicroserviceBenchmarkSuite, self).run(benchmarks, remainder)
706+
measurementThread.join()
705707

706708
# Measure latency (without RSS tracker)
707709
with EmptyEnv(self.get_env()):
@@ -875,6 +877,7 @@ def loadConfiguration(self, groupKey):
875877
"script" : [<lua scripts that will be executed sequentially>],
876878
"warmup-requests-per-second" : [<requests per second during the warmup run (one entry per lua script)>],
877879
"warmup-duration" : [<duration of the warmup run (one entry per lua script)>],
880+
"requests-per-second" : [<requests per second during the run> (one entry per lua script)>],
878881
"duration" : [<duration of the test (one entry per lua script)>]
879882
}
880883
}
@@ -896,6 +899,7 @@ def loadConfiguration(self, groupKey):
896899
script = self.readConfig(group, "script")
897900
warmupRequestsPerSecond = self.readConfig(group, "warmup-requests-per-second")
898901
warmupDuration = self.readConfig(group, "warmup-duration")
902+
requestsPerSecond = self.readConfig(group, "requests-per-second", optional=True)
899903
duration = self.readConfig(group, "duration")
900904

901905
scalarScriptValue = self.isScalarValue(script)
@@ -912,6 +916,8 @@ def loadConfiguration(self, groupKey):
912916
result["warmup-requests-per-second"] = warmupRequestsPerSecond
913917
result["warmup-duration"] = warmupDuration
914918
result["duration"] = duration
919+
if requestsPerSecond:
920+
result["requests-per-second"] = requestsPerSecond
915921
results.append(result)
916922
else:
917923
count = len(script)
@@ -927,15 +933,19 @@ def loadConfiguration(self, groupKey):
927933
result["warmup-requests-per-second"] = warmupRequestsPerSecond[i]
928934
result["warmup-duration"] = warmupDuration[i]
929935
result["duration"] = duration[i]
936+
if requestsPerSecond:
937+
result["requests-per-second"] = requestsPerSecond[i]
930938
results.append(result)
931939

932940
return results
933941

934-
def readConfig(self, config, key):
942+
def readConfig(self, config, key, optional=False):
935943
if key in config:
936944
return config[key]
945+
elif optional:
946+
return None
937947
else:
938-
mx.abort(key + " not specified in Wrk configuration.")
948+
mx.abort(f"Mandatory entry {key} not specified in Wrk configuration.")
939949

940950
def isScalarValue(self, value):
941951
return type(value) in (int, float, bool) or isinstance(value, ("".__class__, u"".__class__)) # pylint: disable=unidiomatic-typecheck
@@ -1012,7 +1022,12 @@ def testLatency(self):
10121022
for i in range(numScripts):
10131023
# Measure latency using a constant rate (based on the previously measured max throughput).
10141024
config = configs[i]
1015-
expectedRate = int(self.calibratedThroughput[i] * 0.75)
1025+
if configs[i].get("requests-per-second"):
1026+
expectedRate = configs[i]["requests-per-second"]
1027+
mx.log(f"Using configured fixed throughput {expectedRate} ops/s for latency measurements.")
1028+
else:
1029+
expectedRate = int(self.calibratedThroughput[i] * 0.75)
1030+
mx.log(f"Using dynamically computed throughput {expectedRate} ops/s for latency measurements (75% of max throughput).")
10161031
wrkFlags = self.getLatencyFlags(config, expectedRate)
10171032
constantRateOutput = self.runWrk2(wrkFlags)
10181033
self.verifyThroughput(constantRateOutput, expectedRate)

sdk/mx.sdk/suite.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,8 +85,8 @@
8585
"license": "Apache-2.0-wrk-a211dd5",
8686
},
8787
"WRK2_MULTIARCH": {
88-
"urls": ["https://lafo.ssw.uni-linz.ac.at/pub/graal-external-deps/wrk2-multiarch-2.0.tar.gz"],
89-
"digest": "sha512:94629a69ebf2d683c6ea6c61dc86729d121e70c30a25ec6daf8fd70b74f6ebb694a5973a3d3e2f9c624efa418b51a550868d6951de9d7277d2028e0c8078e4b4",
88+
"urls": ["https://lafo.ssw.uni-linz.ac.at/pub/graal-external-deps/wrk2-multiarch-2.1.tar.gz"],
89+
"digest": "sha512:ed237a2d899782198adbc6cad70e971590379526a01465917fc6fbcbbac6a7f2cf015a5b441fcc617d72526aaf9be8db478e201bb390f7090c32b03a9e5f8614",
9090
"packedResource": True,
9191
"license": "Apache-2.0",
9292
},

0 commit comments

Comments
 (0)