Possible patch to cure CGI's not finding data for objects in status.dat

Hiren Patel hir3npatel at gmail.com
Mon Aug 10 11:20:04 CEST 2009


Andreas Ericsson wrote:
>>>
>>>  
>>
>> I tried a program which I meant to attach to this mail that I deleted 
>> by mistake as I was composing this mail, that fopen'd a file, wrote a 
>> character at a time and either fclosed at the end, or fsync'd after 
>> each character, or sync'd after each character. it wrote 1MB worth of 
>> characters to the file.
>>
> 
> Ahmm... That's not really such a great test, tbh. Try the write throughput
> with a testing tool for it and then divide the size of the file to be
> synced with the actual write speed of the disk and you'll get something
> rather close to the cost of a single fsync call for a particular file.
> 

ah okay, thanks for the reply, I enjoy reading replies from experienced 
folk, I learn from them.

>>
>> not sure how useful this really is to get an idea, but sync is clearly 
>> to be avoided as you mentioned. what do you guys make of the 
>> difference between fsync and no fsync in relation to nagios?
>>
> 
> fsync() isn't needed when using a sane file system. When using an insane
> one, there are no guarantees that fsync() works anyway, so why use it?
> 

it's not needed on a sane filesystem because another process trying to 
read a file not completely sync'd will still see the latest content?
agree about the NFS issue, read a little about it's problems, and if 
fsync isn't going to solve its problems, I see your point about not 
using it.

if I'm not mistaken this patch was committed already? was there a reason 
it was so easily accepted?

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july




More information about the Developers mailing list