diff --git a/Dockerfile b/Dockerfile index 5a9541e06f1a..a9e597c2fb9f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -39,9 +39,9 @@ FROM node:20-alpine WORKDIR /usr/app COPY --from=build_deps /usr/app . -# NodeJS applications have a default memory limit of 2.5GB. -# This limit is bit tight for a Prater node, it is recommended to raise the limit +# NodeJS applications have a default memory limit of 4GB on most machines. +# This limit is bit tight for a Mainnet node, it is recommended to raise the limit # since memory may spike during certain network conditions. -ENV NODE_OPTIONS=--max-old-space-size=4096 +ENV NODE_OPTIONS=--max-old-space-size=8192 ENTRYPOINT ["node", "./packages/cli/bin/lodestar"] \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml index cab1245d351e..d8c6122e3537 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -11,11 +11,11 @@ services: - "9000:9000" # P2P port # - "9596:9596" # REST API port command: beacon --dataDir /data --rest --rest.address 0.0.0.0 --metrics --logFile /logs/beacon.log --logFileLevel debug --logFileDailyRotate 5 - # NodeJS applications have a default memory limit of 2.5GB. - # This limit is bit tight for a Prater node, it is recommended to raise the limit + # NodeJS applications have a default memory limit of 4GB on most machines. + # This limit is bit tight for a Mainnet node, it is recommended to raise the limit # since memory may spike during certain network conditions. environment: - NODE_OPTIONS: --max-old-space-size=4096 + NODE_OPTIONS: --max-old-space-size=8192 prometheus: build: docker/prometheus diff --git a/docs/pages/tools/flamegraphs.md b/docs/pages/tools/flamegraphs.md index d6f45303a9aa..119cc7dc10e5 100644 --- a/docs/pages/tools/flamegraphs.md +++ b/docs/pages/tools/flamegraphs.md @@ -18,7 +18,7 @@ Next we need to update the Lodestar service by modifying the start script. We ne ```sh node \ --perf-basic-prof \ - --max-old-space-size=4096 \ + --max-old-space-size=8192 \ /usr/src/lodestar/packages/cli/bin/lodestar \ beacon \ --rcConfig /home/devops/beacon/rcconfig.yml diff --git a/lodestar b/lodestar index 2101d94b77cb..0b20ba4c9bcd 100755 --- a/lodestar +++ b/lodestar @@ -2,6 +2,6 @@ # Convenience script to run the lodestar binary from built source # -# ./lodestar.sh beacon --network prater +# ./lodestar.sh beacon --network mainnet -node --trace-deprecation --max-old-space-size=4096 ./packages/cli/bin/lodestar.js "$@" \ No newline at end of file +node --trace-deprecation --max-old-space-size=8192 ./packages/cli/bin/lodestar.js "$@" \ No newline at end of file