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 1rRuox-00A91L-1Y for pgsql-hackers@arkaria.postgresql.org; Mon, 22 Jan 2024 13:58:39 +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 1rRuov-0048Zs-IG for pgsql-hackers@arkaria.postgresql.org; Mon, 22 Jan 2024 13:58:37 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rRuov-0048Zh-7u for pgsql-hackers@lists.postgresql.org; Mon, 22 Jan 2024 13:58:37 +0000 Received: from mail-yw1-x1130.google.com ([2607:f8b0:4864:20::1130]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1rRuoo-002nW3-20 for pgsql-hackers@lists.postgresql.org; Mon, 22 Jan 2024 13:58:35 +0000 Received: by mail-yw1-x1130.google.com with SMTP id 00721157ae682-600094c5703so5954287b3.3 for ; Mon, 22 Jan 2024 05:58:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=crunchydata.com; s=google; t=1705931909; x=1706536709; darn=lists.postgresql.org; h=user-agent:mime-version:date:content-transfer-encoding:references :in-reply-to:cc:to:from:subject:message-id:from:to:cc:subject:date :message-id:reply-to; bh=h6lHL7FmvkhT5bKevKYJKNGQp8Oo7D2BWdPDX0qu5rI=; b=Y236ccIgh71ysH+5q8Zsm9WknLDzNMoJpmEk5XTv+Foyqk2ddnGbs7HnzWLqpO2i7v ZC4UsMW0j128Ww7VyHwvY3ZcAs0I8jk7MU+I1/1OLG8u7VT6fChSQIt/0+HJbRKeBqX8 QeCyyhrX3WSkdgJfME/O7dcRqDk6a1BeYz3xVPmsGiUhLG2TNXGADnGBmKNxgv4feIiJ esS3VQKC9AlJRUTZRENS9WOX06ciRf7wT1DCOjhq7KRUq/hJ7fsSdKaZ11Y0Ffk5F+GW JzVvDc7km62RXTxwyPw7OFadSU4f1SwC7R1qVElWxKiBuaS4Q1LhuF27HB0yGWi/jDhN gTwg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1705931909; x=1706536709; h=user-agent:mime-version:date:content-transfer-encoding:references :in-reply-to:cc:to:from:subject:message-id:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=h6lHL7FmvkhT5bKevKYJKNGQp8Oo7D2BWdPDX0qu5rI=; b=wpviGF3wQ0MX/dsKF9QSh9+m2956HQneZl3VduCaJlF23Bvk7KFZkta32Qofv/upD3 iHgdz8QIRlEBgTxkM9NzTf/bY3uuoxf/QoRgxljEwls9/k6flf73Dt/Vlc1JgV/kjzqI vptlgOAtlDA/dhoK7pjrCjdq013XZ7eU4Y9xVNWau/MVCAYurTs4Rf7Z1YCOQK/kyC6r +NY56f6RShEGG7zEv5DPFkuxxuaJA8cz4X62QRXjk74Ghbjk629h/2YxSxj+EtNOqRIX h3YrYjA/i+1742kF0VuIok6vD3CBhfpkBuabFxmhNzT3EMDPLfgBwwGzCEUf6tgE5c43 RvTQ== X-Gm-Message-State: AOJu0Yz2hGJUhRGj5JDA+SkPz+Lea2etS0KMim3T5i7pfO2UruakiLGR oalfhuSAI7sVZ8Be/KFd+8RhjqTk0nSb7x8gfqeHPMNK70fpte6emCfMtdMdK5E= X-Google-Smtp-Source: AGHT+IGt6Exy5baIihoLWY6AH6jaO9OsrM1U8ftb/LqyTANrp1I9+ByukopNwUSe6tdmeOCWPeM/DQ== X-Received: by 2002:a81:4ec2:0:b0:5fb:9715:eaaf with SMTP id c185-20020a814ec2000000b005fb9715eaafmr3557769ywb.33.1705931909135; Mon, 22 Jan 2024 05:58:29 -0800 (PST) Received: from raker.lan (024-163-071-136.res.spectrum.com. [24.163.71.136]) by smtp.gmail.com with ESMTPSA id e4-20020a81e944000000b005ffddb2369dsm948594ywm.82.2024.01.22.05.58.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 22 Jan 2024 05:58:28 -0800 (PST) Message-ID: <2c9d3664ff7adc506191f92db031543925abe0df.camel@crunchydata.com> Subject: Re: [DOC] Add detail regarding resource consumption wrt max_connections From: reid.thompson@crunchydata.com To: Roberto Mello , Cary Huang Cc: pgsql-hackers@lists.postgresql.org In-Reply-To: <17c31b30041187a577eb5b45090a58c5fae6418c.camel@crunchydata.com> References: <170509767861.1131.15083983626399995184.pgcf@coridan.postgresql.org> <17c31b30041187a577eb5b45090a58c5fae6418c.camel@crunchydata.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Date: Mon, 22 Jan 2024 08:58:23 -0500 MIME-Version: 1.0 User-Agent: Evolution 3.44.4-0ubuntu2 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Fri, 2024-01-19 at 17:37 -0500, reid.thompson@crunchydata.com wrote: > On Sat, 2024-01-13 at 10:31 -0700, Roberto Mello wrote: > >=20 > > I can add a suggestion for the user to consider increasing > > shared_buffers in accordance with higher max_connections, but it > > would be better if there was a "rule of thumb" guideline to go > > along. I'm open to suggestions. > >=20 > > I can revise with a similar warning in max_prepared_xacts as well. > >=20 > > Sincerely, > >=20 > > Roberto >=20 > Can a "close enough" rule of thumb be calculated from: > postgresql.conf -> log_min_messages =3D debug3 >=20 > start postgresql with varying max_connections to get > CreateSharedMemoryAndSemaphores() sizes to generate a rough equation >=20 or maybe it would be sufficient to advise to set log_min_messages =3D debug3 on a test DB and start/stop it with varying values of max_connections and look at the=C2=A0differing values in=20 DEBUG: invoking IpcMemoryCreate(size=3D...) log messages for themselves.