Re: PostgreSQL's share_buffer calculation using shmget() versus kernel.shmmax

Поиск
Список
Период
Сортировка
От Mel Llaguno
Тема Re: PostgreSQL's share_buffer calculation using shmget() versus kernel.shmmax
Дата
Msg-id E1FB7FBAE29E634FA58D6CC0D59F288B11EF8430@CH1PRD0511MB442.namprd05.prod.outlook.com
обсуждение исходный текст
Ответ на Re: PostgreSQL's share_buffer calculation using shmget() versus kernel.shmmax  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: PostgreSQL's share_buffer calculation using shmget() versus kernel.shmmax
Список pgsql-admin
Tom,

Thanks for the response. I've been doing a lot of performance tuning for our customers and I've found that wiki link a
lifesaver ;-) 

I'm trying to come up with a precise way to calculate the shmget() value which postgresql uses in the pgctl.log message
whenthe kernel.shmmax is set too low. There are situations when knowing this exact value is useful as our customers are
sometimesnot as familiar with postgresql as we'd like. Being able to calculate this value from enabled settings in
postgresql.confwould help us provide accurate guidance. As per Pavan's suggestion, I'm having a look at the
src/backend/storage/ipc/ipci.c.

Thanks,

Mel
________________________________________
From: Tom Lane [tgl@sss.pgh.pa.us]
Sent: Wednesday, February 06, 2013 10:49 PM
To: Mel Llaguno
Cc: Pavan Deolasee; pgsql-admin@postgresql.org
Subject: Re: [ADMIN] PostgreSQL's share_buffer calculation using shmget() versus kernel.shmmax

Mel Llaguno <mllaguno@coverity.com> writes:
> Thanks for your reply. I agree with your statement that you should set the configuration parameters first, but I
wouldlike to be able to calculate the SHMMAX value based on those parameters. This is particularly useful when
suggestingpostgresql.conf optimizations to our customers whose machine have a lot of RAM (64+GB). Having to guess this
valueis far from ideal; what I'd like is the formula used by postgresql that generates the shmget() value displayed in
thepgctl.log. 

There's some rather old information in Table 17-2 here:
http://www.postgresql.org/docs/9.2/static/kernel-resources.html#SYSVIPC

As Pavan says, the shared_buffers term is usually the only one worth
worrying about.  The traditional advice is to not set that to more than
about a quarter of your physical RAM, which would mean that this script
you're using to set SHMMAX is leaving lots of headroom, which is
perfectly OK.  (AFAIK there is no penalty to setting SHMMAX larger than
you need.)

There's more info worth looking at here:
https://wiki.postgresql.org/wiki/Tuning_Your_PostgreSQL_Server

                        regards, tom lane




В списке pgsql-admin по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: PostgreSQL's share_buffer calculation using shmget() versus kernel.shmmax
Следующее
От: K P Manoj
Дата:
Сообщение: Re: PostgreSQL's share_buffer calculation using shmget() versus kernel.shmmax