Skip to content

Commit b28b070

Browse files
committed
fix: update Dockerfile comments and remove ZGC options for optimized performance
1 parent 9cafa1b commit b28b070

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

core/Dockerfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,16 +23,16 @@ COPY target/plugins/lib/*.jar plugins/lib/
2323
ENV RHO='/mclient/connection-string->"mongodb://host.docker.internal";/http-listener/host->"0.0.0.0"'
2424

2525
# JDK 25 optimized for RESTHeart: low-latency REST API, 1-2 vCPU, 1-2GB container RAM
26-
# ZGC (generational) for predictable pause times with Virtual Threads and short-lived request objects
26+
# Default G1 GC is the best fit: MongoDB is the bottleneck, not the JVM.
27+
# ZGC would add CPU and memory overhead with no benefit when virtual threads
28+
# are mostly parked on I/O. G1 pause times are short enough at 1-2GB heaps.
2729
# NOTE: Graal JIT is enabled by default to support GraalVM polyglot plugin capabilities.
2830
# If you are not using polyglot plugins, adding -XX:-UseJVMCICompiler will reduce
2931
# compiler memory overhead significantly in constrained containers (recommended for <512Mi heap).
3032
ENTRYPOINT [ "java", \
3133
"-Dfile.encoding=UTF-8", \
3234
"--enable-native-access=ALL-UNNAMED", \
3335
"--sun-misc-unsafe-memory-access=allow", \
34-
"-XX:+UseZGC", \
35-
"-XX:+ZGenerational", \
3636
"-XX:MaxRAMPercentage=70.0", \
3737
"-XX:InitialRAMPercentage=25.0", \
3838
"-XX:+DisableExplicitGC", \

0 commit comments

Comments
 (0)