pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: MichaelDBA <MichaelDBA@sqlexec.com>
To: Chris Hoover <chrish@aweber.com>
Cc: Ron <ronljohnsonjr@gmail.com>
Cc: pgsql-admin@lists.postgresql.org
Subject: Re: New PG14 server won't start with >2GB shared_buffers
Date: Sat, 25 Feb 2023 09:05:44 -0500
Message-ID: <4a41387e-516e-0782-6110-89c05a99d020@sqlexec.com> (raw)
In-Reply-To: <C6285AA6-5195-4C8B-A599-401845EFD174@aweber.com>
References: <A446608A-42A3-4CBB-BD45-47BE009B0029@aweber.com>
	<4b583c4a-022f-f452-c0c8-0a932a6ee411@gmail.com>
	<C6285AA6-5195-4C8B-A599-401845EFD174@aweber.com>

I just don't get what all this fuss is about trying to get PG up on the 
smallest possible values for shared_buffers, especially considering this 
person has 1 TB of memory?

Chris Hoover wrote on 2/25/2023 8:07 AM:
> Ron,
>
> Honestly, I grabbed 500MB to get the database up, by this time I was 
> very frustrated and just wanted it up.  :)  I think I was at 1500MB 
> and it still would not start.  So to save what was left of my evening 
> out, I just picked 500.
>
> Here is shmall:
> kernel.shmall = 17179869184
>
> Thanks,
>
>
> Chris Hoover
> Senior DBA
> AWeber.com
> Cell: (803) 528-2269
> Email: chrish@aweber.com
>
>
>
>> On Feb 25, 2023, at 5:25 AM, Ron <ronljohnsonjr@gmail.com> wrote:
>>
>> Why did you have to drop shared buffers to 500MB, instead of 
>> something just below 2GB?
>>
>> And what's "your kernel's SHMALL parameter"?
>>
>> On 2/24/23 20:08, Chris Hoover wrote:
>>> 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@aweber.com
>>>
>>>
>>>
>>
>> -- 
>> Born in Arizona, moved to Babylonia.
>


Regards,

Michael Vitale

Michaeldba@sqlexec.com <mailto:michaelvitale@sqlexec.com>

703-600-9343

Attachments:

  [image/jpeg] pgadvanced3.jpg (20.6K, ../4a41387e-516e-0782-6110-89c05a99d020@sqlexec.com/3-pgadvanced3.jpg)
  download | view image

view thread (23+ messages)  latest in thread

Message-ID: <4a41387e-516e-0782-6110-89c05a99d020@sqlexec.com>
Permalink:  ../4a41387e-516e-0782-6110-89c05a99d020@sqlexec.com/
Also on:    postgresql.org/message-id/4a41387e-516e-0782-6110-89c05a99d020@sqlexec.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-admin@postgresql.org
  Cc: MichaelDBA@sqlexec.com, chrish@aweber.com, ronljohnsonjr@gmail.com, pgsql-admin@lists.postgresql.org
  Subject: Re: New PG14 server won't start with >2GB shared_buffers
  In-Reply-To: <4a41387e-516e-0782-6110-89c05a99d020@sqlexec.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox