X-Original-To: pgsql-hackers-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 5252DD9CF4 for ; Fri, 30 Sep 2005 22:44:25 -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 58465-09 for ; Sat, 1 Oct 2005 01:44:20 +0000 (GMT) Received: from xproxy.gmail.com (xproxy.gmail.com [66.249.82.198]) by svr1.postgresql.org (Postfix) with ESMTP id 02091D9CF2 for ; Fri, 30 Sep 2005 22:44:22 -0300 (ADT) Received: by xproxy.gmail.com with SMTP id t15so25792wxc for ; Fri, 30 Sep 2005 18:44:27 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=P/udTqE9F/zpzG82dv8nSnIsBf6ICvrrpfeiAU6e1H65llK+HXMWNgMrVY+uZWig+jFmkqfHVd8TJmwtJI4jNfZD6Vy4LFvbf4b6+VCiu+teS7bsezl1X2IF0mug70KhZNIeBc99ETVKD346U93UTF0CrndFBY+CNN+a7Way2dw= Received: by 10.70.118.6 with SMTP id q6mr1109255wxc; Fri, 30 Sep 2005 18:44:26 -0700 (PDT) Received: by 10.70.76.1 with HTTP; Fri, 30 Sep 2005 18:44:26 -0700 (PDT) Message-ID: Date: Fri, 30 Sep 2005 21:44:26 -0400 From: Gregory Maxwell Reply-To: Gregory Maxwell To: Ron Peacetree Subject: Re: [PERFORM] A Better External Sort? Cc: josh@agliodbs.com, pgsql-hackers@postgresql.org, pgsql-performance@postgresql.org In-Reply-To: <22251764.1128123609842.JavaMail.root@elwamui-polski.atl.sa.earthlink.net> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: <22251764.1128123609842.JavaMail.root@elwamui-polski.atl.sa.earthlink.net> X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.148 required=5 tests=[AWL=-0.124, RCVD_BY_IP=0.024, RISK_FREE=0.247] X-Spam-Level: X-Archive-Number: 200509/1460 X-Sequence-Number: 73857 On 9/30/05, Ron Peacetree wrote: > 4=3D I'm sure we are paying all sorts of nasty overhead for essentially > emulating the pg "filesystem" inside another filesystem. That means > ~2x as much overhead to access a particular piece of data. > > The simplest solution is for us to implement a new VFS compatible > filesystem tuned to exactly our needs: pgfs. > > We may be able to avoid that by some amount of hacking or > modifying of the current FSs we use, but I suspect it would be more > work for less ROI. On this point, Reiser4 fs already implements a number of things which would be desirable for PostgreSQL. For example: write()s to reiser4 filesystems are atomic, so there is no risk of torn pages (this is enabled because reiser4 uses WAFL like logging where data is not overwritten but rather relocated). The filesystem is modular and extensible so it should be easy to add whatever additional semantics are needed. I would imagine that all that would be needed is some more atomicity operations (single writes are already atomic, but I'm sure it would be useful to batch many writes into a transaction),some layout and packing controls, and some flush controls. A step further would perhaps integrate multiversioning directly into the FS (the wandering logging system provides the write side of multiversioning, a little read side work would be required.). More importantly: the file system was intended to be extensible for this sort of application. It might make a good 'summer of code' project for someone next year, ... presumably by then reiser4 will have made it into the mainline kernel by then. :)