Serverload high, what should I do?

faeronsayn

Well-known member
So I have about 400+ concurrent users online on my site. I was simply wondering if this type of server load is normal for that many users at one time.

Capture.webp


So is this okay?

My VPS specs are
2-3ghz 1 core
1gb of Ram
40gb of HD
3tb of Bandwidth

Also I am using Apache, no Nginx or anything, but it still seems that these loads are quite high no?

Do these loads seem normal?
 
Run these via ssh and post back the results.

service httpd status
top -n1
vmstat 5 5
 
Here is a screen shot, and if you need the text based, its at the bottom.


ScreenShotforServerloadxenForo.webp
Run these via ssh and post back the results.

service httpd status
top -n1
vmstat 5 5

Current Time: Thursday, 05-Jan-2012 17:59:15 EST
Restart Time: Monday, 02-Jan-2012 01:54:23 EST
Parent Server Generation: 46
Server uptime: 3 days 16 hours 4 minutes 51 seconds
Total accesses: 3954237 - Total Traffic: 62.0 GB
CPU Usage: u.26 s.48 cu156.98 cs0 - .0497% CPU load
12.5 requests/sec - 205.2 kB/second - 16.5 kB/request
22 requests currently being processed, 14 idle workers

C_.C_K.K___WWC.._CKK_W__K._.KW_.K._KW.W...W.K.W_......_..C......
................................................................
................................................................
................................................................

Scoreboard Key:
"_" Waiting for Connection, "S" Starting up, "R" Reading Request,
"W" Sending Reply, "K" Keepalive (read), "D" DNS Lookup,
"C" Closing connection, "L" Logging, "G" Gracefully finishing,
"I" Idle cleanup of worker, "." Open slot with no current process
-bash-3.2# top -n1
top - 17:59:15 up 3 days, 16:05, 1 user, load average: 1.34, 1.36, 1.47
Tasks: 78 total, 1 running, 76 sleeping, 0 stopped, 1 zombie
Cpu(s): 21.4%us, 4.3%sy, 0.0%ni, 73.3%id, 0.9%wa, 0.0%hi, 0.0%si, 0.0%st
Mem: 4194304k total, 434044k used, 3760260k free, 0k buffers
Swap: 0k total, 0k used, 0k free, 0k cached

PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
7275 nobody 16 0 9604 3056 1500 S 2.0 0.1 0:00.01 httpd
1 root 15 0 2156 660 572 S 0.0 0.0 0:00.86 init
1142 root 15 -4 2260 560 344 S 0.0 0.0 0:00.00 udevd
1256 root 19 0 32696 564 464 S 0.0 0.0 0:00.00 brcm_iscsiuio
1529 root 16 0 1812 572 480 S 0.0 0.0 0:00.72 syslogd
1589 named 18 0 71116 4052 1992 S 0.0 0.1 1:01.52 named
1607 root 15 0 7204 1064 664 S 0.0 0.0 0:00.01 sshd
1615 root 17 0 2832 860 692 S 0.0 0.0 0:00.00 xinetd
1627 root 18 0 3712 1288 1124 S 0.0 0.0 0:00.00 mysqld_safe
1684 mysql 15 0 176m 75m 4752 S 0.0 1.8 473:50.23 mysqld
3153 mailnull 15 0 10360 1188 696 S 0.0 0.0 0:00.32 exim
3215 root 15 0 37280 31m 2484 S 0.0 0.8 0:07.04 spamd
3242 root 15 0 9472 4136 2704 S 0.0 0.1 0:33.03 httpd
3249 root 15 0 6476 1476 1120 S 0.0 0.0 0:00.22 pure-ftpd
3251 root 15 0 6204 1232 988 S 0.0 0.0 0:00.08 pure-authd
3259 root 15 0 4496 1128 560 S 0.0 0.0 0:00.40 crond
3293 xfs 18 0 3392 1104 736 S 0.0 0.0 0:00.00 xfs
 
You could probably help things a lot by putting in a cache such as APC, but running a 1 core cpu on 1gb ram with 400+ users is gonna be pushing your resources pretty thin anyway.
 
You could probably help things a lot by putting in a cache such as APC, but running a 1 core cpu on 1gb ram with 400+ users is gonna be pushing your resources pretty thin anyway.
Well I get 1 core thats dedicated, in total i get 4 cores, 1 is dedicated to me, 3 are shared.

Also its not 400+ users, its 400 people, so users + guests gets me about 400 + people online.
 
Guests query your db just about the same (or the same) as logged in users in most cases.

Your stats and load look good to me. Your perception of speed could have to do with other things, such as the path between you and your server. Use google webmaster tools to see how fast your server actually serves.

Some basic tips - turn off httpd logging (apache logging) if you don't use it. Most folks use google analytics these days, so no need to keep a big and slow server log.

Just to give you some comparions - I previously had a dual 3.0 pentium for my dedicated server - that would start slowing down slightly at about 450-500 users and get really slow at about 600.

I now have a 4-core dedicated (2.5 ghz) server and it basically runs perfectly - with only a 1 load - at even 700 users.

It seems that any problems you might have will be because you are starting to push the envelope. That's usually a good thing, as it means your site is popular!
 
Guests query your db just about the same (or the same) as logged in users in most cases.

Your stats and load look good to me. Your perception of speed could have to do with other things, such as the path between you and your server. Use google webmaster tools to see how fast your server actually serves.

Some basic tips - turn off httpd logging (apache logging) if you don't use it. Most folks use google analytics these days, so no need to keep a big and slow server log.

Just to give you some comparions - I previously had a dual 3.0 pentium for my dedicated server - that would start slowing down slightly at about 450-500 users and get really slow at about 600.

I now have a 4-core dedicated (2.5 ghz) server and it basically runs perfectly - with only a 1 load - at even 700 users.

It seems that any problems you might have will be because you are starting to push the envelope. That's usually a good thing, as it means your site is popular!



How would I go about disabling HTTDP logging? Can this be done through WHM ?

Also since now I have APC enabled and all, should I be checking off Minify CSS ? and Fetching Templates as Files ? Would that help with my site's performance?
 
I don't use a control panel - so in my case I have to turn off server logging by commenting out the various places where it is enabled. You should ask your host how to do it - it's probably simple through your control panel.
I don't have knowledge of the other stuff, but doubt it will make that much difference. Generally, a server load of less than double the amount of processors you are using will still have very good performance. Often it can be much higher.

Your server load of less than 2 should be quick. Again, you have to be sure that it is slow from other places, not just from your house. Don't start fixing problems which may not be real....
 
How would I go about disabling HTTDP logging? Can this be done through WHM ?

Also since now I have APC enabled and all, should I be checking off Minify CSS ? and Fetching Templates as Files ? Would that help with my site's performance?

Wait, you had minify enabled without a cache? That would have been causing a huge server load.
 
Wait, you had minify enabled without a cache? That would have been causing a huge server load.

What ChemicalKicks said, I should have clarified my self a little further. But yes its not enabled and now that I have APC on and identified in my config, I was wondering if enabling Minify CSS and Fetching Templates as Files would help the performance of my site at all.
 
What ChemicalKicks said, I should have clarified my self a little further. But yes its not enabled and now that I have APC on and identified in my config, I was wondering if enabling Minify CSS and Fetching Templates as Files would help the performance of my site at all.
Yes, turn both options on. :)
 
How would I go about disabling HTTDP logging? Can this be done through WHM ?

Also since now I have APC enabled and all, should I be checking off Minify CSS ? and Fetching Templates as Files ? Would that help with my site's performance?
To disable Apache Logging go to /usr/local/apache/conf/httpd.conf and right around line 44 comment out
Code:
ErrorLog "logs/error_log"
 
Top Bottom