pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Matthias Apitz <guru@unixarea.de>
To: pgsql-general@lists.postgresql.org
Subject: kernel.shmmax and kernel.shmall for Linux server
Date: Fri, 12 Feb 2021 11:24:37 +0100
Message-ID: <YCZXZSwdTAVSxiZB@c720-r368166.fritz.box> (raw)


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





view thread (2+ messages)  latest in thread

Message-ID: <YCZXZSwdTAVSxiZB@c720-r368166.fritz.box>
Permalink:  ../YCZXZSwdTAVSxiZB@c720-r368166.fritz.box/
Also on:    postgresql.org/message-id/YCZXZSwdTAVSxiZB@c720-r368166.fritz.box

 · 

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: guru@unixarea.de
  Subject: Re: kernel.shmmax and kernel.shmall for Linux server
  In-Reply-To: <YCZXZSwdTAVSxiZB@c720-r368166.fritz.box>
  References: <YCZXZSwdTAVSxiZB@c720-r368166.fritz.box>

* 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