Re: PostgreSQL over NFS?

Поиск
Список
Период
Сортировка
От Alfred Perlstein
Тема Re: PostgreSQL over NFS?
Дата
Msg-id 20010209155116.W26076@fw.wintelcom.net
обсуждение исходный текст
Ответ на Re: PostgreSQL over NFS?  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: PostgreSQL over NFS?  (Shaw Terwilliger <sterwill@sourcegear.com>)
Список pgsql-general
* Tom Lane <tgl@sss.pgh.pa.us> [010209 15:40] wrote:
> Shaw Terwilliger <sterwill@sourcegear.com> writes:
> > I have a client who wants to know how PostgreSQL (7) will perform over
> > NFS.  The NFS client is Solaris, the server is a big network storage=20
> > appliance.  The network is probably gigabit ethernet.
>
> > My first reaction is to tell them they're just crazy,
>
> I agree.
>
> Aside from the speed issues, there's a serious reliability problem;
> AFAIR, NFS doesn't guarantee very much about write ordering, which
> means a crash could leave you with corrupt data.

Actually NFS has very strong write ordering semantics, it just has
terrible cache coherency.  Meaning two machines accessing the same
file will most likely see different things if the file is updated
moderately.

For NFSv2 _all_ writes must be done syncronously.  For NFSv3 there's
a seperate commit RPC that needs to succeed before the local machine
returns from fsync.

There's also the issue that NFS requests are done async, meaning
that you won't get an error on write(2)/read(2) until close(2) I'm
not even sure if fsync(2) can or will return an error on an NFS
error, this can be disasterous for a database.  You can get around
that by not running any async nfs kernel threads on the client
(nfsiod under *BSD) however your performance will go to pot if you
disable the async NFS subsystem.

Even then there's probably more black magic that can cause wierd
things to happen.

> Seems a lot better to run the Postgres server on the machine where
> the storage is.

Agreed. :)

--
-Alfred Perlstein - [bright@wintelcom.net|alfred@freebsd.org]
"I have the heart of a child; I keep it in a jar on my desk."

В списке pgsql-general по дате отправления:

Предыдущее
От: "Steve Wolfe"
Дата:
Сообщение: Re: PostgreSQL over NFS?
Следующее
От: Shaw Terwilliger
Дата:
Сообщение: Re: PostgreSQL over NFS?