[Gluster-users] Small File and "ls" performance ..

Mark Mielke mark at mark.mielke.cc
Mon Jun 7 15:45:59 UTC 2010


On 06/07/2010 11:28 AM, Barry Jaspan wrote:
>> When flush-behind is on, the flush/close is indeed done in the
>> background, but only after the last write has returned. Applications
>> will _not_ miss the error of previous writes in close().
>>      
>
> If write() succeeds, is it not possible for flush() or close() to fail
> later? My understanding is you need to check for errors from both. For
> example, write() might just write to an in-memory buffer, then the disk
> might fill up before the change is flushed out.
>    

Most file systems feature undetectable problems at close() time. I think 
"out of disk space" is one of the few that can be detected, and would 
normally be caught during write() and not close().

If the OS is buffering without allocation, even close() would probably 
not detect errors. close() doesn't make guarantees about safety of the 
data to the underlying storage...

Undetectable errors is a serious concern, but so is performance. 
Compromises are always made. Applications that care, need to use fsync() 
or O_SYNC. All other applications only mostly work in the case of 
unexpected problems...

Cheers,
mark

-- 
Mark Mielke<mark at mielke.cc>




More information about the Gluster-users mailing list