Re: Interpreting shared_buffers setting

From: Andrew Gierth <andrew(at)tao11(dot)riddles(dot)org(dot)uk>
To: Bob Jolliffe <bobjolliffe(at)gmail(dot)com>
Cc: pgsql-performance(at)lists(dot)postgresql(dot)org
Subject: Re: Interpreting shared_buffers setting
Date: 2019-01-29 13:07:03
Message-ID: 87lg33haza.fsf@news-spur.riddles.org.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

>>>>> "Bob" == Bob Jolliffe <bobjolliffe(at)gmail(dot)com> writes:

Bob> Excuse me if this is a silly question. I am trying to fiddle with
Bob> shared_buffers setting on postgresql 10.6 on ubuntu 18.04 server.

Bob> I have this at bottom of my config file:
Bob> shared_buffers = 1GB

Bob> Yet when I check the setting from pg_setting I see something quite
Bob> different:

Bob> postgres=# SELECT name, setting FROM pg_settings where name = 'shared_buffers';
Bob> name | setting
Bob> ----------------+---------
Bob> shared_buffers | 131072

pg_settings can tell you more than you asked for:

postgres=# select * from pg_settings where name='shared_buffers';
-[ RECORD 1 ]---+-------------------------------------------------------------
name | shared_buffers
setting | 16384
unit | 8kB
category | Resource Usage / Memory
short_desc | Sets the number of shared memory buffers used by the server.
extra_desc |
context | postmaster
vartype | integer
source | configuration file
min_val | 16
max_val | 1073741823
enumvals |
boot_val | 1024
reset_val | 16384
sourcefile | /home/andrew/work/pgsql/inst/9.5/data/postgresql.conf
sourceline | 113
pending_restart | f

notice that "unit 8kB" line; the displayed integer value is in units of
8kB (which is the block size your server was compiled with, which you
can also see as the block_size parameter).

--
Andrew (irc:RhodiumToad)

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Alvaro Herrera 2019-01-29 15:12:18 Re: pg_locks - what is a virtualxid locktype
Previous Message Thomas Markus 2019-01-29 12:35:42 Re: Interpreting shared_buffers setting