Page 2 of 3
Re: External commands
Posted: Thu Jan 24, 2013 12:20 pm
by David.adder
OS: CentOS 5 64Bits
4vCPUx2GHz=8GHz
Memory: 4096MB
Disk: 250GB
When we see the performance of the VM, we see sometimes 90%-95% in the use of the CPU, every 5 minutes
Re: External commands
Posted: Thu Jan 24, 2013 12:45 pm
by yancy
David,
Also, can you take a look at what the top processes are
regards,
-Yancy
Re: External commands
Posted: Thu Jan 24, 2013 5:12 pm
by David.adder
Hi Yancy;
top - 23:12:00 up 72 days, 11:14, 1 user, load average: 9.10, 12.49, 13.14
Tasks: 811 total, 2 running, 809 sleeping, 0 stopped, 0 zombie
Cpu(s): 17.7%us, 7.5%sy, 0.0%ni, 54.4%id, 19.8%wa, 0.1%hi, 0.5%si, 0.0%st
Mem: 3924924k total, 3585320k used, 339604k free, 36272k buffers
Swap: 6160376k total, 328704k used, 5831672k free, 1852860k cached
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
26697 mysql 20 0 2217m 48m 2880 S 42.8 1.3 11857:13 mysqld
659 apache 20 0 454m 29m 4604 S 24.5 0.8 9:48.90 httpd
6224 nagios 20 0 98.4m 8412 928 S 7.7 0.2 34:43.52 nagios
20037 nagios 20 0 51392 1856 912 S 5.8 0.0 2:36.84 ndo2db
10839 root 20 0 126m 40m 2908 R 4.8 1.1 0:09.05 mrtg
17016 root 20 0 15620 1800 900 R 2.9 0.0 0:00.89 top
15525 postgres 20 0 210m 5124 3636 S 1.0 0.1 0:00.17 postmaster
407 root 20 0 0 0 0 S 0.6 0.0 195:45.75 jbd2/dm-0-8
1341 root 20 0 249m 1100 708 S 0.3 0.0 648:29.15 rsyslogd
15543 postgres 20 0 210m 5668 4140 S 0.3 0.1 0:00.10 postmaster
19345 nagios 20 0 134m 1560 1276 S 0.3 0.0 0:00.01 check_http
1 root 20 0 19404 812 616 S 0.0 0.0 0:10.39 init
2 root 20 0 0 0 0 S 0.0 0.0 0:00.01 kthreadd
3 root RT 0 0 0 0 S 0.0 0.0 11:05.60 migration/0
4 root 20 0 0 0 0 S 0.0 0.0 0:59.24 ksoftirqd/0
5 root RT 0 0 0 0 S 0.0 0.0 0:00.01 migration/0
6 root RT 0 0 0 0 S 0.0 0.0 0:00.52 watchdog/0
7 root RT 0 0 0 0 S 0.0 0.0 14:22.07 migration/1
8 root RT 0 0 0 0 S 0.0 0.0 0:00.01 migration/1
9 root 20 0 0 0 0 S 0.0 0.0 0:51.85 ksoftirqd/1
10 root RT 0 0 0 0 S 0.0 0.0 0:00.64 watchdog/1
11 root RT 0 0 0 0 S 0.0 0.0 12:06.54 migration/2
12 root RT 0 0 0 0 S 0.0 0.0 0:00.01 migration/2
13 root 20 0 0 0 0 S 0.0 0.0 0:49.42 ksoftirqd/2
14 root RT 0 0 0 0 S 0.0 0.0 0:00.75 watchdog/2
15 root RT 0 0 0 0 S 0.0 0.0 11:05.89 migration/3
16 root RT 0 0 0 0 S 0.0 0.0 0:00.01 migration/3
17 root 20 0 0 0 0 S 0.0 0.0 0:49.09 ksoftirqd/3
18 root RT 0 0 0 0 S 0.0 0.0 0:00.75 watchdog/3
19 root 20 0 0 0 0 S 0.0 0.0 11:50.95 events/0
20 root 20 0 0 0 0 S 0.0 0.0 10:25.08 events/1
21 root 20 0 0 0 0 S 0.0 0.0 17:38.99 events/2
22 root 20 0 0 0 0 S 0.0 0.0 22:13.95 events/3
23 root 20 0 0 0 0 S 0.0 0.0 0:00.00 cpuset
24 root 20 0 0 0 0 S 0.0 0.0 0:00.04 khelper
25 root 20 0 0 0 0 S 0.0 0.0 0:00.00 netns
26 root 20 0 0 0 0 S 0.0 0.0 0:00.00 async/mgr
Re: External commands
Posted: Thu Jan 24, 2013 6:01 pm
by yancy
David,
Looks like mysql is running a little hot.
Take a look at the following and see if that improves mysql performance
http://assets.nagios.com/downloads/nagi ... tabase.pdf
regards,
-Yancy
Re: External commands
Posted: Fri Jan 25, 2013 3:41 am
by David.adder
Hi Yancy,
We ran that, and didn't receive errors. We still see much usage in CPU
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
29952 nagios 20 0 229m 58m 4464 R 14.1 1.5 0:02.12 check_vmware.pl
24689 nagios 20 0 231m 60m 4464 R 13.8 1.6 0:04.10 check_vmware.pl
988 nagios 20 0 201m 30m 4432 R 13.5 0.8 0:00.48 check_vmware.pl
989 nagios 20 0 201m 30m 4432 R 13.5 0.8 0:00.49 check_vmware.pl
6224 nagios 20 0 104m 15m 908 R 12.9 0.4 92:02.26 nagios
29949 nagios 20 0 229m 58m 4464 R 11.3 1.5 0:01.94 check_vmware.pl
1168 nagios 20 0 192m 21m 4124 R 10.7 0.6 0:00.35 check_vmware.pl
1164 nagios 20 0 188m 19m 4096 R 9.2 0.5 0:00.30 check_vmware.pl
1167 nagios 20 0 185m 18m 4080 R 8.9 0.5 0:00.29 check_vmware.pl
1169 nagios 20 0 185m 18m 3764 R 8.6 0.5 0:00.28 check_vmware.pl
659 apache 20 0 454m 29m 4884 S 6.4 0.8 13:02.62 httpd
9675 apache 20 0 451m 27m 3920 S 6.4 0.7 13:23.76 httpd
661 apache 20 0 457m 31m 4772 S 6.1 0.8 12:39.12 httpd
6521 mysql 20 0 2193m 45m 4460 S 6.1 1.2 1:12.86 mysqld
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
18784 apache 20 0 453m 27m 3960 D 13.7 0.7 14:14.11 httpd
2257 apache 20 0 453m 29m 4432 D 13.4 0.8 13:39.92 httpd
18783 apache 20 0 440m 25m 3936 S 13.0 0.7 14:20.33 httpd
25849 apache 20 0 454m 36m 4912 D 13.0 1.0 12:56.90 httpd
659 apache 20 0 454m 29m 4888 S 12.7 0.8 13:03.75 httpd
23297 nagios 20 0 214m 20m 7292 D 12.7 0.5 0:00.39 php
18781 apache 20 0 453m 30m 4448 D 11.1 0.8 12:50.55 httpd
2020 apache 20 0 450m 27m 3944 S 6.5 0.7 12:58.95 httpd
Re: External commands
Posted: Fri Jan 25, 2013 8:24 am
by David.adder
Hi Yancy,
We have tested this some hours, and it seems to works better now:
Captura1.JPG
However, as I said previously, we note that the VM uses so much CPU:
Captura.JPG
Each host and service that we are monitoring, are monitored each 5 minutes. Could it be the reason? Is anyway to improve the performance with the CPU usage?
Re: External commands
Posted: Fri Jan 25, 2013 9:00 am
by scottwilkerson
What version of Nagios XI are you running?
How many hosts/services are you monitoring?
Re: External commands
Posted: Fri Jan 25, 2013 9:09 am
by David.adder
Hi Scott,
Nagios XI 2012R1.4
Hosts: 720
Services: 2899
Re: External commands
Posted: Fri Jan 25, 2013 10:43 am
by slansing
Are these services mostly active checks or passive? How often are you running checks "I know with that many services it would be hard to tell, but if you remember that would help."
Re: External commands
Posted: Fri Jan 25, 2013 11:04 am
by David.adder
Hi slanshing,
Most are active check; maybe 2500 active checks, 400 passive checks.
Active checks are mostly each 5 minutes. Passive checks were configured in NSCA Client for 400-500 sec)