New PG14 server won't start with >2GB shared_buffers

From: Chris Hoover <chrish(at)aweber(dot)com>
To: pgsql-admin(at)lists(dot)postgresql(dot)org
Subject: New PG14 server won't start with >2GB shared_buffers
Date: 2023-02-25 02:08:58
Message-ID: A446608A-42A3-4CBB-BD45-47BE009B0029@aweber.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Hello All,

Have a strange issue that I can not solve.

I have a new server that has 1TB ram (not a typo). I have been fighting with this evening to start up with a shared_buffer setting over 2GB. When the memory allocation breaks 2GB, the database won’t start. I’ve dropped it down to 500M to get the database online. We’ve tried both SysV memory and mmap memory.

Any ideas on what is going on and how to resolve? I’m sure I’m missing something obvious, but it is totally eluding me.

OS: Ubuntu 18.04
Memory: 1007GB
CPU: Intel(R) Xeon(R) CPU X7550 @ 2.00GHz (64 cores total)

Kernel Memory:
kernel.shmmax = 274877906944
kernel.shmall = 17179869184

Postgres Config:
name | setting
autovacuum_max_workers | 3
autovacuum_work_mem | -1
effective_cache_size | 98992128
fsync | on
full_page_writes | on
maintenance_work_mem | 2097152
shared_buffers | 64000
shared_memory_type | sysv
temp_buffers | 4096
wal_buffers | 2048
work_mem | 119990

If you need additional parameters, please ask

SysV Error:
Feb 25 01:55:16 appdb-server01.production.aweberint.com postgres[34680]: FATAL: could not create shared memory segment: Cannot allocate memory
DETAIL: Failed system call was shmget(key=2359323, size=2063564800, 03600).
HINT: This error usually means that PostgreSQL's request for a shared memory segment exceeded your kernel's SHMALL parameter. You might need to reconfigure the kernel with larger SHMALL.

Mmap Error:
FATAL: could not map anonymous shared memory: Cannot allocate memory
HINT: This error usually means that PostgreSQL's request for a shared memory segment exceeded available memory, swap space, or huge pages. To reduce the request size (currently 1635737600 bytes), reduce PostgreSQL's shared memory usage, perhaps by reducing shared_buffers or max_connections.

Thanks,

Chris Hoover
Senior DBA
AWeber.com
Cell: (803) 528-2269
Email: chrish(at)aweber(dot)com

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Tom Lane 2023-02-25 02:19:52 Re: New PG14 server won't start with >2GB shared_buffers
Previous Message Ron 2023-02-24 15:07:38 Re: pg_dump: error: could not open large object