View Full Version : high load + very slow
BestBoard
10-24-2006, 02:12 PM
hello all,
in my server there is big forum with over 300 users + and when the forum run my load is 10-20 and my server is very slow.
i use centos 4.2 with apache 1.3.37.
i have dual xeon 3.06Ghz
1gb ddr
here my httpd.conf:
Timeout 20
KeepAlive On
MaxKeepAliveRequests 0
KeepAliveTimeout 15
MinSpareServers 50
MaxSpareServers 100
StartServers 10
MaxClients 1000
MaxRequestsPerChild 1000
plase help me!
thanks all :)
**sorry for my bad english**
nobaloney
10-24-2006, 06:32 PM
You don't say anything about what forum software you're using.
What's the output of your top command, the first line through the line that starts with "Swap:"?
My guess is you don't have enough memory and you're into swap memory.
If you're into swap memory you'll get that kind of result and the only way to solve the problem is more main memory.
Jeff
DannyTip
10-25-2006, 11:48 AM
Something doesn't sound right there.
I have a large forum running off IPB and it has 250+ active users most nights yet load never goes much higher than 1.5 :)
chatwizrd
10-25-2006, 01:35 PM
Does that forum have a tool in the admin section for optimizing the database? Sometimes that can help.
BestBoard
10-25-2006, 02:19 PM
chatwizrd, i am optimized my database and it's don't help.
DannyTip, only in this forum have more 300+ users.
and on my server have 5+ forums.
jlasman, i'm useing invision power board 1.3 final.
here the line with swap:
Swap: 2031608k total, 132196k used, 1899412k free, 21828k cached
thanks.
nobaloney
10-25-2006, 11:28 PM
You're using roughly 130 MB of swap. Swap memory is on disk, and if the forum is in memory that's in swap it could run extremely slow.
If the swap is being used by a program with any kind of heavy usage, every time the program uses any processor time it's moving memory in and out of swap and that takes time.
While 130 MB of swap usage isn't really a lot, it could be the cause of the problem.
When you restart the server it should drop to almost zero. When you do that does the forum run any faster?
Jeff
BestBoard
10-26-2006, 06:28 AM
when i block the forum with 300+ users my load and swap go down
see:
load average: 0.28, 7.08, 12.12
Tasks: 229 total, 1 running, 228 sleeping, 0 stopped, 0 zombie
Cpu(s): 0.2% us, 0.1% sy, 0.0% ni, 99.8% id, 0.0% wa, 0.0% hi, 0.0% si
Mem: 1034492k total, 270116k used, 764376k free, 4240k buffers
Swap: 2031608k total, 39568k used, 1992040k free, 56320k cached
(1min after block)
maybe my server is attack?
i have a kiss firewall, ddos script (after 150 connections the ip get ban).
if i update from 1.3.37 to 2.0.X or 2.2.X it's help?
thanks
nobaloney
10-26-2006, 07:48 AM
I'd consider more memory. I don't know enough about your forum software to tell you if the version you're using has memory leaks. Perhaps ask on their forum.
Jeff
BestBoard
10-26-2006, 07:57 AM
next week i add more 1gb ram.
and i hope it's help :)
thank you for your help :cool:
Originally posted by BestBoard
if i update from 1.3.37 to 2.0.X or 2.2.X it's help?
thanks [/B]
No, It doesn't help.
You have to add more memory.
or reduce memory resource for some service to free up for php eg. mysql
How much resource mysql take showing in #top
for 1GB of memory mysql should use 64-256MB
and you have set too high value this will eat your memory.
Don't try to put 1000 cherries into your mouth in the same time, see how much your mouth can handle and the rest should wait.
Try this at first step and adjust it.
Timeout 60
KeepAlive On
MaxKeepAliveRequests 500
KeepAliveTimeout 5
MinSpareServers 12
MaxSpareServers 32
StartServers 10
MaxClients 450
MaxRequestsPerChild 1000
BestBoard
10-26-2006, 01:03 PM
i update my httpd.conf and now it's better :)
but i don't understnd what with mysql
here from top:
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
1885 mysql 16 0 508m 66m 1740 S 7.0 6.6 0:01.92 mysqld
thanks
Originally posted by BestBoard
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
1885 mysql 16 0 508m 66m 1740 S 7.0 6.6 0:01.92 mysqld
thanks [/B]
It use 508m+66m of your 1G memory
this mean you left < 512M for other services
follow this
http://help.directadmin.com/item.php?id=44
set
thread_concurrency=CPUs x 2 (8 for dual xeon)
then try increase later
key_buffer=64M to 96M
and compare load to 16M
try to keep mysql use ~128M of memory then you will have > 640M for php (~3xxM is for system and others services)
If 640M look not enaugh for php try decrease these value
MaxKeepAliveRequests 450
MinSpareServers 6
MaxSpareServers 24
StartServers 8
MaxClients 300
Then keep your eyes on swap if it's alway use (> 3M) then you need to add more memory (total 2GB should be optimal) then you can increase mysql and php value back
Hope this help :)
Powered by vBulletin™ Version 4.0.4 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.