Posted by Animedude, 11-12-2007, 04:20 PM | Yesterday, I notice the server is really slow and it takes awhile to connect and cause connection timed out. So I changed the default apache setting to
StartServers 16
MinSpareServers 10
MaxSpareServers 40
MaxClients 250
MaxRequestsPerChild 2000
and it seems to be normal again. Right now there is 2000 visitors going to the website and possibly 3000/hour during peek hours. The page is in php/mysql, 4 mysql queries per page.
When I goto CPU/MEMORY/MYSQL usage in WHM, there is a red color bar and the information is
User Domain %CPU %MEM MySQL Processes
nobody 39.11 139.64 0.0
139.64%ram
The server specs is
Processor Information
Processor #1 Vendor: GenuineIntel
Processor #1 Name: Intel(R) Core(TM)2 CPU 6320 @ 1.86GHz
Processor #1 speed: 1862.000 MHz
Processor #1 cache size: 4096 KB
Processor #2 Vendor: GenuineIntel
Processor #2 Name: Intel(R) Core(TM)2 CPU 6320 @ 1.86GHz
Processor #2 speed: 1862.000 MHz
Processor #2 cache size: 4096 KB
Memory Information
Memory: 1015156k/1031168k available (2043k kernel code, 14404k reserved, 846k data, 232k init, 112872k highmem)
Physical Disks
sda: Write Protect is off
sda: Mode Sense: 00 3a 00 00
sda: Write Protect is off
sda: Mode Sense: 00 3a 00 00
Current Memory Usage
total used free shared buffers cached
Mem: 1017280 929648 87632 0 28292 138916
-/+ buffers/cache: 762440 254840
Swap: 2096472 84416 2012056
Total: 3113752 1014064 2099688
Current Disk Usage
Filesystem Size Used Avail Use% Mounted on
/dev/sda5 286G 4.4G 267G 2% /
/dev/sda1 99M 15M 80M 16% /boot
tmpfs 497M 0 497M 0% /dev/shm
/dev/sda3 996M 40M 905M 5% /tmp
Is the server fine as of right now or can I tweak it or add a extra stick of ram because it seems there are only 80mb of free ram?
|
Posted by blessen, 11-12-2007, 11:16 PM | If nobody (The apache user) is taking so much of resource then you need to get your apache optimised by experts. After that you monitor your server during peak hours for 2 or 3 days and see the server performance. See if the performance have improved or not.... After we can think about purchasing RAM...
|
Posted by david510, 11-12-2007, 11:35 PM | From the output of the following command, see the value of the RSS column in the last line. This line contains the apache child process that uses the maximum memory. The value of RSS will be in Kb. Multiply this with the total number of apache connections and you will get the maximum amount of memory the server can expect when all apache processes uses this much memory. With this you can have an estimate.
ps -ylC httpd --sort:rss
|
Posted by Animedude, 11-13-2007, 09:15 AM | Total amount of apache connections is MaxClient?
The highest RSS is 7756.
|
Posted by david510, 11-13-2007, 11:52 AM | To get the total number of current apache child processes type the following command.
ps -ylC httpd | wc -l
|
Posted by Animedude, 11-13-2007, 09:55 PM | It is peak time right now and it is fluctuating between 130 - 200 and max rss is 8mb. So I do need new ram?
To blessen: I can get a ram upgrade for $50 and if I get it tweaked it will cost me between $25-$40.
|
Posted by Orien, 11-13-2007, 09:59 PM | What are your keep-alive settings?
|
Posted by Animedude, 11-14-2007, 12:38 AM | Timeout 100
KeepAlive On
MaxKeepAliveRequests 120
KeepAliveTimeout 8
|
Posted by Orien, 11-14-2007, 01:17 AM | Bump timeout to something lower like 15. Change keepalivetimeout to something lower like 2-3 and increase maxkeepaliverequests to 200 or so.
See if that helps somewhat. It's all a numbers game and you just have to see by experimenting what works best.
|
Posted by Animedude, 11-16-2007, 05:34 AM | It seems to lower the memory usage by a lot. I'll see what happen during tomorrow's peak time. Is it normal for a command analog sucking up 60% of the ram? I instantly killed it because it is chewing on so much ram. Is it possible to disable analog?
|
|
Add to Favourites
Print this Article |