PERFORMANCE optimization

Hi All,
i´m using Nagios 3.0.6 and for monitoring 300 hosts and 1900 services.

VMware ESX server
Disk space: 20 GB for nagios machine - (15000rpm disks in RAID5)
RAM: 2GB

System: CentOS 5.2
MySQL: v5.0.45 
Nagios: 3.0.6
Centreon: 2.0 stable

Monitored services:
Ping - 289x
Cpu - 223x
Disk space - 151x
Psychical memory - 222x
Swap - 100x
Traffic - 384x (on 5 cisco core switches)
Ifstatus - 384x (on 5 cisco core switches)
...

I need help with performance optimization.
All mysql and nagios settings are default.

Can you help me? Do you need more spec.?

Thank you
Daniel

top - 08:34:42 up  1:01,  3 users,  load average: 13.08, 14.29, 14.37
Tasks: 155 total,  13 running, 142 sleeping,   0 stopped,   0 zombie
Cpu(s): 39.2%us, 60.1%sy,  0.0%ni,  0.0%id,  0.0%wa,  0.2%hi,  0.5%si,  0.0%st
Mem:   2075604k total,  1163032k used,   912572k free,    69156k buffers
Swap:  1048568k total,        0k used,  1048568k free,   754260k cached

Tasks: 110 total,   4 running, 106 sleeping,   0 stopped,   0 zombie
Cpu(s): 46.9%us, 43.3%sy,  5.3%ni,  0.3%id,  0.3%wa,  2.0%hi,  1.8%si,  0.0%st

Tasks: 119 total,   8 running, 110 sleeping,   0 stopped,   1 zombie
Cpu(s): 60.4%us, 31.4%sy,  0.0%ni,  0.0%id,  0.0%wa,  5.8%hi,  2.3%si,  0.0%st

top - 08:43:29 up  1:10,  3 users,  load average: 12.11, 12.83, 13.67
Tasks: 212 total,  48 running, 163 sleeping,   0 stopped,   1 zombie
Cpu(s): 38.2%us, 60.6%sy,  0.0%ni,  0.0%id,  0.0%wa,  0.7%hi,  0.5%si,  0.0%st
Mem:   2075604k total,  1228972k used,   846632k free,    73276k buffers
Swap:  1048568k total,        0k used,  1048568k free,   826752k cached

  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND                                                     
12117 mysql     18   0  283m  52m 4488 S   10  2.6   8:09.61 mysqld                                                      
23141 nagios    15   0 10184 6448 1788 R    6  0.3   0:00.19 check_snmp_cisc                                             
11666 nagios    16   0 16940 5088  872 S    5  0.2   2:18.01 nagios                                                      
23138 nagios    21   0 10304 6448 1788 R    4  0.3   0:00.13 check_snmp_cisc                                             
23158 nagios    21   0 10180 6424 1772 R    4  0.3   0:00.13 check_snmp_cisc                                             
23190 nagios    21   0 10532 6636 1648 R    4  0.3   0:00.13 check_snmp_cisc                                             
23120 nagios    21   0 10312 6448 1788 R    4  0.3   0:00.12 check_snmp_cisc                                             
23199 nagios    20   0  8916 5132 1672 R    3  0.2   0:00.10 check_snmp_cisc                                             
23108 nagios    20   0  9184 5264 1620 R    3  0.3   0:00.09 check_snmp_cisc                                             
23187 nagios    20   0  8524 4644 1592 R    3  0.2   0:00.09 check_snmp_cisc                                             
23202 nagios    20   0  8652 4772 1612 R    3  0.2   0:00.09 check_snmp_cisc                                             
23123 nagios    18   0  8724 3888 1764 S    3  0.2   0:00.08 check_centreon_                                             
23129 nagios    21   0  8728 3888 1764 S    3  0.2   0:00.08 check_centreon_                                             
23144 nagios    21   0  8736 3896 1764 S    3  0.2   0:00.08 check_centreon_                                             
23126 nagios    18   0  8736 3940 1788 S    2  0.2   0:00.07 check_centreon_                                             
23184 nagios    19   0  8728 3888 1764 S    2  0.2   0:00.07 check_centreon_                                             
23132 nagios    21   0  8732 3888 1764 S    2  0.2   0:00.06 check_centreon_                                             
23152 nagios    20   0  6772 2900 1584 R    1  0.1   0:00.04 check_snmp_cisc                                             
23173 nagios    20   0  7048 3064 1588 R    1  0.1   0:00.04 check_centreon_                                             
23205 nagios    20   0  7164 3220 1584 R    1  0.2   0:00.04 check_snmp_cisc                                             
23240 nagios    20   0  7044 3104 1588 R    1  0.1   0:00.04 check_centreon_                                             
 4849 apache    16   0 37264  19m 3700 S    1  1.0   0:15.09 httpd                                                       
24791 apache    15   0 31476  13m 3696 S    1  0.7   0:05.60 httpd                                                       
    1 root      15   0  2060  644  556 S    1  0.0   0:02.87 init                                                        
12386 nagios    15   0  7100 1600  888 S    1  0.1   0:18.64 ndo2db-3x                                                   
22951 root      16   0  2320 1112  816 S    1  0.1   0:01.24 top                                                         
  372 root      10  -5     0    0    0 S    0  0.0   0:20.21 kjournald                                                   
 4931 root      16   0  2320 1144  804 S    0  0.1   0:10.89 top                                                         
22206 root      15   0  2192 1048  804 R    0  0.1   0:00.04 top                                                         
23161 nagios    21   0  4480 1140  968 S    0  0.1   0:00.01 check_snmp_cisc                                             
23179 nagios    20   0  6112 2040 1428 R    0  0.1   0:00.01 check_centreon_                                             
23193 nagios    20   0  6108 1948 1380 R    0  0.1   0:00.01 check_snmp_cisc                                             
23208 nagios    17   0  4484 1056  896 S    0  0.1   0:00.01 check_snmp_cisc                                             
23221 nagios    20   0  4484 1140  968 S    0  0.1   0:00.01 check_snmp_cisc                                             
23227 nagios    21   0  4480 1056  896 R    0  0.1   0:00.01 check_snmp_cisc                                             
23231 nagios    21   0  5844 1560 1200 R    0  0.1   0:00.01 check_centreon_                                             
23266 nagios    25   0  5972 1364 1036 R    0  0.1   0:00.01 snmpget                                                     
23276 nagios    19   0     0    0    0 R    0  0.0   0:00.01 check_ping                                                  
    2 root      RT  -5     0    0    0 S    0  0.0   0:00.56 migration/0         

 4153 root      12  -3 12052  732  568 S    0  0.0   0:00.03 audispd                                                     
 4186 root      15   0  1820  712  600 S    0  0.0   0:00.13 syslogd                                                     
 4189 root      15   0  1668  404  336 S    0  0.0   0:00.01 klogd                                                       
 4206 root      15   0  2428  376  268 S    0  0.0   0:00.20 irqbalance                                                  
 4242 rpc       23   0  1804  552  460 S    0  0.0   0:00.00 portmap                                                     
 4268 rpcuser   25   0  1952  824  696 S    0  0.0   0:00.06 rpc.statd                                                   
 4303 root      15   0  5432  580  284 S    0  0.0   0:00.00 rpc.idmapd                                                  
 4332 dbus      15   0  2744  784  604 S    0  0.0   0:00.01 dbus-daemon                                                 
 4381 root      25   0 12724 1260  576 S    0  0.1   0:00.07 pcscd                                                       
  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND                                                     
12117 mysql     15   0  283m  52m 4488 S   64  2.6   8:14.52 mysqld                                                      
11666 nagios    17   0 16940 5088  872 S    2  0.2   2:18.88 nagios                                                      
 6279 root      15   0 10044 2864 2276 S    1  0.1   0:00.10 sshd                                                        
  148 root      16   0     0    0    0 S    1  0.0   0:13.47 pdflush                                                     
    1 root      15   0  2060  644  556 S    0  0.0   0:02.89 init                                                        
  372 root      10  -5     0    0    0 S    0  0.0   0:20.37 kjournald                                                   
 4931 root      16   0  2320 1144  804 S    0  0.1   0:10.96 top                                                         
22951 root      15   0  2320 1112  816 S    0  0.1   0:01.30 top                                                         
    2 root      RT  -5     0    0    0 S    0  0.0   0:00.56 migration/0                                                 
    3 root      34  19     0    0    0 S    0  0.0   0:00.24 ksoftirqd/0                                                 
    4 root      RT  -5     0    0    0 S    0  0.0   0:00.00 watchdog/0                                                  
    5 root      RT  -5     0    0    0 S    0  0.0   0:00.38 migration/1                                                 
    6 root      34  19     0    0    0 S    0  0.0   0:00.02 ksoftirqd/1                                                 
    7 root      RT  -5     0    0    0 S    0  0.0   0:00.00 watchdog/1                                                  
    8 root      10  -5     0    0    0 S    0  0.0   0:00.08 events/0                                                    
    9 root      10  -5     0    0    0 S    0  0.0   0:00.02 events/1                                                    
   10 root      10  -5     0    0    0 S    0  0.0   0:00.00 khelper                                                     
   11 root      10  -5     0    0    0 S    0  0.0   0:00.00 kthread                                                     
   15 root      10  -5     0    0    0 S    0  0.0   0:00.40 kblockd/0                                                   
   16 root      10  -5     0    0    0 S    0  0.0   0:01.03 kblockd/1                                                   
   17 root      15  -5     0    0    0 S    0  0.0   0:00.00 kacpid                                                      
   73 root      15  -5     0    0    0 S    0  0.0   0:00.00 cqueue/0                                                    
   74 root      16  -5     0    0    0 S    0  0.0   0:00.00 cqueue/1                                                    
   77 root      15  -5     0    0    0 S    0  0.0   0:00.00 khubd                                                       
   79 root      11  -5     0    0    0 S    0  0.0   0:00.00 kseriod                                                     
  147 root      20   0     0    0    0 S    0  0.0   0:00.00 pdflush                                                     
  149 root      15  -5     0    0    0 S    0  0.0   0:00.00 kswapd0              

any tips how to optimize mysqld?

Personaly, I don’t use Nagios with mysql. But this might be helpful:
dev.mysql.com/doc/refman/5.0/en/ … ation.html