X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id A5E50D72B3 for ; Wed, 24 Aug 2005 15:47:22 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 61138-09 for ; Wed, 24 Aug 2005 18:47:20 +0000 (GMT) Received: from unicorn.rentec.com (unicorn.rentec.com [216.223.240.9]) by svr1.postgresql.org (Postfix) with ESMTP id B18E1D79B7 for ; Wed, 24 Aug 2005 15:47:18 -0300 (ADT) Received: from wren.rentec.com (wren.rentec.com [192.5.35.106]) by unicorn.rentec.com (8.13.1/8.12.1) with ESMTP id j7OIl9GK020673 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 24 Aug 2005 14:47:10 -0400 (EDT) X-Rentec: external Received: from [172.26.132.145] (hoopoe.rentec.com [172.26.132.145]) by wren.rentec.com (8.13.1/8.12.1) with ESMTP id j7OIl9ds022058; Wed, 24 Aug 2005 14:47:09 -0400 (EDT) Message-ID: <430CC0AD.5040400@rentec.com> Date: Wed, 24 Aug 2005 14:47:09 -0400 From: Alan Stange Reply-To: stange@rentec.com Organization: Renaissance Technologies Corp. User-Agent: Mozilla Thunderbird 1.0+ (X11/20050712) MIME-Version: 1.0 To: mark@mark.mielke.cc Cc: Donald Courtney , William Yu , pgsql-performance@postgresql.org Subject: Re: Caching by Postgres References: <20050823171045.12112.qmail@web51309.mail.yahoo.com> <20050823124323.710a9dd3.frank@wiles.org> <430B6DE3.6040109@sun.com> <430C7448.7030103@sun.com> <20050824173055.GA11788@mark.mielke.cc> In-Reply-To: <20050824173055.GA11788@mark.mielke.cc> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Logged: Logged by unicorn.rentec.com as j7OIl9GK020673 at Wed Aug 24 14:47:10 2005 X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.02 required=5 tests=[AWL=0.020] X-Spam-Level: X-Archive-Number: 200508/397 X-Sequence-Number: 14144 mark@mark.mielke.cc wrote: > So then we move on to what 64-bit is really useful for. Obviously, > there is the arithmetic. If you were previously doing 64-bit > arithmetic through software, you will notice an immediate speed > improvement when doing it through hardware instead. If you have > a program that is scanning memory in any way, it may benefit from > 64-bit instructions (for example - copying data 64-bit words at > a time instead of 32-bit words at a time). PostgreSQL might benefit > slightly from either of these, slightly balancing the performance > degradation of using more memory to store the pointers, and more > memory bandwidth the access the pointers. > At least on Sparc processors, v8 and newer, any double precision math (including longs) is performed with a single instruction, just like for a 32 bit datum. Loads and stores of 8 byte datums are also handled via a single instruction. The urban myth that 64bit math is different/better on a 64 bit processor is just that; yes, some lower end processors would emulate/trap those instructions but that an implementation detail, not architecture. I believe that this is all true for other RISC processors as well. The 64bit API on UltraSparcs does bring along some extra FP registers IIRC. > If, however, you happen to have a very large amount of physical memory > - more memory than is supported by a 32-bit system, but is supported > by your 64-bit system, then the operating system should be able to use > this additional physical memory to cache file system data pages, which > will benefit PostgreSQL if used with tables that are larger than the > memory supported by your 32-bit system, and which have queries which > require more pages than the memory supported by your 32-bit system to > be frequently accessed. If you have a huge database, with many clients > accessing the data, this would be a definate yes. With anything less, > it is a maybe, or a probably not. > Solaris, at least, provided support for far more than 4GB of physical memory on 32 bit kernels. A newer 64 bit kernel might be more efficient, but that's just because the time was taken to support large page sizes and more efficient data structures. It's nothing intrinsic to a 32 vs 64 bit kernel. -- Alan