Page 2 of 4
Re: Host Detail Page - High CPU usage
Posted: Tue Jul 21, 2015 11:11 am
by tgriep
Try some of the settings in this document to increase the system performance to see if the CPU usage drops for you.
https://assets.nagios.com/downloads/nag ... ios-XI.pdf
Re: Host Detail Page - High CPU usage
Posted: Fri Jul 24, 2015 10:51 am
by TBT
Is it really an issue of PHP optimization though. Service Details page provides more information than the Host Details page, why do our Service Details with 1000 per page load in 6 seconds and the Host Details with 1000 per page load in 45-60 seconds?
Also, you have 1000 hosts loading within 6 seconds. We have 462 hosts loading in 45-60 seconds, that's quite the discrepancy, what's different....
Re: Host Detail Page - High CPU usage
Posted: Fri Jul 24, 2015 1:29 pm
by jdalrymple
TBT wrote:No errors in /var/log/httpd/ssl_error_log
I'm surprised you're not getting any php errors. Are you sure that you're looking in the right file?
Also, how does your /var/log/mysqld.log look? Any errors there that might be slowing things up?
I have an XI server on a 1 core 1GB CentOS machine with 2500 hosts, loads 1000 hosts into the host detail page in 6.61 seconds. Not bragging, just agreeing that something is wrong with yours.
Re: Host Detail Page - High CPU usage
Posted: Fri Jul 24, 2015 1:42 pm
by TBT
jdalrymple wrote:TBT wrote:No errors in /var/log/httpd/ssl_error_log
I'm surprised you're not getting any php errors. Are you sure that you're looking in the right file?
Also, how does your /var/log/mysqld.log look? Any errors there that might be slowing things up?
I have an XI server on a 1 core 1GB CentOS machine with 2500 hosts, loads 1000 hosts into the host detail page in 6.61 seconds. Not bragging, just agreeing that something is wrong with yours.
Since we're using SSL I've been paying attention to /var/log/httpd/ssl_error_log , however, more diligently watching logs I now see
/var/log/httpd/error_log has several errors stating:
Code: Select all
[Fri Jul 24 15:02:03 2015] [error] [client xxx.xxx.xxx.xxx] PHP Fatal error: Maximum execution time of 60 seconds exceeded in /usr/local/nagiosxi/html/includes/components/xicore/ajaxhelpers-hoststatus.inc.php on line 455, referer: https://domain.com/nagiosxi/includes/components/xicore/status.php?show=hosts
[Fri Jul 24 15:02:33 2015] [error] [client xxx.xxx.xxx.xxx] PHP Fatal error: Maximum execution time of 60 seconds exceeded in /usr/local/nagiosxi/html/includes/utilsx.inc.php on line 103, referer: https://domain.com/nagiosxi/includes/components/xicore/status.php?show=hosts
[Fri Jul 24 15:02:43 2015] [error] [client xxx.xxx.xxx.xxx] PHP Fatal error: Maximum execution time of 60 seconds exceeded in /usr/local/nagiosxi/html/includes/utils.inc.php on line 1262, referer: https://domain.com/nagiosxi/includes/components/xicore/status.php?show=hosts
[Fri Jul 24 15:03:08 2015] [error] [client xxx.xxx.xxx.xxx] PHP Fatal error: Maximum execution time of 60 seconds exceeded in /usr/local/nagiosxi/html/includes/utils-xmlstatus.inc.php on line 1087, referer: https://doamin.com/nagiosxi/includes/components/xicore/status.php?show=hosts
[Fri Jul 24 15:03:57 2015] [error] [client xxx.xxx.xxx.xxx] PHP Fatal error: Maximum execution time of 60 seconds exceeded in /usr/local/nagiosxi/html/includes/utilsx.inc.php on line 105, referer: https://domain.com/nagiosxi/includes/components/xicore/status.php?show=hosts
[Fri Jul 24 15:04:18 2015] [error] [client xxx.xxx.xxx.xxx] PHP Fatal error: Maximum execution time of 60 seconds exceeded in /usr/local/nagiosxi/html/includes/utilsx.inc.php on line 96, referer: https://domain.com/nagiosxi/includes/components/xicore/status.php?show=hosts
[Fri Jul 24 15:07:57 2015] [error] [client xxx.xxx.xxx.xxx] PHP Fatal error: Maximum execution time of 60 seconds exceeded in /usr/local/nagiosxi/html/includes/utils-status.inc.php on line 69, referer: https://domain.com/nagiosxi/includes/components/xicore/status.php?show=hosts
/var/log/mysqld.log
Code: Select all
121119 9:45:40 [Note] /usr/libexec/mysqld: ready for connections.
Version: '5.1.66' socket: '/var/lib/mysql/mysql.sock' port: 3306 Source distribution
121119 10:32:46 [Note] /usr/libexec/mysqld: Normal shutdown
121119 10:32:46 [Note] Event Scheduler: Purging the queue. 0 events
121119 10:32:46 InnoDB: Starting shutdown...
121119 10:32:48 InnoDB: Shutdown completed; log sequence number 0 44233
121119 10:32:48 [Note] /usr/libexec/mysqld: Shutdown complete
121119 10:32:48 mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended
Re: Host Detail Page - High CPU usage
Posted: Fri Jul 24, 2015 2:19 pm
by ssax
For testing, try editing your /etc/php.ini and set this value to:
Then restart httpd:
Then watch the error log and see if it improves.
Re: Host Detail Page - High CPU usage
Posted: Fri Jul 24, 2015 2:37 pm
by TBT
ssax wrote:For testing, try editing your /etc/php.ini and set this value to:
Then restart httpd:
Then watch the error log and see if it improves.
Bumping max_execution_time = 90 no longer produces errors in /var/log/httpd/error_log and page load time is
85 seconds!
Re: Host Detail Page - High CPU usage
Posted: Mon Jul 27, 2015 9:09 am
by ssax
Just so we are testing with the same version, is this specific server running 2014R2.7 (noted in your signature)?
Re: Host Detail Page - High CPU usage
Posted: Mon Jul 27, 2015 9:15 am
by TBT
ssax wrote:Just so we are testing with the same version, is this specific server running 2014R2.7 (noted in your signature)?
Correct, 2014R2.7
Re: Host Detail Page - High CPU usage
Posted: Mon Jul 27, 2015 12:55 pm
by tgriep
Is your mysql server off loaded to another system?
The your mysqld.log doesn't look right.
Re: Host Detail Page - High CPU usage
Posted: Mon Jul 27, 2015 1:23 pm
by TBT
tgriep wrote:Is your mysql server off loaded to another system?
The your mysqld.log doesn't look right.
Yes, that would be /var/log/mysql.log
No errors present.