Quote:
|
Ive tryed pinging the server and thats fine ? does that prove anything ?
|
No, this just means your server is connected and answering on the network, nothing more.
First, when you say "having a few problems in the evening with the server going slow", what
is slow ?
The db, the network, the cpu usage goes through the roof ?
What happens.
The first thing to find is what is causing the server to go slow.
If you are using linux, when this happens, log on your server via SSH, and start "top".
Top is a process watcher, and show you which process are using how much of your CPU and your ram (and much more, but for starter, we will concentrate on that).
this is a typical view of top:
Code:
top - 22:48:53 up 1 day, 22:57, 4 users, load average: 0.12, 0.26, 0.33
Tasks: 143 total, 3 running, 140 sleeping, 0 stopped, 0 zombie
Cpu0 : 1.7%us, 1.9%sy, 4.0%ni, 91.8%id, 0.4%wa, 0.0%hi, 0.2%si, 0.0%st
Cpu1 : 2.8%us, 2.7%sy, 4.1%ni, 90.0%id, 0.3%wa, 0.0%hi, 0.1%si, 0.0%st
Mem: 2053148k total, 622408k used, 1430740k free, 11916k buffers
Swap: 2562356k total, 9864k used, 2552492k free, 199248k cached
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
13501 tmo 21 1 233m 107m 23m R 4 5.4 0:41.01 firefox-bin
6009 root 20 0 66648 41m 8620 S 2 2.1 17:03.61 X
6959 pulse 9 -11 25104 5248 3964 S 2 0.3 21:22.70 pulseaudio
1 root 20 0 1560 548 472 S 0 0.0 0:00.70 init
2 root 15 -5 0 0 0 S 0 0.0 0:00.00 kthreadd
3 root RT -5 0 0 0 S 0 0.0 0:00.00 migration/0
4 root 15 -5 0 0 0 S 0 0.0 0:08.70 ksoftirqd/0
5 root RT -5 0 0 0 S 0 0.0 0:00.00 watchdog/0
9 root 15 -5 0 0 0 S 0 0.0 0:01.36 events/0
11 root 15 -5 0 0 0 S 0 0.0 0:00.00 khelper
82 root 15 -5 0 0 0 S 0 0.0 0:00.38 kblockd/0
85 root 15 -5 0 0 0 S 0 0.0 0:00.00 kacpid
86 root 15 -5 0 0 0 S 0 0.0 0:00.00 kacpi_notify
176 root 15 -5 0 0 0 S 0 0.0 0:00.00 ata/0
178 root 15 -5 0 0 0 S 0 0.0 0:00.00 ata_aux
179 root 15 -5 0 0 0 S 0 0.0 0:00.00 ksuspend_usbd
184 root 15 -5 0 0 0 S 0 0.0 0:00.00 khubd
187 root 15 -5 0 0 0 S 0 0.0 0:00.00 kseriod
235 root 20 0 0 0 0 S 0 0.0 0:00.44 pdflush
236 root 20 0 0 0 0 S 0 0.0 0:00.20 pdflush
237 root 15 -5 0 0 0 S 0 0.0 0:00.10 kswapd0
284 root 15 -5 0 0 0 S 0 0.0 0:00.00 aio/0
297 root 15 -5 0 0 0 S 0 0.0 0:00.74 nfsiod
1003 root 15 -5 0 0 0 S 0 0.0 0:00.00 scsi_eh_0
1005 root 15 -5 0 0 0 S 0 0.0 0:00.00 scsi_eh_1
1023 root 15 -5 0 0 0 S 0 0.0 0:00.02 scsi_eh_2
1025 root 15 -5 0 0 0 S 0 0.0 0:00.04 scsi_eh_3
1034 root 15 -5 0 0 0 S 0 0.0 0:00.00 khpsbpkt
1043 root 15 -5 0 0 0 S 0 0.0 0:00.00 knodemgrd_0
1124 root 15 -5 0 0 0 S 0 0.0 0:00.00 scsi_eh_4
1125 root 15 -5 0 0 0 S 0 0.0 0:04.80 usb-storage
1128 root 15 -5 0 0 0 S 0 0.0 0:00.00 scsi_eh_5
1129 root 15 -5 0 0 0 S 0 0.0 0:00.00 usb-storage
1147 root 15 -5 0 0 0 S 0 0.0 0:00.00 kpsmoused
1151 root 15 -5 0 0 0 S 0 0.0 0:00.00 kstriped
1153 root 15 -5 0 0 0 S 0 0.0 0:00.00 kmpathd/0
1155 root 15 -5 0 0 0 S 0 0.0 0:00.00 kmpath_handlerd
1156 root 15 -5 0 0 0 S 0 0.0 0:00.00 kondemand/0
1172 root 15 -5 0 0 0 S 0 0.0 0:00.46 rpciod/0
1177 root 15 -5 0 0 0 S 0 0.0 0:01.48 kjournald
1281 root 16 -4 2596 1392 372 S 0 0.1 0:00.46 udevd
2762 root 20 0 2356 908 532 S 0 0.0 0:00.00 mount.ntfs-3g
2766 root 20 0 2356 904 532 S 0 0.0 0:00.00 mount.ntfs-3g
What is interesting now are in the lower part, the columns "USER", "%CPU" and "%MEM" and "COMMAND" which will list the most cpu consuming process, and threrfor which program they are.
Another interesting value is the load. It's in the top right corner, "load average"
There are 3 values: instant value, average on 5 minutes, average on 15 minute.
A normal load is more or less the number of cpu cores.
If you have a 2 cores cpu, a load up to 2 is normal. A load under 1 for 1 processor means that your cpu is staying without doing anything.
Try already to look at those numbers.