PauGasol
Aug 5 2004, 04:11 PM
Hi,
I have a server with Red Hat 9 and Directadmin, with 300 Domains, the machine works fine. Xeon Dual , 2 gb, two hdds, Zend Performance Suite, optimization etc etc.. the average of load is 1 or 2 in hours of high activity and processes around 200. all ok but appers peak that hang the machine one minutes until the apache is restaring ...
700 or 800 process, i saw this years ago with 7.3 ,,, any ideas? the mysql process are 3 o 4 at same time, the server load normal and in the error_log of apache i only see segmentation fauls (few) sometimes.
any help or similar expirience?
Thanks
Example of peak :
23:18:19 up 1 day, 2:24, 1 user, load average: 29.80, 19.93, 12.42
1120 processes: 1113 sleeping, 6 running, 1 zombie, 0 stopped
CPU0 states: 2.13% user 4.1% system 0.0% nice 0.0% iowait 93.3% idle
CPU1 states: 1.15% user 1.6% system 0.0% nice 0.0% iowait 96.12% idle
CPU2 states: 2.12% user 1.14% system 0.0% nice 0.0% iowait 95.8% idle
CPU3 states: 2.0% user 1.13% system 0.0% nice 0.0% iowait 96.3% idle
Mem: 2063892k av, 2048312k used, 15580k free, 0k shrd, 34696k buff
1310168k actv, 278712k in_d, 43620k in_c
Swap: 4144760k av, 963388k used, 3181372k free 315800k cached
eddy2099
Aug 5 2004, 08:28 PM
Although Zend Optimiser would reduce bandwidth, the act of compressing and decompressing streams would inevitable be more CPU intensive than without it.
What are you running on your machine ? Having tons of MySQL processes would lead me to believe you are running some dynamic contents on your machines. Scripts and DB access would inevitably bring up the CPU load.
PauGasol
Aug 8 2004, 05:01 PM
QUOTE (eddy2099)
Although Zend Optimiser would reduce bandwidth, the act of compressing and decompressing streams would inevitable be more CPU intensive than without it.
What are you running on your machine ? Having tons of MySQL processes would lead me to believe you are running some dynamic contents on your machines. Scripts and DB access would inevitably bring up the CPU load.
Its Zend Performance Suite 4.0.0 this help a lot of but the peaks continue.. yes the machine have mysql processes but i think this peaks are not normal. how can i see the memory of all and if new 2 gb more of ram.
thanks
bsykes
Aug 9 2004, 02:32 PM
You could ssh into the server and run the command "free". This should show you how much total RAM you have, and how much is used/unused/swapped.
Also, of course, there is the veneralbe "top" command. Also, since you are running mysql, you could also use mytop (but you need to download and install that).
Another good tool is vmstat, although you need to ignore the first line of output.
I might also suggest finding the my-huge.cnf file on your server and moving that to /etc/my.cnf and seeing if that helps.
Monk
Aug 10 2004, 01:27 AM
The problem is apache. You should try these options, ie;
MaxRequestsPerChild 4096 # Really important
KeepAlive Off # Setting this on could impact server performance.
Some more hints, you could try compiling apache with
-O6 -DBUFFERED_LOGS -fomit-frame-pointer
YMMV, tho.
PauGasol
Aug 10 2004, 06:24 AM
Many thanks for the info and replys, i will try this improvements and keep updated the thread with the results.
PauGasol
Aug 10 2004, 09:37 AM
I installed mytop, example of mytop with huge my.cnf :
MySQL on localhost (4.0.20-standard-log) up 0+00:51:56 [17:35:10]
Queries: 387.6k qps: 127 Slow: 1.0 Se/In/Up/De(%): 81/01/08/01
qps now: 136 Slow qps: 0.0 Threads: 2 ( 1/ 7) 80/00/06/01
Cache Hits: 211.1k Hits/s: 69.4 Hits now: 80.2 Ratio: 66.8% Ratio now: 74.3%
Key Efficiency: 98.8% Bps in/out: 15.8k/136.0k Now in/out: 12.4k/63.9k
Id User Host/IP DB Time Cmd Query or State
-- ---- ------- -- ---- --- ----------
12205 da_admin localhost test 0 Query show full process
12869 him666_hi localhost him666_him 1 Sleep
I think all is OK, the procces died quickly the more number of querys I can see at same time are only 4 or 5. by this i think de mysql is OK.
I change also the maxrequestperchild to 4092... but i had other peak with this changes applied
My current top is :
17:37:42 up 2 days, 17:17, 1 user, load average: 2.76, 2.49, 2.84
177 processes: 174 sleeping, 1 running, 2 zombie, 0 stopped
CPU0 states: 15.3% user 14.1% system 0.0% nice 0.0% iowait 69.4% idle
CPU1 states: 7.1% user 5.2% system 0.0% nice 0.0% iowait 87.0% idle
CPU2 states: 7.1% user 4.4% system 0.0% nice 0.0% iowait 87.3% idle
CPU3 states: 4.2% user 1.3% system 0.0% nice 0.0% iowait 93.3% idle
Mem: 2063892k av, 1981592k used, 82300k free, 0k shrd, 81556k buff
1289016k actv, 273492k in_d, 39596k in_c
Swap: 4144760k av, 205176k used, 3939584k free 1106356k cached
ooen
Dec 24 2005, 01:00 AM
QUOTE (Monk)
The problem is apache. You should try these options, ie;
MaxRequestsPerChild 4096 # Really important
KeepAlive Off # Setting this on could impact server performance.
Some more hints, you could try compiling apache with
-O6 -DBUFFERED_LOGS -fomit-frame-pointer
YMMV, tho.
Is MaxRequestsPerChild the one inside <IfModule prefork.c></IfModule> like the following?
CODE
<IfModule prefork.c>
StartServers 8
MinSpareServers 5
MaxSpareServers 20
MaxClients 256
MaxRequestsPerChild 4000
</IfModule>
Also should we remove parameters specific to worker.c?