Skip to content

Commit e5f6c8e

Browse files
author
Omni
committed
Tune production resource defaults
1 parent 8651f5b commit e5f6c8e

3 files changed

Lines changed: 8 additions & 8 deletions

File tree

docker-compose/production-hardening.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@ The compose service files define non-secret defaults that can be overridden by
1111
the production environment:
1212

1313
```sh
14-
BACKEND_MEM_LIMIT=5g
15-
BACKEND_MEMSWAP_LIMIT=5g
16-
DB_MEM_LIMIT=5g
17-
DB_MEMSWAP_LIMIT=5g
14+
BACKEND_MEM_LIMIT=4g
15+
BACKEND_MEMSWAP_LIMIT=4g
16+
DB_MEM_LIMIT=6g
17+
DB_MEMSWAP_LIMIT=6g
1818
STATS_MEM_LIMIT=1g
1919
STATS_MEMSWAP_LIMIT=1g
2020
STATS_DB_MEM_LIMIT=1g

docker-compose/services/backend.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ services:
55
image: blockscout/${DOCKER_REPO:-blockscout}:${DOCKER_TAG:-latest}
66
pull_policy: always
77
restart: always
8-
mem_limit: ${BACKEND_MEM_LIMIT:-5g}
9-
memswap_limit: ${BACKEND_MEMSWAP_LIMIT:-5g}
8+
mem_limit: ${BACKEND_MEM_LIMIT:-4g}
9+
memswap_limit: ${BACKEND_MEMSWAP_LIMIT:-4g}
1010
stop_grace_period: 5m
1111
container_name: 'backend'
1212
command: sh -c "bin/blockscout eval \"Elixir.Explorer.ReleaseTasks.create_and_migrate()\" && bin/blockscout start"

docker-compose/services/db.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ services:
1616
user: 2000:2000
1717
shm_size: 256m
1818
restart: always
19-
mem_limit: ${DB_MEM_LIMIT:-5g}
20-
memswap_limit: ${DB_MEMSWAP_LIMIT:-5g}
19+
mem_limit: ${DB_MEM_LIMIT:-6g}
20+
memswap_limit: ${DB_MEMSWAP_LIMIT:-6g}
2121
container_name: 'db'
2222
command: postgres -c 'max_connections=200' -c 'client_connection_check_interval=60000'
2323
environment:

0 commit comments

Comments
 (0)