pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Setting effective_cache_size in integer form with the 8kb block units
6+ messages / 3 participants
[nested] [flat]

* Setting effective_cache_size in integer form with the 8kb block units
@ 2022-01-19 21:38  Wells Oliver <wells.oliver@gmail.com>
  0 siblings, 1 reply; 6+ messages in thread

From: Wells Oliver @ 2022-01-19 21:38 UTC (permalink / raw)
  To: pgsql-admin

Sorry to be daft, but if I want 48GB for effective_cache size, should I put
the integer value of 6291456 or 6000000?

Not quite sure how to spell out the 8kb units, decimal or binary...

-- 
Wells Oliver
wells.oliver@gmail.com <wellsoliver@gmail.com>

^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* Re: Setting effective_cache_size in integer form with the 8kb block units
@ 2022-01-19 21:46  David G. Johnston <david.g.johnston@gmail.com>
  parent: Wells Oliver <wells.oliver@gmail.com>
  0 siblings, 1 reply; 6+ messages in thread

From: David G. Johnston @ 2022-01-19 21:46 UTC (permalink / raw)
  To: Wells Oliver <wells.oliver@gmail.com>; +Cc: pgsql-admin

On Wed, Jan 19, 2022 at 2:39 PM Wells Oliver <wells.oliver@gmail.com> wrote:

> Sorry to be daft, but if I want 48GB for effective_cache size, should I
> put the integer value of 6291456 or 6000000?
>
> Not quite sure how to spell out the 8kb units, decimal or binary...
>
>
Seems easier to just specify the units (which the docs for
effective_cache_size says are accepted).

https://www.postgresql.org/docs/current/config-setting.html#CONFIG-SETTING-NAMES-VALUES

David J.

^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* Re: Setting effective_cache_size in integer form with the 8kb block units
@ 2022-01-19 21:56  Wells Oliver <wells.oliver@gmail.com>
  parent: David G. Johnston <david.g.johnston@gmail.com>
  0 siblings, 1 reply; 6+ messages in thread

From: Wells Oliver @ 2022-01-19 21:56 UTC (permalink / raw)
  To: David G. Johnston <david.g.johnston@gmail.com>; +Cc: pgsql-admin

It does. In a cruel twist of fate, RDS parameter groups do not allow "48GB"
and want integer values.

On Wed, Jan 19, 2022 at 1:46 PM David G. Johnston <
david.g.johnston@gmail.com> wrote:

> On Wed, Jan 19, 2022 at 2:39 PM Wells Oliver <wells.oliver@gmail.com>
> wrote:
>
>> Sorry to be daft, but if I want 48GB for effective_cache size, should I
>> put the integer value of 6291456 or 6000000?
>>
>> Not quite sure how to spell out the 8kb units, decimal or binary...
>>
>>
> Seems easier to just specify the units (which the docs for
> effective_cache_size says are accepted).
>
>
> https://www.postgresql.org/docs/current/config-setting.html#CONFIG-SETTING-NAMES-VALUES
>
> David J.
>


-- 
Wells Oliver
wells.oliver@gmail.com <wellsoliver@gmail.com>

^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* Re: Setting effective_cache_size in integer form with the 8kb block units
@ 2022-01-19 22:15  David G. Johnston <david.g.johnston@gmail.com>
  parent: Wells Oliver <wells.oliver@gmail.com>
  0 siblings, 1 reply; 6+ messages in thread

From: David G. Johnston @ 2022-01-19 22:15 UTC (permalink / raw)
  To: Wells Oliver <wells.oliver@gmail.com>; +Cc: pgsql-admin

On Wed, Jan 19, 2022 at 2:57 PM Wells Oliver <wells.oliver@gmail.com> wrote:

> It does. In a cruel twist of fate, RDS parameter groups do not allow
> "48GB" and want integer values.
>

The system operates and calculates memory in binary per the referenced
documentation so 6,291,456 (I double-checked this).

Assuming RDS doesn't do something to that as well...

David J.

^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* Re: Setting effective_cache_size in integer form with the 8kb block units
@ 2022-01-19 22:21  Tom Lane <tgl@sss.pgh.pa.us>
  parent: David G. Johnston <david.g.johnston@gmail.com>
  0 siblings, 1 reply; 6+ messages in thread

From: Tom Lane @ 2022-01-19 22:21 UTC (permalink / raw)
  To: David G. Johnston <david.g.johnston@gmail.com>; +Cc: Wells Oliver <wells.oliver@gmail.com>; pgsql-admin

"David G. Johnston" <david.g.johnston@gmail.com> writes:
> On Wed, Jan 19, 2022 at 2:57 PM Wells Oliver <wells.oliver@gmail.com> wrote:
>> It does. In a cruel twist of fate, RDS parameter groups do not allow
>> "48GB" and want integer values.

> The system operates and calculates memory in binary per the referenced
> documentation so 6,291,456 (I double-checked this).

If you don't trust hand arithmetic, try

regression=# set effective_cache_size to '48GB';
SET
regression=# select setting from pg_settings where name = 'effective_cache_size';
 setting 
---------
 6291456
(1 row)

			regards, tom lane





^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* Re: Setting effective_cache_size in integer form with the 8kb block units
@ 2022-01-19 22:25  Wells Oliver <wells.oliver@gmail.com>
  parent: Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 6+ messages in thread

From: Wells Oliver @ 2022-01-19 22:25 UTC (permalink / raw)
  To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: David G. Johnston <david.g.johnston@gmail.com>; pgsql-admin

Thanks all, good to know. Again, apologies for being daft!

On Wed, Jan 19, 2022 at 2:21 PM Tom Lane <tgl@sss.pgh.pa.us> wrote:

> "David G. Johnston" <david.g.johnston@gmail.com> writes:
> > On Wed, Jan 19, 2022 at 2:57 PM Wells Oliver <wells.oliver@gmail.com>
> wrote:
> >> It does. In a cruel twist of fate, RDS parameter groups do not allow
> >> "48GB" and want integer values.
>
> > The system operates and calculates memory in binary per the referenced
> > documentation so 6,291,456 (I double-checked this).
>
> If you don't trust hand arithmetic, try
>
> regression=# set effective_cache_size to '48GB';
> SET
> regression=# select setting from pg_settings where name =
> 'effective_cache_size';
>  setting
> ---------
>  6291456
> (1 row)
>
>                         regards, tom lane
>


-- 
Wells Oliver
wells.oliver@gmail.com <wellsoliver@gmail.com>

^ permalink  raw  reply  [nested|flat] 6+ messages in thread


end of thread, other threads:[~2022-01-19 22:25 UTC | newest]

Thread overview: 6+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2022-01-19 21:38 Setting effective_cache_size in integer form with the 8kb block units Wells Oliver <wells.oliver@gmail.com>
2022-01-19 21:46 ` David G. Johnston <david.g.johnston@gmail.com>
2022-01-19 21:56   ` Wells Oliver <wells.oliver@gmail.com>
2022-01-19 22:15     ` David G. Johnston <david.g.johnston@gmail.com>
2022-01-19 22:21       ` Tom Lane <tgl@sss.pgh.pa.us>
2022-01-19 22:25         ` Wells Oliver <wells.oliver@gmail.com>

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