Enviado em 08/02/2009 - 15:51h
Não sou fera em linux mais tenho um servidor dedicado que tem uma semana que ta me dando muita dor de cabeça, ele freqüentemente trava devido ao alto consumo da memória não tem hora especifica pode ser durando um pico de acesso ou ate mesmo durante a madruga, percebo o seguinte, apóis vários dias monitorando o consumo da memório percebo que o normal é consumir 2 a 3 gigas de memória ( o servidor tem 8 gigas) mais em uma certa hora do dia ( pode ser 1 ou até 3x no dia) esse consumo sobe rapidamente se chegar a 6 gigas e ele não diminui mais vai consumindo toda a memória ate começar a usar o swap e quando isso ocorre o serv fica muito lento chegando a sair do ar.
Algumas informações importantes:
Operating system CentOS Linux 5.2
Kernel and CPU Linux 2.6.18-92.1.22.el5PAE on i686
System uptime 2 hours, 27 minutes
CPU load averages 8.34 (1 min) 9.33 (5 mins) 9.39 (15 mins)
Real memory 7.92 GB total, 1.67 GB used
Virtual memory 8.29 GB total, 0 bytes used
Local disk space 222.61 GB total, 24.47 GB used
O site tem uma média de 35mil pageviews por dia
o banco de dados é mysql com 386.379 registros (200mb) e tendo uma média de 5.000 novos registro diários
Aparentemente nenhuma msg de esso antes da máquina travar
Feb 8 05:00:02 localhost ntpdate[6782]: adjust time server 192.5.41.40 offset -0.341383 sec
Feb 8 06:00:06 localhost ntpdate[11922]: adjust time server 128.252.19.1 offset -0.021390 sec
Feb 8 07:00:02 localhost ntpdate[14781]: adjust time server 192.5.41.40 offset -0.069693 sec
Feb 8 08:00:03 localhost ntpdate[17973]: adjust time server 192.5.41.40 offset -0.048406 sec
Feb 8 09:00:09 localhost ntpdate[21326]: adjust time server 128.252.19.1 offset -0.058768 sec
Feb 8 09:57:24 localhost shutdown[23598]: shutting down for system reboot
Feb 8 09:58:17 localhost init: Switching to runlevel: 6
Feb 8 10:01:54 localhost ntpdate[23844]: adjust time server 192.5.41.40 offset -0.060610 sec
Feb 8 10:06:19 localhost smartd[2792]: smartd received signal 15: Terminated
Feb 8 10:06:19 localhost smartd[2792]: smartd is exiting (exit status 0)
Feb 8 10:07:17 localhost avahi-daemon[2646]: Got SIGTERM, quitting.
Feb 8 10:07:21 localhost avahi-daemon[2646]: Leaving mDNS multicast group on interface eth0.IPv6 with address fe80::20a:5eff:fe76:51ce.
Feb 8 10:07:21 localhost avahi-daemon[2646]: Leaving mDNS multicast group on interface eth0.IPv4 with address xxx.xxx.xxx.xxx.
Feb 8 10:07:24 localhost shutdown[24178]: shutting down for system reboot
Feb 8 10:10:21 localhost rpc.statd[2131]: Caught signal 15, un-registering and exiting.
comando free num momento normal:
> free
total used free shared buffers cached
Mem: 8301396 2562196 5739200 0 72940 558180
-/+ buffers/cache: 1931076 6370320
Swap: 8692948 0 8692948
Comando top no momento normal:
top - 12:49:01 up 2:37, 1 user, load average: 10.71, 10.20, 9.87
Tasks: 476 total, 4 running, 471 sleeping, 0 stopped, 1 zombie
Cpu(s): 74.1%us, 25.6%sy, 0.0%ni, 0.0%id, 0.0%wa, 0.0%hi, 0.2%si, 0.0%st
Mem: 8301396k total, 2865468k used, 5435928k free, 73324k buffers
Swap: 8692948k total, 0k used, 8692948k free, 559084k cached
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
2456 mysql 23 0 561m 108m 4700 S 359 1.3 519:45.69 mysqld
17697 apache 15 0 24680 6200 2708 S 17 0.1 0:01.79 httpd
18153 apache 15 0 89008 68m 2720 S 8 0.8 0:00.99 httpd
18140 apache 16 0 103m 85m 2692 S 7 1.1 0:00.22 httpd
18193 apache 15 0 79800 59m 2480 S 5 0.7 0:00.15 httpd
17158 apache 15 0 29596 10m 2732 S 1 0.1 0:02.38 httpd
18400 root 15 0 2456 1284 816 R 1 0.0 0:00.18 top
15548 apache 15 0 89020 68m 2716 S 0 0.8 0:04.33 httpd
16819 apache 15 0 24708 6216 2688 S 0 0.1 0:01.88 httpd
17717 apache 15 0 24712 6232 2708 S 0 0.1 0:00.57 httpd
17841 apache 15 0 24608 5996 2616 S 0 0.1 0:00.02 httpd
17925 apache 16 0 29140 12m 4396 S 0 0.1 0:01.85 httpd
18096 apache 15 0 24568 5588 2324 S 0 0.1 0:00.01 httpd
1 root 15 0 2064 648 556 S 0 0.0 0:01.10 init
2 root RT -5 0 0 0 S 0 0.0 0:00.00 migration/0
3 root 39 19 0 0 0 S 0 0.0 0:00.00 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.00 migration/1
6 root 34 19 0 0 0 S 0 0.0 0:00.00 ksoftirqd/1
7 root RT -5 0 0 0 S 0 0.0 0:00.00 watchdog/1
8 root RT -5 0 0 0 S 0 0.0 0:00.00 migration/2
9 root 34 19 0 0 0 S 0 0.0 0:00.00 ksoftirqd/2
10 root RT -5 0 0 0 S 0 0.0 0:00.00 watchdog/2
11 root RT -5 0 0 0 S 0 0.0 0:00.00 migration/3
12 root 34 19 0 0 0 S 0 0.0 0:00.00 ksoftirqd/3
13 root RT -5 0 0 0 S 0 0.0 0:00.00 watchdog/3
14 root 10 -5 0 0 0 S 0 0.0 0:00.00 events/0
15 root 10 -5 0 0 0 S 0 0.0 0:00.00 events/1
16 root 10 -5 0 0 0 S 0 0.0 0:00.00 events/2
17 root 10 -5 0 0 0 S 0 0.0 0:00.00 events/3
18 root 10 -5 0 0 0 S 0 0.0 0:00.00 khelper
19 root 11 -5 0 0 0 S 0 0.0 0:00.00 kthread
25 root 10 -5 0 0 0 S 0 0.0 0:00.00 kblockd/0
26 root 10 -5 0 0 0 S 0 0.0 0:00.00 kblockd/1
27 root 10 -5 0 0 0 S 0 0.0 0:00.00 kblockd/2
28 root 10 -5 0 0 0 S 0 0.0 0:00.00 kblockd/3
29 root 16 -5 0 0 0 S 0 0.0 0:00.00 kacpid
144 root 16 -5 0 0 0 S 0 0.0 0:00.00 cqueue/0
145 root 16 -5 0 0 0 S 0 0.0 0:00.00 cqueue/1
146 root 17 -5 0 0 0 S 0 0.0 0:00.00 cqueue/2
147 root 17 -5 0 0 0 S 0 0.0 0:00.00 cqueue/3
150 root 11 -5 0 0 0 S 0 0.0 0:00.00 khubd
152 root 17 -5 0 0 0 S 0 0.0 0:00.00 kseriod
227 root 22 0 0 0 0 S 0 0.0 0:00.00 pdflush
228 root 15 0 0 0 0 S 0 0.0 0:00.10 pdflush
229 root 19 -5 0 0 0 S 0 0.0 0:00.00 kswapd0
230 root 19 -5 0 0 0 S 0 0.0 0:00.00 aio/0
231 root 20 -5 0 0 0 S 0 0.0 0:00.00 aio/1
232 root 10 -5 0 0 0 S 0 0.0 0:00.00 aio/2
233 root 20 -5 0 0 0 S 0 0.0 0:00.00 aio/3
390 root 11 -5 0 0 0 S 0 0.0 0:00.00 kpsmoused
436 root 12 -5 0 0 0 S 0 0.0 0:00.00 ata/0
Se alguem puder da uma luz eu agradeço, se precisar de mais alguma informação para esclarecer o problema é só pedir q posto.
Algumas informações importantes:
Operating system CentOS Linux 5.2
Kernel and CPU Linux 2.6.18-92.1.22.el5PAE on i686
System uptime 2 hours, 27 minutes
CPU load averages 8.34 (1 min) 9.33 (5 mins) 9.39 (15 mins)
Real memory 7.92 GB total, 1.67 GB used
Virtual memory 8.29 GB total, 0 bytes used
Local disk space 222.61 GB total, 24.47 GB used
O site tem uma média de 35mil pageviews por dia
o banco de dados é mysql com 386.379 registros (200mb) e tendo uma média de 5.000 novos registro diários
Aparentemente nenhuma msg de esso antes da máquina travar
Feb 8 05:00:02 localhost ntpdate[6782]: adjust time server 192.5.41.40 offset -0.341383 sec
Feb 8 06:00:06 localhost ntpdate[11922]: adjust time server 128.252.19.1 offset -0.021390 sec
Feb 8 07:00:02 localhost ntpdate[14781]: adjust time server 192.5.41.40 offset -0.069693 sec
Feb 8 08:00:03 localhost ntpdate[17973]: adjust time server 192.5.41.40 offset -0.048406 sec
Feb 8 09:00:09 localhost ntpdate[21326]: adjust time server 128.252.19.1 offset -0.058768 sec
Feb 8 09:57:24 localhost shutdown[23598]: shutting down for system reboot
Feb 8 09:58:17 localhost init: Switching to runlevel: 6
Feb 8 10:01:54 localhost ntpdate[23844]: adjust time server 192.5.41.40 offset -0.060610 sec
Feb 8 10:06:19 localhost smartd[2792]: smartd received signal 15: Terminated
Feb 8 10:06:19 localhost smartd[2792]: smartd is exiting (exit status 0)
Feb 8 10:07:17 localhost avahi-daemon[2646]: Got SIGTERM, quitting.
Feb 8 10:07:21 localhost avahi-daemon[2646]: Leaving mDNS multicast group on interface eth0.IPv6 with address fe80::20a:5eff:fe76:51ce.
Feb 8 10:07:21 localhost avahi-daemon[2646]: Leaving mDNS multicast group on interface eth0.IPv4 with address xxx.xxx.xxx.xxx.
Feb 8 10:07:24 localhost shutdown[24178]: shutting down for system reboot
Feb 8 10:10:21 localhost rpc.statd[2131]: Caught signal 15, un-registering and exiting.
comando free num momento normal:
> free
total used free shared buffers cached
Mem: 8301396 2562196 5739200 0 72940 558180
-/+ buffers/cache: 1931076 6370320
Swap: 8692948 0 8692948
Comando top no momento normal:
top - 12:49:01 up 2:37, 1 user, load average: 10.71, 10.20, 9.87
Tasks: 476 total, 4 running, 471 sleeping, 0 stopped, 1 zombie
Cpu(s): 74.1%us, 25.6%sy, 0.0%ni, 0.0%id, 0.0%wa, 0.0%hi, 0.2%si, 0.0%st
Mem: 8301396k total, 2865468k used, 5435928k free, 73324k buffers
Swap: 8692948k total, 0k used, 8692948k free, 559084k cached
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
2456 mysql 23 0 561m 108m 4700 S 359 1.3 519:45.69 mysqld
17697 apache 15 0 24680 6200 2708 S 17 0.1 0:01.79 httpd
18153 apache 15 0 89008 68m 2720 S 8 0.8 0:00.99 httpd
18140 apache 16 0 103m 85m 2692 S 7 1.1 0:00.22 httpd
18193 apache 15 0 79800 59m 2480 S 5 0.7 0:00.15 httpd
17158 apache 15 0 29596 10m 2732 S 1 0.1 0:02.38 httpd
18400 root 15 0 2456 1284 816 R 1 0.0 0:00.18 top
15548 apache 15 0 89020 68m 2716 S 0 0.8 0:04.33 httpd
16819 apache 15 0 24708 6216 2688 S 0 0.1 0:01.88 httpd
17717 apache 15 0 24712 6232 2708 S 0 0.1 0:00.57 httpd
17841 apache 15 0 24608 5996 2616 S 0 0.1 0:00.02 httpd
17925 apache 16 0 29140 12m 4396 S 0 0.1 0:01.85 httpd
18096 apache 15 0 24568 5588 2324 S 0 0.1 0:00.01 httpd
1 root 15 0 2064 648 556 S 0 0.0 0:01.10 init
2 root RT -5 0 0 0 S 0 0.0 0:00.00 migration/0
3 root 39 19 0 0 0 S 0 0.0 0:00.00 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.00 migration/1
6 root 34 19 0 0 0 S 0 0.0 0:00.00 ksoftirqd/1
7 root RT -5 0 0 0 S 0 0.0 0:00.00 watchdog/1
8 root RT -5 0 0 0 S 0 0.0 0:00.00 migration/2
9 root 34 19 0 0 0 S 0 0.0 0:00.00 ksoftirqd/2
10 root RT -5 0 0 0 S 0 0.0 0:00.00 watchdog/2
11 root RT -5 0 0 0 S 0 0.0 0:00.00 migration/3
12 root 34 19 0 0 0 S 0 0.0 0:00.00 ksoftirqd/3
13 root RT -5 0 0 0 S 0 0.0 0:00.00 watchdog/3
14 root 10 -5 0 0 0 S 0 0.0 0:00.00 events/0
15 root 10 -5 0 0 0 S 0 0.0 0:00.00 events/1
16 root 10 -5 0 0 0 S 0 0.0 0:00.00 events/2
17 root 10 -5 0 0 0 S 0 0.0 0:00.00 events/3
18 root 10 -5 0 0 0 S 0 0.0 0:00.00 khelper
19 root 11 -5 0 0 0 S 0 0.0 0:00.00 kthread
25 root 10 -5 0 0 0 S 0 0.0 0:00.00 kblockd/0
26 root 10 -5 0 0 0 S 0 0.0 0:00.00 kblockd/1
27 root 10 -5 0 0 0 S 0 0.0 0:00.00 kblockd/2
28 root 10 -5 0 0 0 S 0 0.0 0:00.00 kblockd/3
29 root 16 -5 0 0 0 S 0 0.0 0:00.00 kacpid
144 root 16 -5 0 0 0 S 0 0.0 0:00.00 cqueue/0
145 root 16 -5 0 0 0 S 0 0.0 0:00.00 cqueue/1
146 root 17 -5 0 0 0 S 0 0.0 0:00.00 cqueue/2
147 root 17 -5 0 0 0 S 0 0.0 0:00.00 cqueue/3
150 root 11 -5 0 0 0 S 0 0.0 0:00.00 khubd
152 root 17 -5 0 0 0 S 0 0.0 0:00.00 kseriod
227 root 22 0 0 0 0 S 0 0.0 0:00.00 pdflush
228 root 15 0 0 0 0 S 0 0.0 0:00.10 pdflush
229 root 19 -5 0 0 0 S 0 0.0 0:00.00 kswapd0
230 root 19 -5 0 0 0 S 0 0.0 0:00.00 aio/0
231 root 20 -5 0 0 0 S 0 0.0 0:00.00 aio/1
232 root 10 -5 0 0 0 S 0 0.0 0:00.00 aio/2
233 root 20 -5 0 0 0 S 0 0.0 0:00.00 aio/3
390 root 11 -5 0 0 0 S 0 0.0 0:00.00 kpsmoused
436 root 12 -5 0 0 0 S 0 0.0 0:00.00 ata/0
Se alguem puder da uma luz eu agradeço, se precisar de mais alguma informação para esclarecer o problema é só pedir q posto.