Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions docker-compose/docker-compose.base.yml
Original file line number Diff line number Diff line change
Expand Up @@ -310,15 +310,15 @@ services:
condition: "service_started"
required: false
environment:
- JAVA_TOOL_OPTIONS=-Xmx576m
- JAVA_TOOL_OPTIONS=-Xmx576m #deployment: 3072m for large networks
command: --server.port=80 --spring.config.additional-location=/config/
sysctls:
- net.ipv4.ip_unprivileged_port_start=0 # for docker < 20.03.0
memswap_limit: 1g
memswap_limit: 1g #deployment: 4540m for large networks

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Use "Mi" notation for consistency with K8s config.

The comments reference "4540m" but the K8s deployment uses 4540Mi. These are not equivalent:

  • 4540Mi (mebibytes) ≈ 4760 MB
  • 4540m (megabytes in Docker) = 4540 MB

This ~220 MB discrepancy could mislead developers adjusting memory for large networks. Consider updating the comments to match the K8s notation.

📝 Suggested fix for notation consistency
-    memswap_limit: 1g  `#deployment`: 4540m for large networks
+    memswap_limit: 1g  `#deployment`: 4540Mi (~4760m) for large networks
     deploy:
       resources:
         limits:
-          memory: 1g  `#deployment`: 4540m for large networks
+          memory: 1g  `#deployment`: 4540Mi (~4760m) for large networks

Also applies to: 321-321

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docker-compose/docker-compose.base.yml` at line 317, The memswap_limit
comment notation is inconsistent with the K8s deployment configuration. Update
the comment on the memswap_limit line that references "4540m" to instead use
"4540Mi" notation (mebibytes) to match the K8s config and ensure consistency.
This change should also be applied to line 321 where a similar notation appears,
ensuring all memory references throughout the docker-compose configuration use
the "Mi" suffix consistently.

deploy:
resources:
limits:
memory: 1g
memory: 1g #deployment: 4540m for large networks

loadflow-server:
profiles:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ metadata:
gridsuite.org/springboot-with-s3: "true"
annotations:
gridsuite.org/cpu: cpu-xl
gridsuite.org/memory: memory-xxl
spec:
selector:
matchLabels:
Expand All @@ -25,6 +24,14 @@ spec:
containers:
- name: main
image: docker.io/powsybl/network-conversion-server:latest
env:
- name: JAVA_TOOL_OPTIONS
value: "-Xmx3072m"
resources:
requests:
memory: "4540Mi"
limits:
memory: "4540Mi"
volumeMounts:
- mountPath: /config/specific
name: network-conversion-server-configmap-specific-volume
Expand Down