More performance optimizations for 3.2.0, this time optimizing startup time

Andreas Ericsson ae at op5.se
Thu Jan 28 10:36:45 CET 2010


On 01/28/2010 09:49 AM, Ton Voon wrote:
> Hi Jonathan,
> 
> On 28 Jan 2010, at 02:28, Kamens, Jonathan wrote:
> 
>> See the attached patch, nagios-3.2.0-startup-speed.patch, which 
>> optimizes startup time. It requires the patch I sent last month. I've 
>> also attached and updated version of that patch which has some bug 
>> fixes in it. Enjoy!
> 
> Thanks. I've noticed this too for comments and downtimes.
> 
> I'm wondering if there is a better way of doing this. Rather than each 
> caller having to work out the next comment id value and making sure it 
> is still unique, I think the next_comment_id should be manipulated 
> within xrddefault.c instead. If you call add_new_comment with a 
> comment_id of 0, it uses next_comment_id and ensures it gets incremented.
> 
> I guess on the initial load of retention.dat you have to validate that 
> the next_comment_id is unique, but you shouldn't have to after that.
> 
> Can you extend the tests in t-tap/ to time the performance increase?
> 
> So I'm thinking that the patch needs a bit more work to be applied.
> 

Seconded. The API should take care of making sure comment id's are
unique and incremental. In fact, passing a comment id to the API at
all is, to me, totally superfluous and counterproductive.

-- 
Andreas Ericsson                   andreas.ericsson at op5.se
OP5 AB                             www.op5.se
Tel: +46 8-230225                  Fax: +46 8-230231

Considering the successes of the wars on alcohol, poverty, drugs and
terror, I think we should give some serious thought to declaring war
on peace.

------------------------------------------------------------------------------
The Planet: dedicated and managed hosting, cloud storage, colocation
Stay online with enterprise data centers and the best network in the business
Choose flexible plans and management services without long-term contracts
Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com




More information about the Developers mailing list