Re: Raw devices vs. Filesystems - Mailing list pgsql-admin

From Tom Lane
Subject Re: Raw devices vs. Filesystems
Date
Msg-id 5719.1081315562@sss.pgh.pa.us
Whole thread Raw
In response to Re: Raw devices vs. Filesystems  (Chris Browne <cbbrowne@acm.org>)
Responses Re: Raw devices vs. Filesystems  (Grega Bremec <gregab@noviforum.si>)
List pgsql-admin
Chris Browne <cbbrowne@acm.org> 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

pgsql-admin by date:

Previous
From: Marsh Ray
Date:
Subject: Re: Raw devices vs. Filesystems
Next
From: Tom Lane
Date:
Subject: Re: restoring large objects