Skip to content

Commit d681f03

Browse files
authored
Remove the need for root access (#48)
#43
1 parent 6cbaf43 commit d681f03

File tree

3 files changed

+21
-12
lines changed

3 files changed

+21
-12
lines changed

scripts/infra.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ exit_abnormal() {
2121
start_postgres() {
2222
echo "Starting PostgreSQL database '${DB_CONTAINER_NAME}'"
2323
local pid=$(${engine} run \
24+
--cpus 2 \
25+
--memory 128m \
2426
-d \
2527
--rm \
2628
--name ${DB_CONTAINER_NAME} \

scripts/perf-lab/helpers/cgroups.yml

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -34,12 +34,20 @@ scripts:
3434
- script: sudo
3535
with:
3636
command: echo "+memory" >> /sys/fs/cgroup/${{CGROUP_NAME:perf-cgroup}}/cgroup.subtree_control
37-
- script: sudo
38-
with:
39-
command: echo ${{CGROUP_CPUSET}} > /sys/fs/cgroup/${{CGROUP_NAME:perf-cgroup}}/tasks/cpuset.cpus
40-
- script: sudo
41-
with:
42-
command: echo ${{CGROUP_MAX_MEM}} > /sys/fs/cgroup/${{CGROUP_NAME:perf-cgroup}}/tasks/memory.max
37+
- read-state: ${{CGROUP_CPUSET}}
38+
then:
39+
- regex: .+
40+
then:
41+
- script: sudo
42+
with:
43+
command: echo ${{CGROUP_CPUSET}} > /sys/fs/cgroup/${{CGROUP_NAME:perf-cgroup}}/tasks/cpuset.cpus
44+
- read-state: ${{CGROUP_MAX_MEM}}
45+
then:
46+
- regex: .+
47+
then:
48+
- script: sudo
49+
with:
50+
command: echo ${{CGROUP_MAX_MEM}} > /sys/fs/cgroup/${{CGROUP_NAME:perf-cgroup}}/tasks/memory.max
4351
else:
4452
- log: "Non-Linux OS doesn't support cgroups"
4553

scripts/perf-lab/run-benchmarks.sh

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,18 +20,17 @@ help() {
2020
echo " -f <OUTPUT_DIR> The directory containing the run output"
2121
echo " Default: /tmp"
2222
echo " -g <GRAALVM_VERSION> The GraalVM version to use if running any native tests (from SDKMAN)"
23-
echo " Default: 25-graalce"
23+
echo " Default: 25.0.1-graalce"
2424
echo " -h <HOST> The HOST to run the benchmarks on"
2525
echo " LOCAL is a keyword that can be used to run everything on the local machine"
2626
echo " Default: LOCAL"
2727
echo " -i <ITERATIONS> The number of iterations to run each test"
2828
echo " Default: 3"
2929
echo " -j <JAVA_VERSION> The Java version to use (from SDKMAN)"
30-
echo " Default: 25-tem"
30+
echo " Default: 25.0.1-tem"
3131
echo " -l <SCM_REPO_URL> The SCM repo url"
3232
echo " Default: 'https://github.com/quarkusio/spring-quarkus-perf-comparison.git'"
3333
echo " -m <CGROUPS_MAX_MEMORY> Constrain available memory via cgroups"
34-
echo " Default: 14G"
3534
echo " -n <NATIVE_QUARKUS_BUILD_OPTIONS> Native build options to be passed to Quarkus native build process"
3635
echo " -o <NATIVE_SPRING_BUILD_OPTIONS> Native build options to be passed to Spring native build process"
3736
echo " -p <PROFILER> Enable profiling with async profiler"
@@ -208,11 +207,11 @@ ${JBANG_CMD} qDup@hyperfoil \
208207
CGROUPS_CPUS=""
209208
SCM_REPO_URL="https://github.com/quarkusio/spring-quarkus-perf-comparison.git"
210209
SCM_REPO_BRANCH="main"
211-
GRAALVM_VERSION="25-graalce"
210+
GRAALVM_VERSION="25.0.1-graalce"
212211
HOST="LOCAL"
213212
ITERATIONS="3"
214-
JAVA_VERSION="25-tem"
215-
CGROUPS_MAX_MEMORY="14G"
213+
JAVA_VERSION="25.0.1-tem"
214+
CGROUPS_MAX_MEMORY=""
216215
NATIVE_QUARKUS_BUILD_OPTIONS=""
217216
NATIVE_SPRING_BUILD_OPTIONS=""
218217
PROFILER="none"

0 commit comments

Comments
 (0)