[Nagios-devel] Feedback on Nagios

Al Tobey albert.tobey at priority-health.com
Sat Dec 13 16:28:04 UTC 2003


> >Perl really isn't a great idea for plugins that get executed frequently; 
> >it's just too large of a process.  I've head that using perlcc improves 
> >matters as well.
> >  
> >
> Perl is expensive to start up, but I find it a darn good prototyping 
> tool :)  I was hoping the
> embedded perl would help matters (which it does a fair bit) but I have 
> not tried perlcc for
> the plugins.  My intention is to take the lessons from the perl 
> prototypes and implement
> in C as I discussed at the bottom of the original email.

Actually, I'd expect that using perlcc would make performance worse in
most cases.  perlcc's documentation states this.  Perl plugins running
in the embedded interpreter should be as fast or possibly faster than
compiled apps.  This is because the plugin is already "hot" in memory
and just has to be kicked off.  This is definitely the case with
mod_perl vs. CGI written in C, and probably is with Nagios, although I
haven't benchmarked it (yet).

There are a few things worth looking at to improve your perl
performance:
 * is your perl compiled with the native compiler for the
architecture/OS?
 * perl compiled with -Dusethreads or 5005threads is going to be slower
in all cases than a perl without those features.
 * is your perl compiled with the native malloc() or with perl's
malloc()?  Look at README.solaris in the perl source tree.

Many of the plugins I use are written in perl and man never be rewritten
in C, because they're darn near as fast or faster in the embedded
interpreter and are much easier to maintain and extend.

-Al Tobey





** ** **  PRIVILEGED AND CONFIDENTIAL  ** ** **
This email transmission contains privileged and confidential information 
intended only for the use of the individual or entity named above.  Any 
unauthorized review, use, disclosure or distribution is prohibited and 
may be a violation of law.  If you are not the intended recipient or a 
person responsible for delivering this message to an intended recipient, 
please delete the email and immediately notify the sender via the email 
return address or mailto:postmaster at priority-health.com.  Thank you.





More information about the Nagios-devel mailing list