X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id 9B42411F6315 for ; Wed, 26 Apr 2006 19:37:48 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 54223-01 for ; Wed, 26 Apr 2006 19:37:36 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from noel.decibel.org (noel.decibel.org [67.100.216.10]) by postgresql.org (Postfix) with ESMTP id B6EE411F6275 for ; Wed, 26 Apr 2006 19:37:33 -0300 (ADT) Received: by noel.decibel.org (Postfix, from userid 1001) id 4EDB156423; Wed, 26 Apr 2006 17:37:33 -0500 (CDT) Received: (hashcash-sendmail, from uid 1001); Wed, 26 Apr 2006 17:37:31 -0500 Date: Wed, 26 Apr 2006 17:37:31 -0500 From: "Jim C. Nasby" To: Bruce Momjian Cc: Scott Marlowe , mark@mark.mielke.cc, Bill Moran , pgsql-performance@postgresql.org Subject: Re: Large (8M) cache vs. dual-core CPUs Message-ID: <20060426223731.GE97354@pervasive.com> References: <20060426220929.GY97354@pervasive.com> <200604262216.k3QMGkk15952@candle.pha.pa.us> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200604262216.k3QMGkk15952@candle.pha.pa.us> X-Operating-System: FreeBSD 6.0-RELEASE-p4 amd64 X-Distributed: Join the Effort! http://www.distributed.net User-Agent: Mutt/1.5.11 X-Hashcash: 1:20:060426:pgman@candle.pha.pa.us::xiaDS0Yk1PQ9W8nr:000000000000000 0000000000000000000000003mwC X-Hashcash: 1:20:060426:smarlowe@g2switchworks.com::eGuo5LvF5/QxXhHz:00000000000 0000000000000000000000007t3A X-Hashcash: 1:20:060426:mark@mark.mielke.cc::SgA0/l1OZ3yF/NmC:000000000000000000 00000000000000000000000005ee X-Hashcash: 1:20:060426:wmoran@collaborativefusion.com::tfDTca7Wpo2sF+Ng:0000000 0000000000000000000000007FhP X-Hashcash: 1:20:060426:pgsql-performance@postgresql.org::8hogssmu3+Nw7Ag3:00000 0000000000000000000000005rTd X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200604/616 X-Sequence-Number: 18700 On Wed, Apr 26, 2006 at 06:16:46PM -0400, Bruce Momjian wrote: > Jim C. Nasby wrote: > > On Wed, Apr 26, 2006 at 10:27:18AM -0500, Scott Marlowe wrote: > > > If you haven't actually run a heavy benchmark of postgresql on the two > > > architectures, please don't make your decision based on other > > > benchmarks. Since you've got both a D920 and an X2 3800, that'd be a > > > great place to start. Mock up some benchmark with a couple dozen > > > threads hitting the server at once and see if the Intel can keep up. It > > > > Or better yet, use dbt* or even pgbench so others can reproduce... > > For why Opterons are superior to Intel for PostgreSQL, see: > > http://techreport.com/reviews/2005q2/opteron-x75/index.x?pg=2 > > Section "MESI-MESI-MOESI Banana-fana...". Specifically, this part about > the Intel implementation: > > The processor with the Invalid data in its cache (CPU 0, let's say) > might then wish to modify that chunk of data, but it could not do so > while the only valid copy of the data is in the cache of the other > processor (CPU 1). Instead, CPU 0 would have to wait until CPU 1 wrote > the modified data back to main memory before proceeding.and that takes > time, bus bandwidth, and memory bandwidth. This is the great drawback of > MESI. > > AMD transfers the dirty cache line directly from cpu to cpu. I can > imaging that helping our test-and-set shared memory usage quite a bit. Wasn't the whole point of test-and-set that it's the recommended way to do lightweight spinlocks according to AMD/Intel? You'd think they'd have a way to make that performant on multiple CPUs (though if it's relying on possibly modifying an underlying data page I can't really think of how to do that without snaking through the cache...) -- Jim C. Nasby, Sr. Engineering Consultant jnasby@pervasive.com Pervasive Software http://pervasive.com work: 512-231-6117 vcard: http://jim.nasby.net/pervasive.vcf cell: 512-569-9461