From c61f766cc39a003466f2b0d0f4226ecd13dc05e5 Mon Sep 17 00:00:00 2001 From: Tim Evens Date: Tue, 30 Mar 2021 22:31:06 -0700 Subject: [PATCH] Adjust defaults in compose and fix postgres mem setting --- docker-compose.yml | 8 ++++---- postgres/Dockerfile | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index 03092f7..664f275 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -70,7 +70,7 @@ services: - ${OBMP_DATA_ROOT}/postgres/data:/var/lib/postgresql/data # change this to 80GB SSD slice/partition - ${OBMP_DATA_ROOT}/postgres/ts:/var/lib/postgresql/ts # Chnage this to 500GB SSD slice/partition environment: - - MEM=2 # Set MEM to at least 2GB but ideally >16GB + - MEM=10 # Set MEM to at least 2GB but ideally >16GB - POSTGRES_PASSWORD=openbmp - POSTGRES_USER=openbmp - POSTGRES_DB=openbmp @@ -104,10 +104,10 @@ services: volumes: - ${OBMP_DATA_ROOT}/config:/config environment: - - MEM=2 # Set memory to at least 2GB but ideally 4GB + - MEM=4 # Set memory to at least 2GB but ideally 4GB - KAFKA_FQDN=obmp-kafka:29092 - - ENABLE_RPKI=0 # 1 enables, 0 disables RPKI sync - - ENABLE_IRR=0 # 1 enables, 0 disables IRR sync + - ENABLE_RPKI=1 # 1 enables, 0 disables RPKI sync + - ENABLE_IRR=1 # 1 enables, 0 disables IRR sync - POSTGRES_PASSWORD=openbmp - POSTGRES_USER=openbmp - POSTGRES_DB=openbmp diff --git a/postgres/Dockerfile b/postgres/Dockerfile index 1a29f9f..e09ffb8 100644 --- a/postgres/Dockerfile +++ b/postgres/Dockerfile @@ -37,7 +37,7 @@ RUN apk update \ && sed -i -e "s/^\#*ssl[ ]*=.*/ssl = on/" /usr/local/share/postgresql/postgresql.conf.sample \ && sed -i -e "s/^\#*ssl_cert_file.*=.*/ssl_cert_file = \'\/psql_server.crt\'/" /usr/local/share/postgresql/postgresql.conf.sample \ && sed -i -e "s/^\#*ssl_key_file.*=.*/ssl_key_file = \'\/psql_server.key\'/" /usr/local/share/postgresql/postgresql.conf.sample \ - && sed -i -e "s/^\#*shared_buffers.*=.*/shared_buffers = ${MEM:-'1'}GB/" /usr/local/share/postgresql/postgresql.conf.sample \ + && sed -i -e "s/^\#*shared_buffers.*=.*/shared_buffers = ${MEM:-1}GB/" /usr/local/share/postgresql/postgresql.conf.sample \ && sed -i -e "s/^\#*work_mem.*=.*/work_mem = $(( (${MEM:-1} * 1024) * 5 / 100))MB/" /usr/local/share/postgresql/postgresql.conf.sample # Init timesries location