Repository navigation
Expand file tree
/
Copy pathDockerfile
More file actions
51 lines (44 loc) · 2.58 KB
/
Copy pathDockerfile
File metadata and controls
51 lines (44 loc) · 2.58 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
# Runs the interpreter in a container so the benchmark measures both systems the
# same way (see src/benchmark/METHODOLOGY.md): with the application on the host, every request
# from the benchmark client reached LOCAL without crossing the Docker VM boundary
# while REFERENCE always paid that crossing, and conversely LOCAL paid it on every
# Cypher round trip. Measured at ~1 ms per crossing — enough to matter for queries
# in the single-digit millisecond range, with no clear direction. Containerising
# the application makes the topology symmetric: client -> app (one crossing),
# app -> database (inside the VM).
#
# Build the jar first: ./gradlew bootJar
FROM eclipse-temurin:26-jre
# The benchmark setup verifies this revision before it reuses an already-built
# image for another fresh-volume block. Rebuilding the same source can still
# produce a different image ID (for example because package metadata changes),
# so final replicate series reuse one exact image rather than merely trusting
# the tag or source commit.
ARG BENCHMARK_SOURCE_COMMIT=unknown
LABEL org.opencontainers.image.revision="${BENCHMARK_SOURCE_COMMIT}"
# The JRE image ships neither wget nor curl; the compose healthcheck needs one to
# probe a real endpoint rather than merely checking that the port is open.
RUN apt-get update \
&& apt-get install -y --no-install-recommends curl \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /app
# Exact bootJar output; never match the non-executable `-plain.jar` by accident.
COPY build/libs/processm-interpreter.jar /app/application.jar
# The heap is sized by the same rule the reference implementation applies to itself
# (processm.launcher/src/main/docker/docker-start-processm.sh): half of the memory
# available to the container — the cgroup limit when one is set, otherwise total RAM.
# Matching their policy removes a fairness objection, since a fixed -Xmx here gave
# the reference roughly twice our ceiling.
#
# No -Xms on purpose: forcing an initial heap inflated the idle baseline by ~200 MiB
# (589 MiB with -Xms512m versus 389 MiB without) without affecting throughput, which
# would have distorted the Q3 memory comparison. The ceiling itself barely matters
# for measured usage (389 MiB at -Xmx2g versus 393 MiB at -Xmx3968m).
#
# JVM_HEAP_OPTS overrides the computed value; it is named so that EnvironmentProbe's
# memory-config filter records it in environment.json (it matches keys containing
# "heap"/"memory"), keeping the heap settings part of the documented environment.
ENV JVM_HEAP_OPTS=""
EXPOSE 8080
COPY docker/entrypoint.sh /app/entrypoint.sh
ENTRYPOINT ["sh", "/app/entrypoint.sh"]