[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: (S)ATA performance in FBSD 6.2/7.0



On Mon, 5 Mar 2007, dima wrote:

I think you're quite OK with dd. I do believe you'll get a comparable results for cp setting "noatime" option in mount(8)s. As you were told, the default mount mode is noasync which is "synchronous metadata + asynchronous data". But FreeBSD still updates metadata for atime on every file read.

No.  Atime updates are always async (strictly, delayed).  It is another
bug in mount.8 and in many mails in this thread to claim that !noasync
gives sync for all metadata or that sync gives sync for metadata.  The
async and sync flags have no effect on syncing atime updates.

Similarly for updates of all times set by utimes(2).  This might be a
bug in the sync mount and O_FSYNC cases.  fsync(2) on the file after
the utimes(2) will update the metadata (to the disk), but O_FSYNC
doesn't make this happen automatically.  4.4BSD-Lite1 gets this wrong
in the opposite way, by always doing a sync update for times set by
utimes(2).  This was changed in 4.4BSD-Lite2 and misimported into
FreeBSD in rev.1.79 of ufs_vnops.c by splatting Lite2 changes onto the
non-vendor branch and not documenting them.

Similarly except for history for the more critical updates of metadata
changed by chown(2), chmod(2), chflags(2) and perhaps others.  These
updates were always done only to the in-core inode and any syncing to
the disk was accidental.  The syncing for utimes(2) is just an accident
that always happened immediately.  It was silly to sync relatively
unimportant changes to times while not syncing changes to permissions.

2all: Are there any reasons not to make noasync the default mount option? It greatly improves FS performance and I don't think many modern administrators do care about access times of their files (assuming how many files a modern box has).

I think you mean noatime.  It is required by POSIX and POLA.

noatime has an especially tiny effect on large copies.  The atime updates
get written to disk every 30 seconds or so, one for every GB or so of data.
noatime makes a difference mainly for tree walks where looking in lots of
directories clobbers their atimes.

Bruce
_______________________________________________
freebsd-performance_(_at_)_freebsd_(_dot_)_org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-performance
To unsubscribe, send any mail to "freebsd-performance-unsubscribe_(_at_)_freebsd_(_dot_)_org"


Visit your host, monkey.org