Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 6B582475E14 for ; Mon, 20 Jan 2003 04:52:18 -0500 (EST) Received: from lakemtao03.cox.net (lakemtao03.cox.net [68.1.17.242]) by postgresql.org (Postfix) with ESMTP id 83970475D22 for ; Mon, 20 Jan 2003 04:52:17 -0500 (EST) Received: from [192.168.1.1] ([68.11.66.83]) by lakemtao03.cox.net (InterMail vM.5.01.04.05 201-253-122-122-105-20011231) with ESMTP id <20030120095219.LTFL8666.lakemtao03.cox.net@[192.168.1.1]> for ; Mon, 20 Jan 2003 04:52:19 -0500 Subject: Re: x86-64 and PostgreSQL From: Ron Johnson To: PgSQL Performance ML In-Reply-To: <3E2BE4BF.28150.D33005A@localhost> References: <1042867764.889.181.camel@haggis> ; from ron.l.johnson@cox.net on Fri, Jan 17, 2003 at 11:29:25PM -0600 <3E2BE4BF.28150.D33005A@localhost> Content-Type: text/plain Organization: Message-Id: <1043056334.15592.167.camel@haggis> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.2.1 Date: 20 Jan 2003 03:52:15 -0600 Content-Transfer-Encoding: 7bit X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200301/204 X-Sequence-Number: 851 On Mon, 2003-01-20 at 00:29, Shridhar Daithankar wrote: > On 18 Jan 2003 at 11:39, Andrew Sullivan wrote: > > On Fri, Jan 17, 2003 at 11:29:25PM -0600, Ron Johnson wrote: > > > Hi, > > > > > > Will there be any advantages to running Pg on a 64-bit CPU rather > > > than 32-bit? > > > > In my experience, not really. We use SPARCs under Solaris 7 and, > > now, 8. We haven't found any terribly obvious advantages with the > > system compiled as a 64 bit app, but we _did_ find problems with the > > 64 bit libraries combined with gcc. As a result of that and > > pressures to get working on some other things, we stopped testing > > Postgres as a 64 bit app on Solaris. We haven't done any work on > > Solaris 8 with it, and that system is a little more mature in the > > 64-bit-support department, so when I have a chance do to more > > investigation, I will. > > I remember reading in one of the HP guides regarding 64 bit that 64 bit is a > tool provided for applications. In general no app. should be 64 bit unless > required. In fact they advice that fastest performance one can get is by > running 32 bit app. on 64 bit machine because registers are wide and can be > filled in is less number of fetches. > > Sounds reasonable to me. Dou you, the programmer or SysAdmin, always know when 64 bits is needed? Take, for simple example, a memcpy() of 1024 bytes. Most CPUs don't have direct core-core copy instruction. (The RISC philosophy, after all, is load-and-store.) A 32-bit executable would need 1024/32 = 32 pairs of load-store operations, while a 64-bit executable would only need 16. Yes, L1 & L2 caching would help some, but not if you are moving huge amounts of data... -- +------------------------------------------------------------+ | Ron Johnson, Jr. mailto:ron.l.johnson@cox.net | | Jefferson, LA USA http://members.cox.net/ron.l.johnson | | | | "Basically, I got on the plane with a bomb. Basically, I | | tried to ignite it. Basically, yeah, I intended to damage | | the plane." | | RICHARD REID, who tried to blow up American Airlines | | Flight 63 | +------------------------------------------------------------+