Skip to content

Commit 85b2028

Browse files
heiskrCopilot
andauthored
Raise V8 heap percentage from 75% to 80% (#60365)
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent b38e950 commit 85b2028

File tree

3 files changed

+6
-4
lines changed

3 files changed

+6
-4
lines changed

Dockerfile

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -155,9 +155,11 @@ ENV BUILD_SHA=$BUILD_SHA
155155

156156
# V8 heap limit as a percentage of the container cgroup memory limit.
157157
# Uses --max-old-space-size-percentage (Node 24+) so the heap adapts
158-
# automatically when K8s memory limits change. 75% leaves ~25% headroom
158+
# automatically when K8s memory limits change. 80% leaves ~20% headroom
159159
# for off-heap memory (Buffers, V8 code cache, libuv) and OS overhead.
160-
ENV NODE_OPTIONS="--max-old-space-size-percentage=75"
160+
# Raised from 75% on advice from performance engineering to reduce GC
161+
# pressure during traffic spikes.
162+
ENV NODE_OPTIONS="--max-old-space-size-percentage=80"
161163

162164
# Entrypoint to start the server
163165
CMD ["node_modules/.bin/tsx", "src/frame/server.ts"]

config/moda/configuration/default/env.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ data:
33
NODE_ENV: production
44
# Matches the Dockerfile ENV. Both set the same value so that
55
# the heap limit is correct regardless of config-layering order.
6-
NODE_OPTIONS: '--max-old-space-size-percentage=75'
6+
NODE_OPTIONS: '--max-old-space-size-percentage=80'
77
PORT: '4000'
88
ENABLED_LANGUAGES: 'en,es,ja,pt,zh,ru,fr,ko,de'
99
RATE_LIMIT_MAX: '21'

config/moda/configuration/production/env.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ data:
33
NODE_ENV: production
44
# Matches the Dockerfile ENV. Both set the same value so that
55
# the heap limit is correct regardless of config-layering order.
6-
NODE_OPTIONS: '--max-old-space-size-percentage=75'
6+
NODE_OPTIONS: '--max-old-space-size-percentage=80'
77
PORT: '4000'
88
ENABLED_LANGUAGES: 'en,es,ja,pt,zh,ru,fr,ko,de'
99
RATE_LIMIT_MAX: '21'

0 commit comments

Comments
 (0)