0

I'm doing a lot of SQL inserts and the limiting factor appears to be CPU assigned to postgres. Most of these inserts are to the same table. I'm a bit confused here as I'm using docker-compose with no resource limits, the container should use all available 16 cores.

inside container

:/# nproc
16
:/# postgres --version
postgres (PostgreSQL) 13.4 (Debian 13.4-1.pgdg100+1)

Here's my postgres config

# Default stuff
listen_addresses = '*'

# DB Version: 13
# OS Type: linux
# DB Type: oltp
# Total Memory (RAM): 32 GB
# CPUs num: 12
# Connections num: 50
# Data Storage: ssd

max_connections = 50
shared_buffers = 8GB
effective_cache_size = 24GB
maintenance_work_mem = 2GB
checkpoint_completion_target = 0.9
wal_buffers = 16MB
default_statistics_target = 100
random_page_cost = 1.1
effective_io_concurrency = 200
work_mem = 41943kB
min_wal_size = 2GB
max_wal_size = 8GB
max_worker_processes = 12
max_parallel_workers_per_gather = 4
max_parallel_workers = 12
max_parallel_maintenance_workers = 4
Drew
  • 121
  • 1
  • 6

0 Answers0