pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Greg Smith <gsmith@gregsmith.com>
To: Stuart Bishop <stuart@stuartbishop.net>
Cc: pgsql-performance@postgresql.org
Subject: Re: Dual core Opterons beating quad core Xeons?
Date: Wed, 19 Dec 2007 13:50:29 -0500 (EST)
Message-ID: <Pine.GSO.4.64.0712191322410.29296@westnet.com> (raw)
In-Reply-To: <476908BB.5090408@stuartbishop.net>
References: <476908BB.5090408@stuartbishop.net>

On Wed, 19 Dec 2007, Stuart Bishop wrote:

> For pgbench (PG 8.2 running Ubuntu), the Opteron is getting about 6x TPS
> over the Xeon (3000+ TPS on Opteron vs ~500 on Xeon). Things get a little
> better for Xeon with PG 8.3 (570-540 TPS).

The 3000+ TPS figure is the correct one for a controller that can cache 
writes.  Around 500TPS is normal for a setup without one.  I suspect all 
you're testing is the difference between the I/O subsystem in the two 
serves, and it's probaby the case that the Opteron disk subsystem caches 
writes while the Xeon doesn't.  You haven't drawn any useful conclusions 
comparing Xeons and Opterons yet.

Warning:  the system with the write caching can easily be doing that 
incorrectly, in a way that can corrupt your database one day.  See 
http://momjian.us/main/writings/pgsql/sgml/wal-reliability.html for an 
intro and 
http://www.westnet.com/~gsmith/content/postgresql/TuningPGWAL.htm for way 
more detail.

If you don't have a real disk setup, you can't use the default pgbench 
test and expect the results to be useful.  The main thing it does is write 
heavily in a way that makes the disk controller and associated I/O the 
bottleneck in most cases.

The only useful test you can do right now with pgbench is to pass it the 
-S parameter so that it does only reads instead.  That will give you a 
much better idea how the CPUs compare.  You still need to be careful about 
the database scale relative to the amount of RAM; at some point even the 
read test will be limited by disk parameters instead of CPU.  Take a look 
at http://www.westnet.com/~gsmith/content/postgresql/pgbench-scaling.htm 
for a tutorial on using pgbench to quantify read performance.  Note that 
the way I compute the sizes of things in there is a little difficult, one 
day I'm going to use some of the suggestions at 
http://andreas.scherbaum.la/blog/archives/282-table-size,-database-size.html 
to improve that and you should take a look there as well.

You'll also need to vary the number of clients a bit.  You should see the 
largest difference between the two servers with around 16 of them (where 
the Xeon system has a dedicated core for each while the Opteron has 2 
clients/core) while a useful spot to compare the maximum throughput of the 
servers will be around 64 clients.

> With PG 8.2 and 8.3, is it still pretty much limited to 8 cores making 2 of
> the quad core Xeons redundant or detrimental?

Where'd you get the idea 8 cores was a limit?  As cores go up eventually 
you run out of disk or memory bandwidth, but how that plays out is very 
application dependant and there's no hard line anywhere.

> I expect we will be running this hardware for 8.2, 8.3 and 8.4. Anyone aware
> of anything that might change the landscape for 8.4?

8.4 is only in the earliest of planning stages right now, nobody knows 
what that will bring yet.

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



view thread (17+ messages)  latest in thread

Message-ID: <Pine.GSO.4.64.0712191322410.29296@westnet.com>
Permalink:  ../Pine.GSO.4.64.0712191322410.29296@westnet.com/
Also on:    postgresql.org/message-id/Pine.GSO.4.64.0712191322410.29296@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, stuart@stuartbishop.net
  Subject: Re: Dual core Opterons beating quad core Xeons?
  In-Reply-To: <Pine.GSO.4.64.0712191322410.29296@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