X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 55A815284E for ; Thu, 11 Aug 2005 19:39:00 -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 89183-05 for ; Thu, 11 Aug 2005 22:38:57 +0000 (GMT) Received: from sccmmhc92.asp.att.net (sccmmhc92.asp.att.net [204.127.203.212]) by svr1.postgresql.org (Postfix) with ESMTP id 832E952E7E for ; Thu, 11 Aug 2005 19:38:56 -0300 (ADT) Received: from juju.arbash-meinel.com ([12.214.18.81]) by sccmmhc92.asp.att.net (sccmmhc92) with ESMTP id <20050811223859m92009hurme>; Thu, 11 Aug 2005 22:38:59 +0000 Received: by juju.arbash-meinel.com (Postfix, from userid 505) id A959E56008; Thu, 11 Aug 2005 17:38:56 -0500 (CDT) Received: from [192.168.1.12] (Jigglypuff.arbash-meinel.com [192.168.1.12]) by juju.arbash-meinel.com (Postfix) with ESMTP id 6B1E755FCC; Thu, 11 Aug 2005 17:38:50 -0500 (CDT) Message-ID: <42FBD377.8040006@arbash-meinel.com> Date: Thu, 11 Aug 2005 17:38:47 -0500 From: John A Meinel User-Agent: Mozilla Thunderbird 1.0.6 (Macintosh/20050716) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Jeffrey Tenny Cc: pgsql-performance@postgresql.org Subject: Re: Mostly read performance References: <42FBCF4D.6060002@comcast.net> In-Reply-To: <42FBCF4D.6060002@comcast.net> X-Enigmail-Version: 0.92.0.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enigA0AF2BF7B9B582267E8407E5" X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.044 tagged_above=0 required=5 tests=[AWL=-0.006, FORGED_RCVD_HELO=0.05] X-Spam-Level: X-Archive-Number: 200508/135 X-Sequence-Number: 13882 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enigA0AF2BF7B9B582267E8407E5 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Jeffrey Tenny wrote: > I have a largely table-append-only application where most transactions > are read-intensive and many are read-only. The transactions may span > many tables, and in some cases might need to pull 70 MB of data out of a > couple of the larger tables. > > > In 7.3, I don't seem to see any file system or other caching that helps > with repeated reads of the 70MB of data. Secondary fetches are pretty > much as slow as the first fetch. (The 70MB in this example might take > place via 2000 calls to a parameterized statement via JDBC). > > Were there changes after 7.3 w.r.t. caching of data? I read this list > and see people saying that 8.0 will use the native file system cache to > good effect. Is this true? Is it supposed to work with 7.3? Is there > something I need to do to get postgresql to take advatage of large ram > systems? > > Thanks for any advice. > Well, first off, the general recommendation is probably that 7.3 is really old, and you should try to upgrade to at least 7.4, though recommended to 8.0. The bigger questions: How much RAM do you have? How busy is your system? 8.0 doesn't really do anything to do make the system cache the data. What kernel are you using? Also, if your tables are small enough, and your RAM is big enough, you might already have everything cached. One way to flush the caches, is to allocate a bunch of memory, and then scan through it. Or maybe mmap a really big file, and access every byte. But if your kernel is smart enough, it could certainly deallocate pages after you stopped accessing them, so I can't say for sure that you can flush the memory cache. Usually, I believe these methods are sufficient. John =:-> --------------enigA0AF2BF7B9B582267E8407E5 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.0 (Darwin) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org iD8DBQFC+9N5JdeBCYSNAAMRAqWnAKCftXMEdupw2BcPfFF//U2sPrt8+ACgi1fz ClIX7xWItItgq2NhnLskcQM= =P+9r -----END PGP SIGNATURE----- --------------enigA0AF2BF7B9B582267E8407E5--