Re: POSIX file updates

From: Andreas Kostyrka <andreas(at)kostyrka(dot)org>
To: James Mansion <james(at)mansionfamily(dot)plus(dot)com>
Cc: Greg Smith <gsmith(at)gregsmith(dot)com>, pgsql-performance(at)postgresql(dot)org
Subject: Re: POSIX file updates
Date: 2008-04-02 20:24:12
Message-ID: 1207167852.8299.179.camel@localhost
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance


Am Mittwoch, den 02.04.2008, 20:10 +0100 schrieb James Mansion:
> It strikes me as odd that fsync_writethrough isn't the most preferred
> option where
> it is implemented. The postgres approach of *requiring* that there be no
> cache
> below the OS is problematic, especially since the battery backup on internal
> array controllers is hardly the handiest solution when you find the mobo
> has died.

Well, that might sound brutal, but I'm having today a brute day.

There are some items here.

1.) PostgreSQL relies on filesystem semantics. Which might be better or
worse then the raw devices other RDBMS use as an interface, but in the
end it is just an interface. How well that works out depends strongly on
your hardware selection, your OS selection and so on. DB tuning is an
scientific art form ;) Worse the fact that raw devices work better on
hardware X/os Y than say filesystems is only of limited interest, only
if you happen to have already an investement in X or Y. In the end the
questions are is the performance good enough, is the data safety good
enough, and at which cost (in money, work, ...).

2.) data safety requirements vary strongly. In many (if not most) cases,
the recovery of the data on a failed hardware is not critical. Hint:
being down till somebody figures out what failed, if the rest of the
system is still stable, and so on are not acceptable at all. Meaning the
moment that the database server has any problem, one of the hot standbys
takes over. The thing you worry about is if all data has made it to the
replication servers, not if some data might get lost in the hardware
cache of a controller. (Actually, talk to your local computer forensics
guru, there are a number of way to keep the current to electronics while
moving them.)

3.) a controller cache is an issue if you have a filesystem in your data
path or not. If you do raw io, and the stupid hardware do cache writes,
well it's about as stupid as it would be if it would have cached
filesystem writes.

Andreas

> And especially when the inability to flush caches on modern SATA and SAS
> drives would appear to be more a failing in some operating systems than in
> the drives themselves..
>
> The links I've been accumulating into my bibliography include:
>
> http://www.h2database.com/html/advanced.html#transaction_isolation
> http://lwn.net/Articles/270891/
> http://article.gmane.org/gmane.linux.kernel/646040
> http://lists.apple.com/archives/darwin-dev/2005/Feb/msg00072.html
> http://brad.livejournal.com/2116715.html
>
> And your handy document on wal tuning, of course.
>
> James
>
>

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message James Mansion 2008-04-02 22:48:52 Re: POSIX file updates
Previous Message James Mansion 2008-04-02 19:19:54 Re: Performance Implications of Using Exceptions