pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Andy Colson <andy@squeakycode.net>
To: Micka <mickamusset@gmail.com>
Cc: pgsql-performance@postgresql.org
Subject: Re: Optimize the database performance
Date: Mon, 17 Oct 2011 13:35:09 -0500
Message-ID: <4E9C755D.4070608@squeakycode.net> (raw)
In-Reply-To: <CAF+MRtnRr_8QqZ5ZGz0_H8jzvn8KND=K7cVzX8aywiumN+UJwA@mail.gmail.com>
References: <CAF+MRtnRr_8QqZ5ZGz0_H8jzvn8KND=K7cVzX8aywiumN+UJwA@mail.gmail.com>

On 10/17/2011 04:48 AM, Micka wrote:
> Hi,
>
> I've a postgres 9.1 database used for map generating ( tiles ).
> The system has 24Go RAM and 5 processors.
> I'm using geoserver to generate the tiles.
>
> My data used 8486 MB  => psql -d gis -c "SELECT pg_size_pretty(pg_database_size('gis'))"
>
> I've carefully indexes the table by the "the_geom" column.
>
> Here is my database config :
>
> --> change :
> --> listen_addresses = '*'
> --> max_connections = 50
> --> tcp_keepalives_idle = 60                # TCP_KEEPIDLE, in seconds;
> --> shared_buffers = 1024MB                 # 10% of available RAM
> --> work_mem = 256MB                        # min 64kB
> --> maintenance_work_mem = 256MB            # min 1MB
> --> effective_cache_size = 5120MB
> --> autovacuum = off
>
> sudo nano /etc/sysctl.conf
> -->   kernel.shmmax=5368709120
> -->   kernel.shmall=5368709120
>
> I wanted to have your opinion about this config ?  What can I do to optimize the performance ?
>
> Thank you,
>

Yeah... We're gonna need some more details.  Whats slow?  Are you CPU bound or IO bound?  How many concurrent db connections?  What does vmstat look like?  And 10% of 24 gig is 2.4 gig, not 1 gig.

Or is this box doing something else.  I noticeeffective_cache_size is only 5 gig, so you must be doing other things on this box.

> --> autovacuum = off

Are you vacuuming by hand!?   If not this is a "really bad idea" (tm)(c)(r)

-Andy



view thread (4+ messages)  latest in thread

Message-ID: <4E9C755D.4070608@squeakycode.net>
Permalink:  ../4E9C755D.4070608@squeakycode.net/
Also on:    postgresql.org/message-id/4E9C755D.4070608@squeakycode.net

 · 

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: andy@squeakycode.net, mickamusset@gmail.com
  Subject: Re: Optimize the database performance
  In-Reply-To: <4E9C755D.4070608@squeakycode.net>

* 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