pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Alvaro Herrera <alvherre@alvh.no-ip.org>
To: Tena Sakai <tsakai@gallo.ucsf.edu>
Cc: pgsql-admin@postgresql.org
Subject: Re: postgres bogged down beyond tolerance
Date: Wed, 14 Nov 2007 16:08:14 -0300
Message-ID: <20071114190814.GU19014@alvh.no-ip.org> (raw)
In-Reply-To: <FE44E0D7EAD2ED4BB2165071DB8E328C03062D9A@egcrc-ex01.egcrc.org>
References: <FE44E0D7EAD2ED4BB2165071DB8E328C03062D9A@egcrc-ex01.egcrc.org>

Tena Sakai wrote:

> I checked kernel parameter
> shmmax and it was set as 33554432.  I "fixed" it as
> suggested by the manual:
> http://www.postgresql.org/docs/8.2/static/kernel-resources.html

Note that just by changing shmmax you're not doing anything to Postgres
itself.  If you want Postgres to use more memory, you need to increase
shared_buffers in postgresql.conf.  Changing shmmax is only required so
that the kernel allows Postgres to allocate all those shared_buffers.

> Namely, I shutdown the database, issued two commands:
>   /sbin/sysctl -w kernel.shmmax=134217728
>   /sbin/sysctl -w kernel.shmall=2097152
> and rebooted the computer.
> 
> After it came up, I checked the shmmax and it is set
> as 33554432.  Which surprised me.  Since I used -w
> flag, I thought it should've written to /etc/sysctl.conf,
> but there is no such entry at all and the data of this
> file is from 2006.

No, the -w actually means "write to the kernel", which is state that
doesn't persist by itself.  It's your own responsability to write it to
sysctl.conf.

Anyhow, I don't think any of this has anything to do with a performance
problem.  If you haven't ever vacuumed your database, do so now and try
again.  (Actually, have a read of the "maintenance" chapter in the
manual).

-- 
Alvaro Herrera       Valdivia, Chile   ICBM: S 39º 49' 18.1", W 73º 13' 56.4"
Voy a acabar con todos los humanos / con los humanos yo acabaré
voy a acabar con todos / con todos los humanos acabaré (Bender)



view thread (8+ messages)  latest in thread

Message-ID: <20071114190814.GU19014@alvh.no-ip.org>
Permalink:  ../20071114190814.GU19014@alvh.no-ip.org/
Also on:    postgresql.org/message-id/20071114190814.GU19014@alvh.no-ip.org

 · 

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-admin@postgresql.org
  Cc: alvherre@alvh.no-ip.org, tsakai@gallo.ucsf.edu
  Subject: Re: postgres bogged down beyond tolerance
  In-Reply-To: <20071114190814.GU19014@alvh.no-ip.org>

* 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