Re: Fwd: Is the fsync() fake on FreeBSD6.1?

From: mark(at)mark(dot)mielke(dot)cc
To: Jim Nasby <jim(at)nasby(dot)net>
Cc: PostgreSQL-development hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Fwd: Is the fsync() fake on FreeBSD6.1?
Date: 2006-09-22 19:00:30
Message-ID: 20060922190029.GA16083@mark.mielke.cc
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, Sep 22, 2006 at 01:52:02PM -0400, Jim Nasby wrote:
> I thought folks might be interested in this... note in particular the
> comment about linux.
...
> >From: Greg 'groggy' Lehey <grog(at)FreeBSD(dot)org>
> >Date: June 26, 2006 11:34:12 PM EDT
> >To: leo huang <leo(dot)huang(dot)list(at)gmail(dot)com>
> >Cc: freebsd-performance(at)freebsd(dot)org
> >Subject: Re: Is the fsync() fake on FreeBSD6.1?
> >...
> >My understanding from the last time I looked at the code was that
> >fsync does the right thing:
> >
> > The fsync() system call causes all modified data and
> >attributes of fd to
> > be moved to a permanent storage device. This normally results
> >in all in-
> > core modified copies of buffers for the associated file to be
> >written to
> > a disk.
> >
> >This is not the case for Linux, where fsync syncs the entire file
> >system. That could explain some of the performance difference, but
> >not all of it. I suppose it's worth noting that, in general, people
> >report much better performance with MySQL on Linux than on FreeBSD.

I see Greg's comment as contradictory. People see better performance with
MySQL on Linux than on FreeBSD, fsync() on Linux syncs the whole file
system?

I don't believe that fsync() on Linux syncs the whole file system
either. This sounds made up, or a confusion with 'sync'. Perhaps
people @FreeBSD.org are not as familiar with Linux.

Cheers,
mark

--
mark(at)mielke(dot)cc / markm(at)ncf(dot)ca / markm(at)nortel(dot)com __________________________
. . _ ._ . . .__ . . ._. .__ . . . .__ | Neighbourhood Coder
|\/| |_| |_| |/ |_ |\/| | |_ | |/ |_ |
| | | | | \ | \ |__ . | | .|. |__ |__ | \ |__ | Ottawa, Ontario, Canada

One ring to rule them all, one ring to find them, one ring to bring them all
and in the darkness bind them...

http://mark.mielke.cc/

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2006-09-22 19:02:08 Re: advisory locks and permissions
Previous Message Andrew Dunstan 2006-09-22 19:00:13 Re: Release Notes: Major Changes in 8.2