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 EEDABD7093 for ; Tue, 23 Aug 2005 18:19:53 -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 28189-01 for ; Tue, 23 Aug 2005 21:19:51 +0000 (GMT) Received: from floppy.pyrenet.fr (floppy.pyrenet.fr [194.116.145.2]) by svr1.postgresql.org (Postfix) with ESMTP id 5F2C9D7087 for ; Tue, 23 Aug 2005 18:19:49 -0300 (ADT) Received: by floppy.pyrenet.fr (Postfix, from userid 106) id B5A6E30B42; Tue, 23 Aug 2005 23:32:03 +0200 (MET DST) From: Chris Browne X-Newsgroups: pgsql.performance Subject: Re: Caching by Postgres Date: Tue, 23 Aug 2005 17:17:42 -0400 Organization: cbbrowne Computing Inc Lines: 24 Message-ID: <60oe7opd3d.fsf@dba2.int.libertyrms.com> References: <20050823171045.12112.qmail@web51309.mail.yahoo.com> <20050823124323.710a9dd3.frank@wiles.org> <430B6DE3.6040109@sun.com> <200508231238.04844.josh@agliodbs.com> <20050823202932.GK8667@mathom.us> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 X-Complaints-To: usenet@news.hub.org User-Agent: Gnus/5.1007 (Gnus v5.10.7) XEmacs/21.4.17 (Jumbo Shrimp, linux) Cancel-Lock: sha1:RQHjE2QF6M4vONlqAnZ1A7VO1ho= To: pgsql-performance@postgresql.org X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.114 required=5 tests=[AWL=0.114] X-Spam-Level: X-Archive-Number: 200508/356 X-Sequence-Number: 14103 mstone+postgres@mathom.us (Michael Stone) writes: > On Tue, Aug 23, 2005 at 12:38:04PM -0700, Josh Berkus wrote: >> which have a clear and measurable effect on performance and are >> fixable without bloating the PG code. Some of these issues (COPY >> path, context switching > > Does that include increasing the size of read/write blocks? I've > noticed that with a large enough table it takes a while to do a > sequential scan, even if it's cached; I wonder if the fact that it > takes a million read(2) calls to get through an 8G table is part of > that. But behind the scenes, the OS is still going to have to evaluate the "is this in cache?" question for each and every one of those pages. (Assuming the kernel's page size is 8K; if it's smaller, the number of evaluations will be even higher...) Grouping the read(2) calls together isn't going to have any impact on _that_ evaluation. -- let name="cbbrowne" and tld="ntlug.org" in name ^ "@" ^ tld;; http://www3.sympatico.ca/cbbrowne/finances.html "People who don't use computers are more sociable, reasonable, and ... less twisted" -- Arthur Norman