Skip to content

Commit f235467

Browse files
authored
Reduce cgimap instances for container and update config for API DB (#733)
1 parent 48cc917 commit f235467

2 files changed

Lines changed: 9 additions & 9 deletions

File tree

images/cgimap/start.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ else
4141
psql -h $POSTGRES_HOST -U $POSTGRES_USER -c "SHOW enable_mergejoin;"
4242
psql -h $POSTGRES_HOST -U $POSTGRES_USER -c "SHOW enable_hashjoin;"
4343
# Start the cgimap service
44-
openstreetmap-cgimap --port=8000 --daemon --instances=10
44+
openstreetmap-cgimap --port=8000 --daemon --instances=5
4545
# Sleep fo 3 sec for tail the logs
4646
sleep 3
4747
# Keep container alive

values.production.template.yaml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -64,13 +64,13 @@ osm-seed:
6464
max_connections = 200
6565
shared_buffers = 4GB
6666
work_mem = 20MB
67-
maintenance_work_mem = 512MB
67+
maintenance_work_mem = 1GB
6868
dynamic_shared_memory_type = posix
6969
effective_io_concurrency = 200
70-
max_wal_size = 1GB
71-
min_wal_size = 256MB
72-
random_page_cost = 1.0
73-
effective_cache_size = 8GB
70+
max_wal_size = 2GB
71+
min_wal_size = 512MB
72+
random_page_cost = 1.1
73+
effective_cache_size = 12GB
7474
log_min_duration_statement = 3000
7575
log_connections = on
7676
log_disconnections = on
@@ -86,9 +86,9 @@ osm-seed:
8686
lc_time = 'en_US.utf8'
8787
default_text_search_config = 'pg_catalog.english'
8888
# Parallelism settings
89-
max_parallel_workers_per_gather = 2
90-
max_parallel_workers = 4
91-
max_worker_processes = 4
89+
max_parallel_workers_per_gather = 1
90+
max_parallel_workers = 2
91+
max_worker_processes = 2
9292
parallel_tuple_cost = 0.05
9393
parallel_setup_cost = 500
9494
min_parallel_table_scan_size = 2MB

0 commit comments

Comments
 (0)