Page 1 of 1

multi-threading avail.cgi

Posted: Tue Apr 16, 2019 6:45 am
by IkaIka
Hello! I've ran into a performance problem when generating SLA reports. Generating a yearly report takes hours to complete, and during that time Nagios just locks up for me (other users don't experience any problems). I looked up the server's CPU usage and whenever a report is being generated, a process called avail.cgi is eating up a single CPU core. Is there a way to allow it to use more than one core to speed up the process?

Re: multi-threading avail.cgi

Posted: Tue Apr 16, 2019 9:52 am
by mcapra
It has been discussed multiple times in the past that those reporting CGIs are getting major refactors with Nagios Core 5 (performance issues being well known), though I don't see that on the roadmap anywhere currently:
https://www.nagios.com/roadmaps/

Relevant GitHub issues:
https://github.com/NagiosEnterprises/na ... issues/280
https://github.com/NagiosEnterprises/na ... issues/409

Re: multi-threading avail.cgi

Posted: Tue Apr 16, 2019 11:24 am
by benjaminsmith
Hi @IkaIka,

Thanks @mcapra. One more thing, we are planning to add a new report management system in Nagios XI 6 that will allow backend report generation without affecting other users while generating and saving reports.

In the meantime, you may want to create reports over smaller time intervals to reduce the time required. You can also increase the memory limit settings in your php.ini file. However, issues with availability reports are mostly related to disk i/o as the script needs to parse the log files to generate the report.

Let me know if any other questions.

Re: multi-threading avail.cgi

Posted: Wed Apr 17, 2019 2:45 am
by IkaIka
Thank you for your kind replies @mcapra and @benjaminsmith. I don't think changing memory limits would do much good in my case, as the bottleneck clearly is the single CPU thread. If it cannot be multi-threaded, I will have to just wait for the refactors you mentioned.

Thanks again, this answers my questions.

Re: multi-threading avail.cgi

Posted: Wed Apr 17, 2019 10:36 am
by benjaminsmith
Hi @IkaIka
Thanks again, this answers my questions.
Your welcome. I'll close this thread. Thank you for using Nagios.