[Info-vax] Anyone interested in another public access system

Bill Gunshannon billg999 at cs.uofs.edu
Tue Apr 14 12:00:44 EDT 2009


In article <DEe9T8mdQMyl at eisner.encompasserve.org>,
	koehler at eisner.nospam.encompasserve.org (Bob Koehler) writes:
> In article <176uZD2KcidF-pn2-dw0bdCBZV4ZE at rikki.tavi.co.uk>, "Bob Eager" <rde42 at spamcop.net> writes:
>> 
>> I agree with all of the above. But it does certainly affect performance.
>> I am willing to accept the lower performance in exchange for 
>> reliability.
> 
>    You have a choice.  On VMS in most HLL you can set the value of
>    buffering when you open the file.  Use more if you want speed and
>    less if you want reliability.  On UNIX you can force buffer flushes
>    by calling sync()/fsync().  Use fewer if you want speed and more if
>    you want reliability.

Why do you continue to do this.  That is just plain wrong.

There is more than one way to have "a sync filesystem" on Unix.  The
SA can mount the system with the "sync" option thus forcing sync as 
the default for everyone.  This, of course, has overhead.  

You can also do as you said and call sync() as often as you want.  This
is fine if you only have one application for which constantly syncing
writes is important.

Or, you could just use O_FSYNC as one of the flags in your open()
statement which will result in:
   "If O_FSYNC is used in the mask, all writes will immediately
    be written to disk, the kernel will not cache written data
    and all writes on the descriptor will not return until the
    data to be written completes."
 
bill

-- 
Bill Gunshannon          |  de-moc-ra-cy (di mok' ra see) n.  Three wolves
billg999 at cs.scranton.edu |  and a sheep voting on what's for dinner.
University of Scranton   |
Scranton, Pennsylvania   |         #include <std.disclaimer.h>   



More information about the Info-vax mailing list