1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Serverload high, what should I do?

Discussion in 'Server Configuration and Hosting' started by faeronsayn, Jan 3, 2012.

  1. faeronsayn

    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.


    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?
  2. Brent W

    Brent W Well-Known Member

  3. faeronsayn

    faeronsayn Well-Known Member

    No idea, I am not a server person, so I seriously don't know what that is even after looking through that link.

    Attached Files:

  4. faeronsayn

    faeronsayn Well-Known Member

    Any idea guys ?
  5. Slavik

    Slavik XenForo Moderator Staff Member

    Run these via ssh and post back the results.

    service httpd status
    top -n1
    vmstat 5 5
  6. faeronsayn

    faeronsayn Well-Known Member

    Here is a screen shot, and if you need the text based, its at the bottom.

    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


    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

    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
  7. Slavik

    Slavik XenForo Moderator Staff Member

    Everything looks fine to be honest.
  8. faeronsayn

    faeronsayn Well-Known Member

    Really? Well thats weird, not sure why my site is slow then, would using nginx help at all ?
  9. Slavik

    Slavik XenForo Moderator Staff Member

    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.
  10. faeronsayn

    faeronsayn Well-Known Member

    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.
  11. craigiri

    craigiri Well-Known Member

    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!
  12. faeronsayn

    faeronsayn Well-Known Member

    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?
  13. craigiri

    craigiri Well-Known Member

    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....
    faeronsayn likes this.
  14. Slavik

    Slavik XenForo Moderator Staff Member

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

    ChemicalKicks Well-Known Member

    Checking off I took as enabling, could be wrong. :)
    faeronsayn likes this.
  16. faeronsayn

    faeronsayn Well-Known Member

    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.
    ChemicalKicks likes this.
  17. ChemicalKicks

    ChemicalKicks Well-Known Member

    Yes, turn both options on. :)
  18. a legacy reborn

    a legacy reborn Well-Known Member

    To disable Apache Logging go to /usr/local/apache/conf/httpd.conf and right around line 44 comment out
    ErrorLog "logs/error_log"
    faeronsayn likes this.
  19. faeronsayn

    faeronsayn Well-Known Member

    Thank you, just wondering you use this "#" to comment things out right ?
  20. ChemicalKicks

    ChemicalKicks Well-Known Member

    If you look in the file you're editing you'll probably see a load of other stuff commented out, just follow the flow :)
    a legacy reborn and faeronsayn like this.

Share This Page