SHMMAX / SHMALL Was (Re: postgresql-8.0.1 performance tuning)

Поиск
Список
Период
Сортировка
От Paul McGarry
Тема SHMMAX / SHMALL Was (Re: postgresql-8.0.1 performance tuning)
Дата
Msg-id a056b1d405060220451b029a15@mail.gmail.com
обсуждение исходный текст
Ответ на Re: postgresql-8.0.1 performance tuning  (Mark Kirkwood <markir@paradise.net.nz>)
Ответы Re: SHMMAX / SHMALL Was (Re: postgresql-8.0.1 performance
Список pgsql-performance
On 6/1/05, Mark Kirkwood <markir@paradise.net.nz> wrote:
> Cosimo Streppone wrote:
> > ######### Config ############
> >> /etc/sysctl.conf:
> >> kernel.shmall = 786432000
> >> kernel.shmmax = 786432000
> >
> > I think you have a problem here.
> > kernel.shmmax should *not* be set to an amount of RAM, but
> > to maximum number of shared memory pages, which on a typical linux system
> > is 4kb. Google around:
> >
> This is somewhat confusing :
>
> kernel.shmmax is in bytes (max single segment size)
> kernel.shmall is in (4k) pages (max system wide allocated segment pages)

Can someone resummarize the situation with these linux parameters for
the dummies? I thought I had my calculations all sorted out but now
I've confused myself again.

The documentation at
http://www.postgresql.org/docs/8.0/interactive/kernel-resources.html
puts the same figure into both values but the posts here seem to
suggest that is wrong?
Or is it different on a 2.4 kernel and the documentation needs updating?

In my specific case I have about 800meg of memory on a linux 2.4 kernel box.

Based on the powerpostgresql.com Performance Checklist [1]  and
Annotated Postgresql.conf [2] I understand that:
-I should have less than 1/3 of my total memory as shared_buffers
-For my server 15000 is a fairly reasonable starting point for
shared_buffers which is ~120MB
-I have 100 max_connections.

So I was going to set SHMMAX to 134217728 (ie 128 Meg)

What should SHMALL be?

The current system values are
postgres@localhost:~/data$ cat /proc/sys/kernel/shmmax
33554432
postgres@localhost:~/data$ cat /proc/sys/kernel/shmall
2097152

ie SHMALL seems to be 1/16 of SHMMAX


Paul

[1] http://www.powerpostgresql.com/PerfList/
[2] http://www.powerpostgresql.com/Downloads/annotated_conf_80.html

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

Предыдущее
От: mudfoot@rawbw.com
Дата:
Сообщение: Re: Adaptec/LSI/?? RAID (what about JBOD?)
Следующее
От: Mark Kirkwood
Дата:
Сообщение: Re: SHMMAX / SHMALL Was (Re: postgresql-8.0.1 performance