<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8">
<META NAME="Generator" CONTENT="MS Exchange Server version 5.5.2658.24">
<TITLE>RE : [Nagios-devel] Patch submission for comments : CGI speed improvement (XNG)</TITLE>
</HEAD>
<BODY>

<P><FONT SIZE=2>Hi,</FONT>
</P>

<P><FONT SIZE=2>Thanks for your interest. I started to rewrite the code of this patch because it is much too sensible to the way the compiler aligns its data structures. I didn't try it on Linux but I tried it with several optimize options (gcc) on Solaris and it proves that incrementing pointers in structs is not reliable.</FONT></P>

<P><FONT SIZE=2>I started rewriting the code with two dedicated serialize & unserialize functions for each data structure, but I didn't have enough time to complete it, and I won't be available to work on it until the end of August.</FONT></P>

<P><FONT SIZE=2>Regards</FONT>
</P>

<P><FONT SIZE=2>François</FONT>
</P>

<P><FONT SIZE=2>> -----Original Message-----</FONT>
<BR><FONT SIZE=2>> From: Andre Bergei [<A HREF="mailto:andre.bergei@ementor.no">mailto:andre.bergei@ementor.no</A>] </FONT>
<BR><FONT SIZE=2>> Sent: Wednesday, July 20, 2005 11:55 PM</FONT>
<BR><FONT SIZE=2>> To: Laupretre, François (CALYON); nagios-devel@lists.sourceforge.net</FONT>
<BR><FONT SIZE=2>> Subject: RE: [Nagios-devel] Patch submission for comments : </FONT>
<BR><FONT SIZE=2>> CGI speed improvement (XNG)</FONT>
<BR><FONT SIZE=2>> </FONT>
<BR><FONT SIZE=2>> </FONT>
<BR><FONT SIZE=2>> >     Now, the next step is to see if you find it interesting </FONT>
<BR><FONT SIZE=2>> enough to </FONT>
<BR><FONT SIZE=2>> >include it in a future version of</FONT>
<BR><FONT SIZE=2>> >nagios. If you test it, please let me know how much </FONT>
<BR><FONT SIZE=2>> improvement it brings in your case.</FONT>
<BR><FONT SIZE=2>> ></FONT>
<BR><FONT SIZE=2>> >     Installing :</FONT>
<BR><FONT SIZE=2>> ></FONT>
<BR><FONT SIZE=2>> >     The reference version for this patch is the 2.0b3 (I </FONT>
<BR><FONT SIZE=2>> will do it for </FONT>
<BR><FONT SIZE=2>> >the CVS version if needed). The file >names it uses are not </FONT>
<BR><FONT SIZE=2>> read in configuration file yet. They must be set manually in </FONT>
<BR><FONT SIZE=2>> xdata/xsdng.c and</FONT>
<BR><FONT SIZE=2>> >xdata/xodng.c, as XSDNG_DUMP_FILE and XODNG_DUMP_FILE. In a </FONT>
<BR><FONT SIZE=2>> future version, the names can be derived from the </FONT>
<BR><FONT SIZE=2>> >'status_file' and 'object_cache_file' config vars, or there </FONT>
<BR><FONT SIZE=2>> can be two new config vars for them, TBD.</FONT>
<BR><FONT SIZE=2>> ></FONT>
<BR><FONT SIZE=2>> >     Regards</FONT>
<BR><FONT SIZE=2>> ></FONT>
<BR><FONT SIZE=2>> >     Fran篩s</FONT>
<BR><FONT SIZE=2>> </FONT>
<BR><FONT SIZE=2>> Hi.</FONT>
<BR><FONT SIZE=2>> </FONT>
<BR><FONT SIZE=2>> I decided to test this patch in my test enviroment against my </FONT>
<BR><FONT SIZE=2>> configuration with 3000 hosts and 30000 services, but after </FONT>
<BR><FONT SIZE=2>> patching nagios segfaults with</FONT>
<BR><FONT SIZE=2>> </FONT>
<BR><FONT SIZE=2>> -snip</FONT>
<BR><FONT SIZE=2>> Starting network monitor: nagios</FONT>
<BR><FONT SIZE=2>> /etc/init.d/nagios: line 185:  4257 Segmentation fault      $NagiosBin</FONT>
<BR><FONT SIZE=2>> -v $NagiosCfgFile >/dev/null 2>&1</FONT>
<BR><FONT SIZE=2>> CONFIG ERROR!  Start aborted.  Check your Nagios configuration. -snip</FONT>
<BR><FONT SIZE=2>> </FONT>
<BR><FONT SIZE=2>> Of course, my configuration works with clean nagios 2.0 code.</FONT>
<BR><FONT SIZE=2>> </FONT>
<BR><FONT SIZE=2>> Here is my steps</FONT>
<BR><FONT SIZE=2>> </FONT>
<BR><FONT SIZE=2>> I downloaded nagios2b3</FONT>
<BR><FONT SIZE=2>> I patched it with: cat nagios_xng_patch_1.0 | patch -p1 </FONT>
<BR><FONT SIZE=2>> ./configure prefix=/opt/nagios/ Make all (no errors) Make </FONT>
<BR><FONT SIZE=2>> install (no errors)</FONT>
<BR><FONT SIZE=2>>  </FONT>
<BR><FONT SIZE=2>> My system is a 2x3Ghz Xeon on Debian Sarge with GCC 3.3.5 </FONT>
<BR><FONT SIZE=2>> Attached is a strace dump of the nagios execution.</FONT>
<BR><FONT SIZE=2>> </FONT>
<BR><FONT SIZE=2>> </FONT>
<BR><FONT SIZE=2>> </FONT>
<BR><FONT SIZE=2>> cheers</FONT>
<BR><FONT SIZE=2>> Andrè Bergei</FONT>
<BR><FONT SIZE=2>> </FONT>
</P>

</BODY>
</HTML>