Re: Raw devices vs. Filesystems

Lists: pgsql-admin
From: "Jaime Casanova" <el_vigia_ec(at)hotmail(dot)com>
To: pgsql-admin(at)postgresql(dot)org
Subject: Raw devices vs. Filesystems
Date: 2004-03-29 16:37:48
Message-ID: BAY8-F1017z7ahbwlpd00012a78@hotmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-admin

Can you tell me (or at least guide me to a palce where i can find the
answer) what are the benefits of filesystems over raw devices?

And what filesystem is the best for postgresql performance?

_________________________________________________________________
The new MSN 8: advanced junk mail protection and 2 months FREE*
http://join.msn.com/?page=features/junkmail


From: Terry Hampton <thampton(at)limacorp(dot)com>
To: Jaime Casanova <el_vigia_ec(at)hotmail(dot)com>
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: Raw devices vs. Filesystems
Date: 2004-03-29 17:21:13
Message-ID: 40685B09.9020702@limacorp.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-admin


Hello Jaime,

I think you're on the right track but have gotten some
concepts possibly confused.

As I remember, the original email asked if Postgres
could be run in a "raw" mode. Another submitter
told us that it can not. ( Did I read that correctly, everyone ? )

This means run Postgress in a raw or character mode versus
the "standard" block mode as you would handle other files
in a filesystem. The primary advantage for a raw mode
is speed. ORACLE allows this method of operation.

So ... your last question is now rather moot. For best
performance assure your setup parameters and Linux
kernel parameters are optimized. Help with that
is a few keystrokes from anywhere.

Terry

Jaime Casanova wrote:
> Can you tell me (or at least guide me to a palce where i can find the
> answer) what are the benefits of filesystems over raw devices?
>
> And what filesystem is the best for postgresql performance?
>

--
Terry L. Hampton
Project Manager
LimaCorp, LLC www.limacorp.com
513.587.1874


From: Christopher Browne <cbbrowne(at)acm(dot)org>
To: pgsql-admin(at)postgresql(dot)org
Subject: Re: Raw devices vs. Filesystems
Date: 2004-03-29 18:28:47
Message-ID: m3oeqf4ie8.fsf@wolfe.cbbrowne.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-admin

After takin a swig o' Arrakan spice grog, el_vigia_ec(at)hotmail(dot)com ("Jaime Casanova") belched out:
> Can you tell me (or at least guide me to a palce where i can find the
> answer) what are the benefits of filesystems over raw devices?

For PostgreSQL, filesystems have the merit that you can actually use
them. PostgreSQL doesn't support use of "raw devices."

Two major benefits of using filesystems as opposed to raw devices are
that:

a) The use of raw devices is dramatically non-portable; you have to
reimplement data access on every platform you are trying to
support;

b) The use of raw devices essentially mandates that you implement
some form of generic filesystem on top of them, which adds
considerable complexity to your code.

Two benefits to raw devices are claimed...

c) It's faster. But that assumes that the "cooked" filesystems are
implemented fairly badly. That was typically true, a dozen
years ago, but it isn't so typical now, particularly with a
fancy cacheing controller.

d) It guarantees application control of update ordering. Of course,
with a cacheing controller, or disk drives that lie to one degree
or another, those guarantees might be gone anyways.

There are other filesystem advantages, such as

e) Shifting "cooked" data around may be as simple as a "mv," whereas
reorganizing on raw disk requires DB-specific tools...

> And what filesystem is the best for postgresql performance?

That would depend, assortedly, on what OS you are using, what kind of
hardware you are running on, what kind of usage patterns you have, as
well as on how you define the notion of "best."

Absent of any indication of any of those things, the best that can be
said is "that depends..."
--
(format nil "~S(at)~S" "cbbrowne" "acm.org")
http://cbbrowne.com/info/languages.html
TTY Message from The-XGP at MIT-AI:
The-XGP(at)AI 02/59/69 02:59:69
Your XGP output is startling.