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 0A70AD71EC for ; Tue, 23 Aug 2005 20:18:34 -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 54190-02 for ; Tue, 23 Aug 2005 23:18:31 +0000 (GMT) Received: from vms044pub.verizon.net (vms044pub.verizon.net [206.46.252.44]) by svr1.postgresql.org (Postfix) with ESMTP id 39959D70F9 for ; Tue, 23 Aug 2005 20:18:30 -0300 (ADT) Received: from osgiliath.mathom.us ([151.200.14.55]) by vms044.mailsrvcs.net (Sun Java System Messaging Server 6.2 HotFix 0.04 (built Dec 24 2004)) with ESMTPA id <0ILP00DO57523IO1@vms044.mailsrvcs.net> for pgsql-performance@postgresql.org; Tue, 23 Aug 2005 18:12:39 -0500 (CDT) Received: from localhost (localhost [127.0.0.1]) by osgiliath.mathom.us (Postfix) with ESMTP id B1A87602638; Tue, 23 Aug 2005 19:12:38 -0400 (EDT) Received: from osgiliath.mathom.us ([127.0.0.1]) by localhost (osgiliath [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 07218-04-8; Tue, 23 Aug 2005 19:12:38 -0400 (EDT) Received: by osgiliath.mathom.us (Postfix, from userid 1000) id 86F56600162; Tue, 23 Aug 2005 19:12:38 -0400 (EDT) Date: Tue, 23 Aug 2005 19:12:38 -0400 From: Michael Stone Subject: Re: Read/Write block sizes (Was: Caching by Postgres) In-reply-to: To: Jignesh Shah Cc: pgsql-performance@postgresql.org Mail-Followup-To: Jignesh Shah , pgsql-performance@postgresql.org Message-id: <20050823231238.GL8667@mathom.us> MIME-version: 1.0 Content-type: text/plain; charset=us-ascii; format=flowed Content-disposition: inline X-Pgp-Fingerprint: 53 FF 38 00 E7 DD 0A 9C 84 52 84 C5 EE DF 7C 88 X-Virus-Scanned: by amavisd-new-20030616-p10 (Debian) at mathom.us References: User-Agent: Mutt/1.5.10i X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.044 required=5 tests=[AWL=-0.006, FORGED_RCVD_HELO=0.05] X-Spam-Level: X-Archive-Number: 200508/360 X-Sequence-Number: 14107 On Tue, Aug 23, 2005 at 05:29:01PM -0400, Jignesh Shah wrote: >Actually some of that readaheads,etc the OS does already if it does >some sort of throttling/clubbing of reads/writes. Note that I specified the fully cached case--even with the workload in RAM the system still has to process a heck of a lot of read calls. >* Introduce a multiblock or extent tunable variable where you can >define a multiple of 8K (or BlockSize tuneable) to read a bigger chunk >and store it in the bufferpool.. (Maybe writes too) (Most devices now >support upto 1MB chunks for reads and writes) Yeah. The problem with relying on OS readahead is that the OS doesn't know whether you're doing a sequential scan or an index scan; if you have the OS agressively readahead you'll kill your seek performance. OTOH, if you don't do readaheads you'll kill your sequential scan performance. At the app level you know which makes sense for each operation. Mike Stone