X-Original-To: pgsql-performance-postgresql.org@postgresql.org Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id EE3109FA4A8 for ; Mon, 12 Jun 2006 20:27:01 -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 45637-01 for ; Mon, 12 Jun 2006 20:26:50 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from m.wordtothewise.com (goliath.word-to-the-wise.com [208.187.80.130]) by postgresql.org (Postfix) with ESMTP id 8BF229FA10A for ; Mon, 12 Jun 2006 20:26:52 -0300 (ADT) Received: from [10.3.2.7] (184.word-to-the-wise.com [208.187.80.184]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client certificate requested) by m.wordtothewise.com (Postfix) with ESMTP id 2BC38106BC for ; Mon, 12 Jun 2006 16:26:49 -0700 (PDT) Mime-Version: 1.0 (Apple Message framework v750) In-Reply-To: <1150151282.14661.42.camel@tigger> References: <1150151282.14661.42.camel@tigger> Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: <54CA6A16-AB42-440D-B5DB-BC43AE283ED8@blighty.com> Content-Transfer-Encoding: 7bit From: Steve Atkins Subject: Re: 64-bit vs 32-bit performance ... backwards? Date: Mon, 12 Jun 2006 16:26:47 -0700 To: "Pgsql-Performance ((E-mail))" X-Mailer: Apple Mail (2.750) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200606/146 X-Sequence-Number: 19503 On Jun 12, 2006, at 3:28 PM, Anthony Presley wrote: > Hi all! > > I had an interesting discussion today w/ an Enterprise DB developer > and > sales person, and was told, twice, that the 64-bit linux version of > Enterprise DB (which is based on the 64-bit version of PostgreSQL 8.1) > is SIGNIFICANTLY SLOWER than the 32-bit version. Since the guys of > EDB > are PostgreSQL ..... has anyone seen that the 64-bit is slower than > the > 32-bit version? > > I was told that the added 32-bits puts a "strain" and extra "overhead" > on the processor / etc.... which actually slows down the pointers and > necessary back-end "stuff" on the database. > > I'm curious if anyone can back this up .... or debunk it. It's about > the polar opposite of everything I've heard from every other database > vendor for the past several years, and would be quite an eye-opener > for > me. > > Anyone? It's unsurprising for code written with 64 bit pointers ("64 bit code") to be a little slower than 32 bit code. The code and data structures are bigger, more has to be copied from main memory, fewer cache hits, all those bad things. On CPUs with a uniform instructions set in both 32 and 64 bit modes you're only likely to see improved performance in 64 bit mode if your code can take advantage of the larger address space (postgresql doesn't). Some x86-esque architectures provide a somewhat different instruction set in their 64 bit mode, with more programmer visible registers. The increase in performance they can offer (with the right compiler) can offset the reduction due to pointer bloat, in some cases. Empirically... postgresql built for 64 bits is marginally slower than that built for a 32 bit api on sparc. None of my customers have found 64 bit x86 systems to be suitable for production use, yet, so I've not tested on any of those architectures. Cheers, Steve