Received: from localhost (unknown [200.46.204.184]) by postgresql.org (Postfix) with ESMTP id DD1F72E38DD for ; Wed, 19 Dec 2007 14:50:36 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.184]) (amavisd-maia, port 10024) with ESMTP id 82673-08 for ; Wed, 19 Dec 2007 14:50:03 -0400 (AST) Received: from westnet.com (westnet.com [216.187.52.2]) by postgresql.org (Postfix) with ESMTP id 93A0D2E37EC for ; Wed, 19 Dec 2007 14:50:31 -0400 (AST) Received: from westnet.com (localhost [127.0.0.1]) by westnet.com (8.14.0/8.14.0) with ESMTP id lBJIoTdB021724; Wed, 19 Dec 2007 13:50:30 -0500 (EST) Received: from localhost (gsmith@localhost) by westnet.com (8.14.0/8.13.2/Submit) with ESMTP id lBJIoTMs021720; Wed, 19 Dec 2007 13:50:29 -0500 (EST) X-Authentication-Warning: westnet.com: gsmith owned process doing -bs Date: Wed, 19 Dec 2007 13:50:29 -0500 (EST) From: Greg Smith X-X-Sender: gsmith@westnet.com To: Stuart Bishop cc: pgsql-performance@postgresql.org Subject: Re: Dual core Opterons beating quad core Xeons? In-Reply-To: <476908BB.5090408@stuartbishop.net> Message-ID: References: <476908BB.5090408@stuartbishop.net> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200712/285 X-Sequence-Number: 28101 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