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 3D3749FB4E8 for ; Thu, 7 Sep 2006 14:55:55 -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 81671-01-4 for ; Thu, 7 Sep 2006 14:55:42 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from servata.com (ip-216-152-249-241.servata.com [216.152.249.241]) by postgresql.org (Postfix) with ESMTP id 4328F9FB7A6 for ; Thu, 7 Sep 2006 13:56:09 -0300 (ADT) Received: from [209.162.219.253] (helo=dogma.v10.wvs) by servata.com with esmtpa (Exim 4.50) id 1GLNAa-0003s8-CR; Thu, 07 Sep 2006 09:56:04 -0700 Subject: Re: 64bit vs 32bit build on amd64 From: Jeff Davis To: Roman Krylov Cc: pgsql-performance@postgresql.org In-Reply-To: <44FC8FB4.4030706@mail.ru> References: <44FC8FB4.4030706@mail.ru> Content-Type: text/plain Date: Thu, 07 Sep 2006 09:56:01 -0700 Message-Id: <1157648161.20589.154.camel@dogma.v10.wvs> Mime-Version: 1.0 X-Mailer: Evolution 2.0.4 (2.0.4-7) Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.251 tagged_above=0 required=5 tests=AWL, FORGED_RCVD_HELO, SPF_HELO_PASS X-Spam-Level: X-Archive-Number: 200609/38 X-Sequence-Number: 20724 On Tue, 2006-09-05 at 00:42 +0400, Roman Krylov wrote: > Hi. > My config: > gentoo linux "2005.1" on amd64x2 in 64-bit mode, > kernel 2.6.16.12 > glibc 3.3.5(NPTL), > gcc 3.4.3. > I had not used portage for building. > I built two versions of postgres from sources: > postgresql-8.1.4 native(64bit) > and 32-bit with CFLAGS=... -m32, and "LD = > /usr/x86_64-pc-linux-gnu/bin/ld -melf_i386" in src/Makefile.global. > 32-bit build runs much faster than 64 apparently. > What benchmark utility should I run to provide more concrete info (numbers)? > What could be the reason of that difference in performance? > I am also interested in 32-bit versus 64-bit performance. If I only have 4GB of RAM, does it make sense to compile postgresql as a 64-bit executable? I assume there's no reason for PostgreSQL's shared buffers, etc., to add up to more than 2GB on a system with 4GB of RAM. Is there a general consensus on the matter, or is it highly application- dependent? I am not doing any huge amount of 64-bit arithmetic. I am using Woodcrest, not Opteron. Regards, Jeff Davis