X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id A6E61D1BB8C for ; Wed, 7 Apr 2004 02:26:05 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 11650-07 for ; Wed, 7 Apr 2004 02:26:05 -0300 (ADT) Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by svr1.postgresql.org (Postfix) with ESMTP id 40FD4D1D08F for ; Wed, 7 Apr 2004 02:26:03 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.12.11/8.12.11) with ESMTP id i375Q2PU005720; Wed, 7 Apr 2004 01:26:03 -0400 (EDT) To: Chris Browne Cc: pgsql-admin@postgresql.org Subject: Re: Raw devices vs. Filesystems In-reply-to: <603c7gj04h.fsf@dev6.int.libertyrms.info> References: <71E37EF6B7DCC1499CEA0316A25683280105786A@loki.wc.globexplorer.net> <603c7gj04h.fsf@dev6.int.libertyrms.info> Comments: In-reply-to Chris Browne message dated "Tue, 06 Apr 2004 16:57:02 -0400" Date: Wed, 07 Apr 2004 01:26:02 -0400 Message-ID: <5719.1081315562@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200404/100 X-Sequence-Number: 13073 Chris Browne writes: > That claim seems really rather remarkable. > It implies an entirely stunning degree of inefficiency in the > implementation of filesystems on Solaris. Solaris has a reputation for having stunning degrees of inefficiency in a number of places :-(. On the other hand I've also heard it praised for its ability to survive partial hardware failures (eg, N out of M CPUs down), so maybe that's the price you gotta pay. But to get back to the point of this discussion: to allow PG to use raw devices instead of filesystems, we'd first have to do a ton of portability work (since raw disk access is nowhere standard), and abandon our principle that Postgres does not run as root (since raw disk access is not permitted to non-root processes by any sane sysadmin). But that last is a mighty comforting principle to have, anytime someone complains that their el cheapo whitebox PC locks up as soon as they start to stress the database. I know I'd have wasted a lot more time chasing random hardware breakages if I couldn't say "system freezes and filesystem corruption are Clearly Not Our Fault". After that, we get to implement our own filesystem-equivalent management of disk space allocation, disk I/O scheduling, etc. Are we really smarter than all those kernel hackers doing this for a living? I doubt it. After that, we get to re-optimize all the existing Postgres behaviors that are designed to sit on top of a standard Unix buffering filesystem layer. After that, we might reap some performance benefits. Or maybe not. There's not a heck of a lot of hard evidence that we would --- and what there is traces to twenty-year-old assumptions about disk drive and OS behavior, which are quite unlikely to still apply today. Personally, I have a lot of more-promising projects to pursue... regards, tom lane