0

I'm trying to better understand my performance / tuning options for a PostgreSQL database.

System:

  • Ubuntu 22.04.1 LTS
  • aarch64, 80 cores, 256 GB RAM
  • PostgreSQL 15

Right now, the shared buffer size is configured as shared_buffers = 128MB. I understand, increasing the buffer will likely boost performance. However, it is also my understanding, that I need to be aware of possible limits imposed by the Linux kernel.

ipcs -l returns:

------ Shared Memory Limits --------
max number of segments = 4096
max seg size (kbytes) = 18014398509465599
max total shared memory (kbytes) = 18446744073709551612
min seg size (bytes) = 1

It is my understanding that 18014398509465599 is the maximum size of shared memory supported for a single process. Is this correct?

If I'm switching on --human, the output is:

max total shared memory = 16E

What does 16E mean?

My key question: What is the maximum size I could set the shared buffers to, given my current kernel? Sorry if this question might sound stupid.

I appreciate any help and explaination.

Ralf
  • 2,512
  • 4
  • 24
  • 26

1 Answers1

1

The System V shared memory limits don't apply, since PostgreSQL has switched to using POSIX shared memory long ago.

16E would be 16 Exabytes.

Laurenz Albe
  • 209,280
  • 17
  • 206
  • 263
  • Thanks, Laurenz. In the situation I described, would that mean that I can safely increase the PostgreSQL `shared_buffers` value from the current 128MB to a higher value? Would it make sense to give it like 1GB? – Ralf Nov 18 '22 at 14:18
  • 1
    Probably. That depends on your data and most of all on your workload. – Laurenz Albe Nov 18 '22 at 14:22
  • Exabytes see [here](https://www.backblaze.com/blog/what-is-an-exabyte/). That is just 1 Exabyte. – Belayer Nov 18 '22 at 21:51