From: Ron <ronljohnsonjr@gmail.com>
To: pgsql-admin@lists.postgresql.org
Subject: Re: Sanity check of shared_buffers value
Date: Mon, 3 Jul 2023 15:45:48 -0500
Message-ID: <3767d58c-54fd-f608-bc48-99a905af71bc@gmail.com> (raw)
In-Reply-To: <CAOC+FBWcseeLFafREL2Dia+xgkvp960KWidoOQyQJ6s4QadD2A@mail.gmail.com>
References: <CAOC+FBXnpq7+rGxw2D7=YaOi_RAfA3aBqNPNdtcTeXudfa-c_A@mail.gmail.com>
<4b1c1747-85ff-f174-a43b-482e580fe6a2@gmail.com>
<CAOC+FBWcseeLFafREL2Dia+xgkvp960KWidoOQyQJ6s4QadD2A@mail.gmail.com>
Being AWS RDS is the kind of thing you need to mention.
Anyway, plain old bash bc does it for you. Explicitly:
(24*1024^3)/1024/8
Powershell, too:
24*[bigint]::pow(1024,3)/1024/8
On 7/3/23 14:57, Wells Oliver wrote:
> Yeah. Unfortunately in AWS RDS the parameter group settings accept input
> only in stricter format, so shared_buffers requires an integer value in KiB.
>
> On Mon, Jul 3, 2023 at 12:56 PM Ron <ronljohnsonjr@gmail.com> wrote:
>
> On 7/3/23 14:45, Wells Oliver wrote:
>> Sorry, this is dumb, but I wanted to double check that I'm doing the
>> shared_buffers calc correctly given it's in 8kb blocks (block_size is
>> set to 8192).
>>
>> Want 24GB, which I think is 25165824 KiB so divided by 8 we get 3145728.
>>
>> Do I have this correct? Usually can test these but wanted to run it
>> by someone before having to restart the server.
>>
>> Is there some calc web service out there that idiots such as myself
>> can use for this?
>
> https://www.postgresql.org/docs/15/runtime-config-resource.html
>
> "If this value is specified *without **units*, it is taken as blocks,"
>
> My interpretation of this (and what I do in my postgresql.conf file,
> without error) is to use a unit name, as such:
> shared_buffers = 24GB
>
> --
> Born in Arizona, moved to Babylonia.
>
>
>
> --
> Wells Oliver
> wells.oliver@gmail.com <mailto:wellsoliver@gmail.com>
--
Born in Arizona, moved to Babylonia.
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 using the --to and --cc options:
reply via email
To: pgsql-admin@postgresql.org
Cc: ronljohnsonjr@gmail.com, pgsql-admin@lists.postgresql.org
Subject: Re: Sanity check of shared_buffers value
In-Reply-To: <3767d58c-54fd-f608-bc48-99a905af71bc@gmail.com>
* 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