pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Paul McGarry <paul.mcgarry@gmail.com>
To: Mark Kirkwood <markir@paradise.net.nz>
Cc: Cosimo Streppone <cosimo@streppone.it>
Cc: Martin Fandel <martin.fandel@alphyra-evs.de>
Cc: Postgresql Performance list <pgsql-performance@postgresql.org>
Subject: SHMMAX / SHMALL Was (Re: postgresql-8.0.1 performance tuning)
Date: Fri, 3 Jun 2005 13:45:38 +1000
Message-ID: <a056b1d405060220451b029a15@mail.gmail.com> (raw)
In-Reply-To: <429D56B2.9070302@paradise.net.nz>
References: <1117201312.7060.6.camel@fandelm.ecommit.de>
	<429D47FD.7090501@streppone.it>
	<429D56B2.9070302@paradise.net.nz>

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



view thread (5+ messages)  latest in thread

Message-ID: <a056b1d405060220451b029a15@mail.gmail.com>
Permalink:  ../a056b1d405060220451b029a15@mail.gmail.com/
Also on:    postgresql.org/message-id/a056b1d405060220451b029a15@mail.gmail.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: paul.mcgarry@gmail.com, markir@paradise.net.nz, cosimo@streppone.it, martin.fandel@alphyra-evs.de
  Subject: Re: SHMMAX / SHMALL Was (Re: postgresql-8.0.1 performance tuning)
  In-Reply-To: <a056b1d405060220451b029a15@mail.gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

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