pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Greg Smith <gsmith@gregsmith.com>
To: okparanoid@free.fr
Cc: pgsql-performance@postgresql.org
Subject: Re: update 600000 rows
Date: Sat, 15 Dec 2007 10:47:02 -0500 (EST)
Message-ID: <Pine.GSO.4.64.0712151041120.1456@westnet.com> (raw)
In-Reply-To: <1197677482.47631baa4052a@imp.free.fr>
References: <1197677482.47631baa4052a@imp.free.fr>

On Sat, 15 Dec 2007, okparanoid@free.fr wrote:

> First when i run htop i see that the memory used is never more than 150 MB.
> I don't understand in this case why setting shmall and shmmax kernel's
> parameters to 16 GB of memory (the server has 32 GB) increase the rapidity of
> the transaction a lot compared to a shmall and shmax in (only) 2 GB ?!

The kernel parameters provide an upper limit for how much memory 
PostgreSQL can allocate, but by themselves they don't actually request 
more memory.  There is a configuration parameters called shared_buffers 
that is the main thing to adjust.  Since you say you're new to this, see 
http://www.westnet.com/~gsmith/content/postgresql/pg-5minute.htm for the 
first set of things you should be adjusting.

If you're doing lots of updates, you'll need to increase 
checkpoint_segments as well.  Once you get the memory allocated and 
checkpoint parameters in the right range, at that point you'll be prepared 
to look into transaction grouping and application issues in that area.

--
* Greg Smith gsmith@gregsmith.com http://www.gregsmith.com Baltimore, MD



view thread (9+ messages)  latest in thread

Message-ID: <Pine.GSO.4.64.0712151041120.1456@westnet.com>
Permalink:  ../Pine.GSO.4.64.0712151041120.1456@westnet.com/
Also on:    postgresql.org/message-id/Pine.GSO.4.64.0712151041120.1456@westnet.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: gsmith@gregsmith.com, okparanoid@free.fr
  Subject: Re: update 600000 rows
  In-Reply-To: <Pine.GSO.4.64.0712151041120.1456@westnet.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