[prev in list] [next in list] [prev in thread] [next in thread]
List: postgresql-admin
Subject: Re: Sanity check of shared_buffers value
From: jacob ndinkwa <jndinkwa () gmail ! com>
Date: 2023-07-05 13:28:31
Message-ID: CAKFm-3BMEANY9Ftzkem5yyYq1qO3qmQ=DSJpkG+jSwAaOVby1g () mail ! gmail ! com
[Download RAW message or body]
You can use:
https://pgtune.leopard.in.ua/
for your cal.
Thanks,
-J
On Mon, Jul 3, 2023 at 4:46 PM Ron <ronljohnsonjr@gmail.com> wrote:
> 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 <wellsoliver@gmail.com>
>
>
> --
> Born in Arizona, moved to Babylonia.
>
[Attachment #3 (text/html)]
<div dir="ltr">You can use:<div><br></div><div><a \
href="https://pgtune.leopard.in.ua/">https://pgtune.leopard.in.ua/</a> \
<br></div><div><br></div><div>for your \
cal.</div><div><br></div><div>Thanks,</div><div>-J</div></div><br><div \
class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Jul 3, 2023 at \
4:46 PM Ron <<a \
href="mailto:ronljohnsonjr@gmail.com">ronljohnsonjr@gmail.com</a>> \
wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px \
0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div>
Being AWS RDS is the kind of thing you need to mention.<br>
<br>
Anyway, plain old bash bc does it for you. Explicitly:<br>
(24*1024^3)/1024/8<br>
<br>
Powershell, too:<br>
24*[bigint]::pow(1024,3)/1024/8<br>
<br>
<div>On 7/3/23 14:57, Wells Oliver wrote:<br>
</div>
<blockquote type="cite">
<div dir="ltr">Yeah. Unfortunately in AWS RDS the parameter group
settings accept input only in stricter format, so shared_buffers
requires an integer value in KiB.</div>
<br>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">On Mon, Jul 3, 2023 at
12:56 PM Ron <<a href="mailto:ronljohnsonjr@gmail.com" \
target="_blank">ronljohnsonjr@gmail.com</a>> wrote:<br>
</div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px \
0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"> <div> On 7/3/23 \
14:45, Wells Oliver wrote:<br> <blockquote type="cite">
<div dir="ltr">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).
<div><br>
</div>
<div>Want 24GB, which I think is 25165824 KiB so divided
by 8 we get 3145728.</div>
<div><br>
</div>
<div>Do I have this correct? Usually can test these but
wanted to run it by someone before having to restart
the server.</div>
<div><br>
</div>
<div>Is there some calc web service out there that
idiots such as myself can use for this?</div>
</div>
</blockquote>
<br>
<a href="https://www.postgresql.org/docs/15/runtime-config-resource.html" \
target="_blank">https://www.postgresql.org/docs/15/runtime-config-resource.html</a><br>
<br>
<span>"If this value is specified <b>without </b><b>units</b>,
it is taken as blocks,"</span><br>
<br>
My interpretation of this (and what I do in my
postgresql.conf file, without error) is to use a unit name,
as such:<br>
shared_buffers = 24GB<br>
<br>
<div>-- <br>
Born in Arizona, moved to Babylonia.</div>
</div>
</blockquote>
</div>
<br clear="all">
<div><br>
</div>
<span class="gmail_signature_prefix">-- </span><br>
<div dir="ltr" class="gmail_signature">
<div dir="ltr">
<div>Wells Oliver<br>
<a href="mailto:wellsoliver@gmail.com" \
target="_blank">wells.oliver@gmail.com</a></div> </div>
</div>
</blockquote>
<br>
<div>-- <br>
Born in Arizona, moved to Babylonia.</div>
</div>
</blockquote></div>
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic