Maybe the best solution is the following:

- leave "sync" with its current behaviour
- create a sysctl to make it truely synchronous (I was thinking of a new
mount option but thats overkill) and have the documentation for that
sysctl state the performance hit and recommend that the filesystem be
mounted with "noatime" when this sysctl is on.

The sysctl could have three levels:

- off
- on for atime updates
- on for atime updates and free block bitmap updates

On Thu, 7 Oct 1999, Peter Jeremy wrote:

> On 1999-Oct-07 09:15:42 +1000, Matthew D. Fuller wrote:
> >Is this good, bad, ugly, or just inconsistent?  On the one hand, you can
> >argue that 'sync should be sync should be sync, I don't bloody care, just
> >don't do anything async at all', since that's what it's supposed to do:
> >mount(8):
> >      sync    All I/O to the file system should be done synchronously.
> 
> How detailed should the man page be?  If it stated "all file data will
> be written synchronously, but inodes where the only update is atime
> and free block bitmaps are written asynchronously", would that be any
> clearer to a user who didn't have a detailed understanding of UFS?
> If you would like it to say something different, write some patches
> and send them in as a PR (keeping in mind phk's recent e-mail about
> green bikesheds).
> 
> >  sync atime updates will slow it
> >down, but on the flip side, if you're mounting sync in the first place
> >you don't care much for speed anyway.
> 
> There should be fairly few writes to the root partition, so having
> these writes synchronous is not a big performance hit.  On the other
> hand, there are probably a _lot_ of read accesses to devices in /dev
> and files in /bin (how many of your scripts begin #!/bin/sh?).  Unless
> you specify NOATIME, each of these read accesses implies an atime
> update within the inode.  Making these synchronous probably would
> be a big performance hit.
> 
> Peter
> 

-- 
/=======================================================================\
| Work: [EMAIL PROTECTED] | Home: [EMAIL PROTECTED] |
\=======================================================================/
"If it is true that our Universe has a zero net value for all conserved
quantities, then it may simply be a fluctuation of the vacuum of some
larger space in which our Universe is imbedded. In answer to the
question of why it happened, I offer the modest proposal that our
Universe is simply one of those things which happen from time to time."
 E. P. Tryon   from "Nature" Vol.246 Dec.14, 1973



To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message

Reply via email to