On 12/18/2012 09:29 AM, Samuel Kidman wrote: > Hello > > I just had a look at Ethan's slide decks on Nagios 4 from 2012 Nagios > Conference, and found out that embedded perl won't be in Nagios 4. > I'm running a distributed Nagios deployment that makes extensive use > of perl plugins, and the performance of my Nagios servers is > beginning to struggle a bit as a result. I was working on making my > plugins work with embedded perl but since this is now not an option I > was wondering what others will be doing to optimise perl plugins > without embedded perl? >
For starters, you should just upgrade and it's entirely possible that the performance issues go away completely. Nagios 4 has awesome check scaling. The second thing to do would be to look into running mod_gearman with workers living on the same server as the master Nagios process. mod_gearman still has embedded perl support (although it really only makes a difference for "large" plugins). The third thing to do would be to inspect your most "expensive" plugins (expensive in terms of Perl loadtime multiplied by the number of times the plugin is used for any given time interval) and see if rewriting them in a different language makes a huge difference. We did that for the snmp interface checks when one of our large customers wanted to monitor some 60000 services. Perl simply wasn't fast enough. Embedding it meant we couldn't fork() fast enough (embedding languages has its own overhead too), and it still leaked memory, so we rewrote them in C and we cut system load by more than 85%. The fourth thing to do would be to either sponsor a developer or buy development time to build a special-purpose Nagios worker that handles perl checks and that has a perl interpreter and a cache embedded. It's not certain that would be better than just running the perl interpreter directly. Without a cache, embedded perl is completely useless, since it still has to bytecompile all the modules, and with it it can grow to consume all memory on the system, no matter how carefully you write your plugins. Tradeoffs, compromises and possible leaks no matter what you do if you start down that route. It might be awesome though, so I guess it could be worth a shot. -- Andreas Ericsson andreas.erics...@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. ------------------------------------------------------------------------------ LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial Remotely access PCs and mobile devices and provide instant support Improve your efficiency, and focus on delivering more value-add services Discover what IT Professionals Know. Rescue delivers http://p.sf.net/sfu/logmein_12329d2d _______________________________________________ Nagios-users mailing list Nagios-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/nagios-users ::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. ::: Messages without supporting info will risk being sent to /dev/null