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 2494053700 for ; Fri, 15 Apr 2005 21:53:54 -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 79380-10 for ; Sat, 16 Apr 2005 00:53:50 +0000 (GMT) Received: from rwcrmhc14.comcast.net (rwcrmhc14.comcast.net [216.148.227.89]) by svr1.postgresql.org (Postfix) with ESMTP id ADB2653734 for ; Fri, 15 Apr 2005 21:53:48 -0300 (ADT) Received: from sysexperts.com (c-24-6-183-218.hsd1.ca.comcast.net[24.6.183.218]) by comcast.net (rwcrmhc14) with ESMTP id <20050416005351014005ngd3e>; Sat, 16 Apr 2005 00:53:51 +0000 Received: from localhost (localhost [127.0.0.1]) (uid 1000) by filer with local; Fri, 15 Apr 2005 17:53:50 -0700 id 000C40BE.4260621E.00006540 Date: Fri, 15 Apr 2005 17:53:50 -0700 From: Kevin Brown To: pgsql-performance@postgresql.org Subject: Re: How to improve db performance with $7K? Message-ID: <20050416005350.GF19518@filer> Mail-Followup-To: Kevin Brown , pgsql-performance@postgresql.org References: <87wtrfmgt5.fsf@stark.xeocode.com> <13449.1112847297@sss.pgh.pa.us> <20050414055655.GB19518@filer> <878y3lj23o.fsf@stark.xeocode.com> <20050414083608.GC19518@filer> <446.1113489854@sss.pgh.pa.us> <20050415020337.GD19518@filer> <28523.1113532916@sss.pgh.pa.us> <20050415050336.GE19518@filer> <29785.1113542934@sss.pgh.pa.us> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Content-Disposition: inline In-Reply-To: <29785.1113542934@sss.pgh.pa.us> Organization: Frobozzco International User-Agent: Mutt/1.5.8i X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.05 tagged_above=0 required=5 tests=FORGED_RCVD_HELO X-Spam-Level: X-Archive-Number: 200504/372 X-Sequence-Number: 11769 Tom Lane wrote: > Kevin Brown writes: > > In the case of pure random reads, you'll end up having to wait an > > average of half of a rotation before beginning the read. > > You're assuming the conclusion. The above is true if the disk is handed > one request at a time by a kernel that doesn't have any low-level timing > information. If there are multiple random requests on the same track, > the drive has an opportunity to do better than that --- if it's got all > the requests in hand. True, but see below. Actually, I suspect what matters is if they're on the same cylinder (which may be what you're talking about here). And in the above, I was assuming randomly distributed single-sector reads. In that situation, we can't generically know what the probability that more than one will appear on the same cylinder without knowing something about the drive geometry. That said, most modern drives have tens of thousands of cylinders (the Seagate ST380011a, an 80 gigabyte drive, has 94,600 tracks per inch according to its datasheet), but much, much smaller queue lengths (tens of entries, hundreds at most, I'd expect. Hard data on this would be appreciated). For purely random reads, the probability that two or more requests in the queue happen to be in the same cylinder is going to be quite small. -- Kevin Brown kevin@sysexperts.com