Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 27 Oct 1999 23:02:01 -0400 (EDT)
From:      Trevor Johnson <trevor@jpj.net>
To:        questions@FreeBSD.ORG
Subject:   Re: why FFS is THAT slower than EXT2 ? 
Message-ID:  <Pine.BSI.3.95.991027210142.17462B-100000@blues.jpj.net>
In-Reply-To: <199910272148.QAA10727@chiba.3jane.net>

next in thread | previous in thread | raw e-mail | index | archive | help
I'm not using soft updates, and I didn't have the "sync" option in
/etc/fstab because I, from the warning about the "async" flag in the
mount(8) man page, I assumed synchronous writes were the default:

$ cat /etc/fstab
# Device                Mountpoint      FStype  Options         Dump	Pass#
/dev/wd0s1b             none            swap    sw              0       0
/dev/wd0s1a             /               ufs     rw              1       1
/dev/wd0s1f             /usr            ufs     rw              2       2
/dev/wd0s1e             /var            ufs     rw              2       2
/dev/wd2c               /usr/ports      ufs     rw              2       2
proc                    /proc           procfs  rw              0       0

When I ran "mount" with no options, I was surprised to see it mention
asynchronous writes:

$ mount
/dev/wd0s1a on / (local, writes: sync 15 async 64)
/dev/wd0s1f on /usr (local, writes: sync 16 async 202)
/dev/wd0s1e on /var (local, writes: sync 132 async 197)
/dev/wd2c on /usr/ports (local, writes: sync 2 async 6)
procfs on /proc (local)

I added the "sync" option to /etc/fstab:

myname:/$ cat /etc/fstab
# Device                Mountpoint      FStype  Options         Dump
Pass#
/dev/wd0s1b             none            swap    sw              0       0
/dev/wd0s1a             /               ufs     rw,sync         1       1
/dev/wd0s1f             /usr            ufs     rw,sync         2       2
/dev/wd0s1e             /var            ufs     rw,sync         2       2
/dev/wd2c               /usr/ports      ufs     rw,sync         2       2
proc                    /proc           procfs  rw              0       0

I rebooted with the new fstab, and now "mount" tells me my filesystems are
mounted synchronously, but still says there are asynchronous writes:

$ mount
/dev/wd0s1a on / (local, synchronous, writes: sync 617 async 317)
/dev/wd0s1f on /usr (local, synchronous, writes: sync 1338 async 435)
/dev/wd0s1e on /var (local, synchronous, writes: sync 770 async 215) 
/dev/wd2c on /usr/ports (local, synchronous, writes: sync 3359 async 1088)
procfs on /proc (local)

The difference in the "mount" output seems to suggest that initially the
filesystems weren't mounted synchronously, and that even when they are,
some information is still written asynchronously.  Is that the case?  If
so, what is the default and how can I change it?  I have a
3.3-19990924-STABLE kernel and 3.3-19990904 userland. 

BTW, here are a couple of sections from the Linux mount(8) page:

              defaults
                     Use  default  options:  rw, suid, dev, exec,
                     auto, nouser, and async.
[...]
       Some Linux file systems don't support -o sync (the  ext2fs
       does  support  synchronous updates (a la BSD) when mounted
       with the sync option).
__
Trevor Johnson



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSI.3.95.991027210142.17462B-100000>