pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Javier Reyes <c.javier.reyes.e@gmail.com>
To: pgsql-admin@postgresql.org
Subject: Option shared_buffers in PostgreSQL
Date: Sun, 1 May 2011 12:20:15 +0100
Message-ID: <BANLkTikfpYSRHMpEQ6CqCk2Qz5_9OUBe1g@mail.gmail.com> (raw)

Hello.

I have a server with 4GB of RAM and PostgreSQL 9.0.3 on Centos 5. I'm using
pgbench and pgbench-tools to measure performance, using two pgbench-tools
queries: select and tpc-b.

With default settings of postgresql.conf and select query, I get the
following results:

Scale: 1, 10, 100, 1000.
Transactions per second: 10000, 8800, 7500, 100.

(the number of records of the table is scale*100000)

I've only increased the option shared_buffer to 256MB (previously had 32 MB)
and I get the following results:

Scale: 1, 10, 100, 1000.
Transactions per second: 10000, 8000, 3200, 30

I don't understand why when the scale is 100 or more in the second
benchmark, the performance is so low compared to the first test. The only
thing I have done was increase the memory.

I've thrown every test twice and the results were similar. In an earlier
test, the memory configuration was:

shared_buffers = 512 MB
maintenance_work_mem = 8MB
effective_cache_size = 1GB
work_mem = 2MB

And the results were similar, even slightly worse. For that reason, I did
tests changing options one by one, to know what was the cause of poor
performance. And "the winner" is shared_buffers...

Thanks.

view thread (3+ messages)  latest in thread

Message-ID: <BANLkTikfpYSRHMpEQ6CqCk2Qz5_9OUBe1g@mail.gmail.com>
Permalink:  ../BANLkTikfpYSRHMpEQ6CqCk2Qz5_9OUBe1g@mail.gmail.com/
Also on:    postgresql.org/message-id/BANLkTikfpYSRHMpEQ6CqCk2Qz5_9OUBe1g@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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-admin@postgresql.org
  Cc: c.javier.reyes.e@gmail.com
  Subject: Re: Option shared_buffers in PostgreSQL
  In-Reply-To: <BANLkTikfpYSRHMpEQ6CqCk2Qz5_9OUBe1g@mail.gmail.com>
  References: <BANLkTikfpYSRHMpEQ6CqCk2Qz5_9OUBe1g@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