Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1tDiXS-002ix9-4x for pgsql-general@arkaria.postgresql.org; Wed, 20 Nov 2024 11:06:26 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1tDiXQ-004il1-39 for pgsql-general@arkaria.postgresql.org; Wed, 20 Nov 2024 11:06:24 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1tDiXP-004iko-Ln for pgsql-general@lists.postgresql.org; Wed, 20 Nov 2024 11:06:23 +0000 Received: from mail-ed1-x536.google.com ([2a00:1450:4864:20::536]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1tDiXN-002ufl-0m for pgsql-general@lists.postgresql.org; Wed, 20 Nov 2024 11:06:22 +0000 Received: by mail-ed1-x536.google.com with SMTP id 4fb4d7f45d1cf-5cfd2978f95so3891872a12.0 for ; Wed, 20 Nov 2024 03:06:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1732100779; x=1732705579; darn=lists.postgresql.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=yZZWn1UNeg+aFvFCq7GX4UAfGPYkwynfB23W5xGhp+g=; b=QKPmg2qdwbmCt87NiTRXz/CeqFK8fofEa8dWRogcJ7DqNdi6U7kahHsyl1w0/I/U23 i4PZ3nqahU5G2jmDnD9aOgtMktHDdjhUI+UhtiOy81ya7JKDWOaSg7bGaxBQsCDf4a4P aXsPHt/l1HWzwfjLSRM5ORWvKWRUu3A0528R3W82hazVDnEPt8wWpNtwIYRIHOiX2ko4 FejwJoe0uKFEtpJzOngfHBrb9brWQu1k+9o4FY2/KhO4bovFaZJGhfOfhSriJSrELSaV 81cvyfHQmasrb2MshItJikef/w1GFSEF4Iz8GXs77/AdL28Za4J5bBglbuqCZAmG9L4V H3Yg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1732100779; x=1732705579; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=yZZWn1UNeg+aFvFCq7GX4UAfGPYkwynfB23W5xGhp+g=; b=mt7QkdD2WHKpeaMpUGLNhlfniEmEo3wKIci7S8iUPoQYaDFf1Xz+nfnEZGDejz2tTF lPZ/Z5K937zrhkufZ1GPyF7+wHQm07aWLwTJUvaRay/WakPNIWV/ZcymFhtz7zSYoqRp +CAzDqeyBE3rGMPNASN7mJtIGkHjSc6cHGREzIlwXmm7F51Xpc0aUZNzhC0UJCw/MmL6 plEsOmq7dZyMgcvYL43EYcWILdZes1SINQC6buzF+jZJ0UxUsmQ1GrGVbaZDf0hVrF0G b5tIdI4jBZ0DQt81OgW6Dzz2ewGh7NALQoKil5qdsb27A4oqJeCrpvm7z8/fxxOz7lQk 79zQ== X-Gm-Message-State: AOJu0YzI1dGs0AX+tlcjrPqoSoQuQYZSht9QgtWBV5zxZmnn/BRpaYN5 QFCnf3cet7QVoYXN9kPJaQpdYzas09z6W6nqC4a29usDkSlQFJNraEKeAn7YENcC1EjFtrofE/2 vwcIjCAkaUaM0m8aptAi3XOJmiqE= X-Google-Smtp-Source: AGHT+IGoQsQN/bGcvUvBivfLAK1+qGePV5u2L8+JMTfYzk66OQqbUrjsySYKkP3Bs/K0tStHCP1hsBcltkgsYBp76Yk= X-Received: by 2002:a17:907:8689:b0:a9a:5cf8:9e40 with SMTP id a640c23a62f3a-aa4dd5650e3mr215012766b.24.1732100778425; Wed, 20 Nov 2024 03:06:18 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Koen De Groote Date: Wed, 20 Nov 2024 12:06:07 +0100 Message-ID: Subject: Re: Running docker in postgres, SHM size of the docker container in postgres 16 To: Thomas Munro Cc: PostgreSQL General Content-Type: multipart/alternative; boundary="0000000000009d219406275623e8" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --0000000000009d219406275623e8 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable That explains a lot. I have the default of 2 max_parallel_maintenance_workers set, should I set this to 0? I realize this is of course an improvement, but working with docker containers, I'd like to avoid taking /dev/shm away from regular queries. I assume setting max_parallel_maintenance_workers to 0 is the fix here, is there perhaps something else I should know about, if I want to have control over this? Regards, Koen De Groote On Wed, Nov 20, 2024 at 12:38=E2=80=AFAM Thomas Munro wrote: > On Wed, Nov 20, 2024 at 11:22=E2=80=AFAM Koen De Groote wrote: > > Why would that be? It's the exact same data. The install is about 50GB > in size. Is there something wrong with postgres 16, or did some settings > significantly change, that I need to know about? I went over all the > changelogs, nothing stood out as relevant to this, but that might be a la= ck > of experience on my end. > > Parallel vacuum arrived in PostgreSQL 13, and that uses "dynamic > shared memory" to share state between workers, and assuming > dynamic_shared_memory_type=3Dposix, that means shm_open(), which opens > files under /dev/shm on Linux. > --0000000000009d219406275623e8 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
That explains a lot.

I have the default= of 2 max_parallel_maintenance_workers set, should I set this to 0?

I realize this is of course an improvement, but working w= ith docker containers, I'd like to avoid taking /dev/shm away from regu= lar queries.

I assume setting max_parallel_mainten= ance_workers to 0 is the fix here, is there perhaps something else I should= know about, if I want to have control over this?

= Regards,
Koen De Groote


=
On Wed= , Nov 20, 2024 at 12:38=E2=80=AFAM Thomas Munro <thomas.munro@gmail.com> wrote:
On Wed, Nov 20, 2024 at 11:22=E2= =80=AFAM Koen De Groote <kdg.dev@gmail.com> wrote:
> Why would that be? It's the exact same data. The install is about = 50GB in size. Is there something wrong with postgres 16, or did some settin= gs significantly change, that I need to know about? I went over all the cha= ngelogs, nothing stood out as relevant to this, but that might be a lack of= experience on my end.

Parallel vacuum arrived in PostgreSQL 13, and that uses "dynamic
shared memory" to share state between workers, and assuming
dynamic_shared_memory_type=3Dposix, that means shm_open(), which opens
files under /dev/shm on Linux.
--0000000000009d219406275623e8--