[Samba] sync always, strict sync, cache question

Chris Fanning christopher.fanning at gmail.com
Wed Sep 17 21:37:26 GMT 2008

On Wed, Sep 17, 2008 at 2:38 AM, Jeremy Allison <jra at samba.org> wrote:
> On Tue, Sep 16, 2008 at 09:51:33AM -0700, Eric Roseme wrote:
>> ---------------------------------------------------------------
>> Samba defaults to asynchronous writes.  smbd writes to memory buffer,
>> then returns to processing.  Buffer is flushed to disk later. This is
>> the most efficient behavior.
>> Windows CreateFile API has the FILE_FLAG_WRITE_THROUGH flag, which
>> requests synchronous writes.  smbd writes to memory buffer, blocks until
>> buffer contents are written to disk, which results in poor performance,
>> but better data integrity.
>> When "strict sync = yes" (default = no) Samba honors the
>> FILE_FLAG_WRITE_THROUGH flag, and results in synchronous writes when
>> called by the CreateFile API.
>> When "sync always = yes" (default = no) Samba executes all writes
>> synchronously. This requires that "strict sync = yes".
>> StrictSync  SyncAlways  ff_write_through   Sync-Writes
>>     no          no             no                no
>>     yes         no             no                no
>>     yes         no             yes               Yes (slow)
>>     no          yes            yes               no
>>     yes         yes            yes/no            yes (very slow)
>> Eric Roseme
> Great summation Eric, nothing has changed since then so
> it's still accurate !
> Thanks,
>        Jeremy.

Thank you both for the professional reply.
Unfortunately, you have confirmed my suspicions. :)

I think I'll head back to NFS and give it another try. They too on the
list are very helpful.

Viva GNU!

More information about the samba mailing list