<html dir="ltr"><head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style title="owaParaStyle"><!--P {
        MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px
}
--></style>
</head>
<body ocsi="x">
<p>I have one question and one observation in addition to what I already said....<br>
</p>
<p><font face="times new roman">Question:</font><br>
In the case of the web server and nagios being on the same system, how much is an fsync() really going affect the performance of the system? Can someone "quantify" the impact of a single fsync? (I guess that is technically a second question.) If it were to
 do a sync() (where all the open files are checked to ensure that they are sync'd) instead of an fsync(), I would definitely agree - much bigger impact. But, the single fsync at the end of writing a file should not be of any real significance, except in the
 case where it means that the data is actually there where it should be if it *is* done (e.g. my case).</p>
<p><font face="times new roman"></font> </p>
<p><font face="times new roman">Observation:</font></p>
<p><font face="times new roman">I think that the retention.dat and other files that are important to retain across crashes would definitely benefit from the fsync. Though nagios would still work across such a failure, I would rather that data be preserved properly,
 especially when we have a retention.dat file that is 40MB and the rescheduling, etc. would be handled so much more effectively. So for what it is worth, I think it important that those files be fsync'd.</font></p>
<p><font face="times new roman"></font> </p>
<p><font face="times new roman">Thanks.</font></p>
<p><br>
Cary</p>
<p><font face="times new roman"></font><br>
________________________________________<br>
From: Andreas Ericsson [ae@op5.se]<br>
Sent: Friday, August 07, 2009 2:30 AM<br>
To: Nagios Developers List<br>
Subject: Re: [Nagios-devel] Possible patch to cure CGI's not finding data for objects in status.dat<br>
<br>
Cary Petterborg wrote:<br>
> In response to your request for details of our system: We are running<br>
> SuSE 9 writing to a Rieser FS (with a separate web server reading the<br>
> status.dat, etc. from an NFS mount off the main Nagios server). Our<br>
> status.dat file is 37MB, and objects.cache is 32MB. If you need more<br>
> details than this, please let me know what you need.<br>
><br>
<br>
I blame NFS. Don't use it for sync()-sensitive data, as caching happens<br>
on multiple levels. The patch hurts the normal case (webserver on same<br>
system as Nagios) though, so I'd prefer if it wasn't applied.<br>
<br>
><br>
> I may be wrong in this next information, but I did homework on it<br>
> before proceeding to try to implment the fix on our system, and I'm<br>
> taking the information from what I found. The fsync() call is the<br>
> more important function call in the fix. fclose() almost always<br>
> guarantees fflush(), but it doesn't guarantee that it will be written<br>
> to the disk immediately, especially if the program doesn't exit.<br>
<br>
It doesn't have to be written to disk. After the fclose() the kernel<br>
will cache the data so the next reader will still see the full file<br>
contents no matter if it's actually committed to disk or not.<br>
fsync() and fflush() are primarily meant to make sure data stays<br>
intact across power outages.<br>
<br>
NFS breaks this sometimes. CIFS is a better option, I think.<br>
What happens if you use a webserver on the same host?<br>
What happens if you use CIFS instead of NFS?<br>
<br>
--<br>
Andreas Ericsson                   andreas.ericsson@op5.se<br>
OP5 AB                             www.op5.se<br>
Tel: +46 8-230225                  Fax: +46 8-230231<br>
<br>
Considering the successes of the wars on alcohol, poverty, drugs and<br>
terror, I think we should give some serious thought to declaring war<br>
on peace.<br>
<br>
------------------------------------------------------------------------------<br>
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day<br>
trial. Simplify your report design, integration and deployment - and focus on<br>
what you do best, core application coding. Discover what's new with<br>
Crystal Reports now.  http://p.sf.net/sfu/bobj-july<br>
_______________________________________________<br>
Nagios-devel mailing list<br>
Nagios-devel@lists.sourceforge.net<br>
https://lists.sourceforge.net/lists/listinfo/nagios-devel</p>

<DIV>
<p class=MsoNormal><span style='font-size:7.0pt';font-family:'"Helvetica","Tahoma","Arial","sans-serif"'><font color="#666666"><br><br> NOTICE: This email message is for the sole use of the intended recipient(s) and may contain confidential and privileged information. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply email and destroy all copies of the original message.</span><o:p></o:p></span></p>
</DIV></body>
</html>