My server returning an error sth. like swap = 0 then locking httpd and all other services is this normal this is a virtual machine and i give it 3 gb ram and 4cpu of i7 920 i have 1 gbit connection on this machine finally i have 4000+ clients at one time :S
cahit Eyigünlü wrote:
My server returning an error sth. like swap = 0 then locking httpd and all other services is this normal this is a virtual machine and i give it 3 gb ram and 4cpu of i7 920 i have 1 gbit connection on this machine finally i have 4000+ clients at one time :S
No. This is not normal.
Did you create a swap partition when you were installing the system?
If you do a "fdisk /dev/sda", change "sda" to your disk, you'll see something like this: Device Boot Start End Blocks Id System /dev/sda1 * 1 13 104391 83 Linux /dev/sda2 14 535 4192965 82 Linux swap / Solaris /dev/sda3 536 4427 31262490 83 Linux
The command "free" can give you a hint about your swap space: newt (Linux)$ free total used free shared buffers cached Mem: 2074956 1926248 148708 0 27900 1252224 -/+ buffers/cache: 646124 1428832 Swap: 4192956 124 4192832 newt (Linux)$
Regards
mg.
root@lin [~]# free
total used free shared buffers cached
Mem: 3090588 908844 2181744 0 11948 266892
-/+ buffers/cache: 630004 2460584
Swap: 2064376 22796 2041580
2010/4/13 Marcelo M. Garcia marcelo.maia.garcia@googlemail.com
cahit Eyigünlü wrote:
My server returning an error sth. like swap = 0 then locking httpd and all other services is this normal this is a virtual machine and i give it 3 gb ram and 4cpu of i7 920 i have 1 gbit connection on this machine finally i have 4000+ clients at one time :S
No. This is not normal.
Did you create a swap partition when you were installing the system?
If you do a "fdisk /dev/sda", change "sda" to your disk, you'll see something like this: Device Boot Start End Blocks Id System /dev/sda1 * 1 13 104391 83 Linux /dev/sda2 14 535 4192965 82 Linux swap / Solaris /dev/sda3 536 4427 31262490 83 Linux
The command "free" can give you a hint about your swap space: newt (Linux)$ free total used free shared buffers cached Mem: 2074956 1926248 148708 0 27900 1252224 -/+ buffers/cache: 646124 1428832 Swap: 4192956 124 4192832 newt (Linux)$
Regards
mg. _______________________________________________ CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
Cahit, 2010/4/13 cahit Eyigünlü cahit.eyigunlu@gmail.com:
My server returning an error sth. like swap = 0 then locking httpd and all
Set up a monitoring tool like sar etc. or my favourite, nmon with capacity planning. Depending on what those 4k users are doing, you might be running out of RAM + swap space until the out-of-memory killer kicks in and frees up some space by killing some processes. You should be able to see that activity in the message logfile.
Actually that is better i think ;
is there any optimization tool i have added 2 more gb ram but it is still locking server :S
top - 13:11:13 up 33 min, 2 users, load average: 29.96, 13.75, 10.97
Tasks: 280 total, 40 running, 236 sleeping, 0 stopped, 4 zombie
Cpu(s): 61.1%us, 34.2%sy, 0.0%ni, 0.0%id, 0.0%wa, 0.3%hi, 4.4%si, 0.0%st
Mem: 3090588k total, 2481096k used, 609492k free, 16068k buffers
Swap: 2064376k total, 22796k used, 2041580k free, 274104k cached
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
4331 root 18 0 169m 131m 764 S 0.0 4.3 0:01.75 /usr/sbin/clamd
4228 mysql 15 0 356m 53m 3904 S 24.0 1.8 5:42.20 /usr/sbin/mysqld --basedir=/ --datadir=/var/lib/mysql --user=mys
2010/4/13 Hakan Koseoglu hakan@koseoglu.org
Cahit, 2010/4/13 cahit Eyigünlü cahit.eyigunlu@gmail.com:
My server returning an error sth. like swap = 0 then locking httpd and
all Set up a monitoring tool like sar etc. or my favourite, nmon with capacity planning. Depending on what those 4k users are doing, you might be running out of RAM + swap space until the out-of-memory killer kicks in and frees up some space by killing some processes. You should be able to see that activity in the message logfile. -- Hakan (m1fcj) - http://www.hititgunesi.org _______________________________________________ CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
Cahit,
2010/4/13 cahit Eyigünlü cahit.eyigunlu@gmail.com:
is there any optimization tool i have added 2 more gb ram but it is still locking server :S
Which bit do you want to optimize?
top - 13:11:13 up 33 min, 2 users, load average: 29.96, 13.75, 10.97x
Tasks: 280 total, 40 running, 236 sleeping, 0 stopped, 4 zombie
Cpu(s): 61.1%us, 34.2%sy, 0.0%ni, 0.0%id, 0.0%wa, 0.3%hi, 4.4%si, 0.0%st Mem: 3090588k total, 2481096k used, 609492k free, 16068k buffers
Swap: 2064376k total, 22796k used, 2041580k free, 274104k cached
Your server is pretty busy with such a high load, you might like to throw more RAM and more CPU. 1/3d of the time is spent serving the system itself. The IO waits are zero which is nice but you're still spending a lot of time for the sys and si (software interrupts).
4331 root 18 0 169m 131m 764 S 0.0 4.3 0:01.75 /usr/sbin/clamd
4228 mysql 15 0 356m 53m 3904 S 24.0 1.8 5:42.20 /usr/sbin/mysqld --basedir=/ --datadir=/var/lib/mysql --user=mys
Both of these are sleeping but you have to check why you have clamd running. Do you serve files and require antivirus on the server?
If your server is a LAMP setup, serving php etc. with a mysql backend, you might like to disable that.
Have a look at nmon from IBM and the analysis spreadsheet it has (unfortunately that requires Windows Office, I never managed to get that run successfully under OpenOffice). Nmon will collect the stats and when you feed them to the analyser spreadsheet, you can see which processes have grabbed the disk & CPU and when.
There are other tools out there as well but my preference has been nmon for various other reasons (well, I have to deal with AIX boxes a lot as well and it comes by default with the latest versions and it works perfectly fine with CentOS and Debian/Ubuntu as well)..
You can run nmon with -t option (capacity planning, 15 min samples for a day) or with customized options (don't forget -t for spreadsheet option).