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 A148D5354D for ; Fri, 15 Apr 2005 07:07:50 -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 42807-07 for ; Fri, 15 Apr 2005 10:07:46 +0000 (GMT) Received: from boutiquenumerique.com (boutiquenumerique.com [82.67.9.10]) by svr1.postgresql.org (Postfix) with ESMTP id B729453FBE for ; Fri, 15 Apr 2005 07:07:44 -0300 (ADT) Received: (qmail 24079 invoked from network); 15 Apr 2005 12:07:48 +0200 Received: from unknown (HELO localhost) (boutiquenumerique-lists@192.168.0.4) by boutiquenumerique.com with SMTP; 15 Apr 2005 12:07:48 +0200 To: "Kevin Brown" , pgsql-performance@postgresql.org Subject: Re: How to improve db performance with $7K? References: <33c6269f050406151241b01148@mail.gmail.com> <20050406224102.GM93835@decibel.org> <33c6269f0504061732195f6ae4@mail.gmail.com> <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> Message-ID: Date: Fri, 15 Apr 2005 12:07:43 +0200 From: PFC Organization: =?iso-8859-15?Q?La_Boutique_Num=E9rique?= Content-Type: text/plain; format=flowed; delsp=yes; charset=iso-8859-15 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit In-Reply-To: <33c6269f050406151241b01148@mail.gmail.com> User-Agent: Opera M2(BETA2)/8.0 (Linux, build 987) X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.002 tagged_above=0 required=5 tests=AWL X-Spam-Level: X-Archive-Number: 200504/331 X-Sequence-Number: 11728 > My argument is that a sufficiently smart kernel scheduler *should* > yield performance results that are reasonably close to what you can > get with that feature. Perhaps not quite as good, but reasonably > close. It shouldn't be an orders-of-magnitude type difference. And a controller card (or drive) has a lot less RAM to use as a cache / queue for reordering stuff than the OS has, potentially the OS can us most of the available RAM, which can be gigabytes on a big server, whereas in the drive there are at most a few tens of megabytes... However all this is a bit looking at the problem through the wrong end. The OS should provide a multi-read call for the applications to pass a list of blocks they'll need, then reorder them and read them the fastest possible way, clustering them with similar requests from other threads. Right now when a thread/process issues a read() it will block until the block is delivered to this thread. The OS does not know if this thread will then need the next block (which can be had very cheaply if you know ahead of time you'll need it) or not. Thus it must make guesses, read ahead (sometimes), etc...