pg.ddx.io pgsql-general@postgresql.org mailing list archive
help / color / mirror / Atom feedkernel.shmmax and kernel.shmall for Linux server
2+ messages / 2 participants
[nested] [flat]
* kernel.shmmax and kernel.shmall for Linux server
@ 2021-02-12 10:24 Matthias Apitz <guru@unixarea.de>
0 siblings, 1 reply; 2+ messages in thread
From: Matthias Apitz @ 2021-02-12 10:24 UTC (permalink / raw)
To: pgsql-general@lists.postgresql.org
Hello,
I've read the doc https://www.postgresql.org/docs/13/kernel-resources.html
but I'm still relatively clueless, what to set. For example for our
standard installations like
- RAM: 32 GByte
- one PostgreSQL 13.1 server
- one database with ~400 tables, 4 GByte in size
- 100-200 connecting PostgreSQL-clients (C/C++ application servers,
single threaded, for interactive usage)
The above document says, the Linux default values are good enough, but
they're:
# /usr/sbin/sysctl kernel | grep shm
kernel.shm_next_id = -1
kernel.shm_rmid_forced = 0
kernel.shmall = 1152921504606846720
kernel.shmmax = 18446744073709551615
kernel.shmmni = 4096
The values are coming from
# cat /boot/sysctl.conf-5.3.18-24.46-default
...
kernel.shmmax = 0xffffffffffffffff
# SHMALL = SHMMAX/PAGE_SIZE*(SHMMNI/16)
kernel.shmall = 0x0fffffffffffff00
Any hints for real values?
matthias
--
Matthias Apitz, ✉ guru@unixarea.de, http://www.unixarea.de/ +49-176-38902045
Public GnuPG key: http://www.unixarea.de/key.pub
^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: kernel.shmmax and kernel.shmall for Linux server
@ 2021-02-12 15:14 Tom Lane <tgl@sss.pgh.pa.us>
parent: Matthias Apitz <guru@unixarea.de>
0 siblings, 0 replies; 2+ messages in thread
From: Tom Lane @ 2021-02-12 15:14 UTC (permalink / raw)
To: Matthias Apitz <guru@unixarea.de>; +Cc: pgsql-general@lists.postgresql.org
Matthias Apitz <guru@unixarea.de> writes:
> I've read the doc https://www.postgresql.org/docs/13/kernel-resources.html
> but I'm still relatively clueless, what to set.
For modern PG versions on Linux, you basically shouldn't ever have to
touch those numbers. I'd only start to worry if I saw server startup
failures. These values do *not* constrain what you can set for
shared_buffers or the like; at most, they'd constrain how many PG
instances you can run on one machine.
regards, tom lane
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2021-02-12 15:14 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2021-02-12 10:24 kernel.shmmax and kernel.shmall for Linux server Matthias Apitz <guru@unixarea.de>
2021-02-12 15:14 ` Tom Lane <tgl@sss.pgh.pa.us>
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