1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

vBulletin - server load too high

Discussion in 'vBulletin' started by Bryan, Mar 14, 2006.

  1. #1
    I have a fairly small forum, usually only 10-20 members/guests online at a time. But the past few days, the server load goes up to about 5-10 until I restart apache.

    Anything I can do to lower server load?

    I have since increased the timeout between searches from 15s to 20s. Also changed the search results from 500 to 300.

    Anything else I can do?

    Also, how effective will it be to upgrade server ram from 512mb to 1gb?
     
    Bryan, Mar 14, 2006 IP
  2. GTAce

    GTAce Notable Member

    Messages:
    1,389
    Likes Received:
    78
    Best Answers:
    0
    Trophy Points:
    210
    #2
    Sheesh, I would definitely upgrade your ram.

    Really though, with only 10-20 online at once, you shouldn't have too much of a problem...but yes, upgrade your ram.

    Sounds like you run your own server...why not go with paid hosting elsewhere? You could get a solid account for $5/month and not have to worry about server load with that traffic.
     
    GTAce, Mar 14, 2006 IP
  3. cyanide

    cyanide Peon

    Messages:
    483
    Likes Received:
    26
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Agreed, you can never have enough ram.
    What are the specs of your server? there are plenty of tweaks you can do to optimize your server
    - mysql, apache, php caching, etc...
     
    cyanide, Mar 14, 2006 IP
  4. Nintendo

    Nintendo ♬ King of da Wackos ♬

    Messages:
    12,890
    Likes Received:
    1,064
    Best Answers:
    0
    Trophy Points:
    430
    #4
    Try to optimze Apache and mySQL. For Apache, the best I've found is...

    Timeout 50
    KeepAlive On
    MaxKeepAliveRequests 120
    KeepAliveTimeout 10
    StartServers 16
    MinSpareServers 10
    MaxSpareServers 20
    MaxClients 125
    MaxRequestsPerChild 5000
     
    Nintendo, Mar 14, 2006 IP
  5. Bryan

    Bryan Active Member

    Messages:
    306
    Likes Received:
    15
    Best Answers:
    0
    Trophy Points:
    58
    #5
    It's a 2.8ghz with 512mb ram.
     
    Bryan, Mar 14, 2006 IP
  6. Bryan

    Bryan Active Member

    Messages:
    306
    Likes Received:
    15
    Best Answers:
    0
    Trophy Points:
    58
    #6
    I should have mentioned I run a bunch of sites on this server, but the vbulletin one is the only cpu intensive one.

    The traffic is fairly high though, usually around 5-6 mbps.
     
    Bryan, Mar 14, 2006 IP
  7. Bryan

    Bryan Active Member

    Messages:
    306
    Likes Received:
    15
    Best Answers:
    0
    Trophy Points:
    58
    #7
    Any idea how to do that? I'm a complete idiot when it comes to this type of stuff.
     
    Bryan, Mar 14, 2006 IP
  8. exam

    exam Peon

    Messages:
    2,434
    Likes Received:
    120
    Best Answers:
    0
    Trophy Points:
    0
    #8
    Open up your httpd.conf file and edit those directives.
     
    exam, Mar 14, 2006 IP
  9. Bryan

    Bryan Active Member

    Messages:
    306
    Likes Received:
    15
    Best Answers:
    0
    Trophy Points:
    58
    #9
    I am using direct admin and this is what it lists for each site.

    # Auto generated apache config file by DirectAdmin version 1.23.1
    # Modifying this file is not recommended as any changes you make will be
    # overwritten when the user makes any changes to his/her website

    # Frontpage requires these parameters in every httpd.conf file or else
    # it won't work.
    Port 80
    ServerRoot /etc/httpd


    <VirtualHost xx.xxx.xx.xxx>


    ServerName www.domain.com
    ServerAlias www.domain.com domain.com
    ServerAdmin
    DocumentRoot /home/admin/domains/domain.com/public_html
    ScriptAlias /cgi-bin/ /home/admin/domains/domain.com/public_html/cgi-bin/

    UseCanonicalName OFF

    User admin
    Group admin
    CustomLog /var/log/httpd/domains/domain.com.bytes bytes
    CustomLog /var/log/httpd/domains/domain.com.log combined
    ErrorLog /var/log/httpd/domains/domain.com.error.log

    <Directory /home/admin/domains/domain.com/public_html>
    Options +Includes -Indexes
    php_admin_flag engine ON
    php_admin_flag safe_mode OFF
    php_admin_value sendmail_path '/usr/sbin/sendmail -t -i -f '
    </Directory>



    #php_admin_value open_basedir /home/admin/:/tmp/:/var/www/:/usr/local/lib/php/:/etc/virtual/

    </VirtualHost>
     
    Bryan, Mar 14, 2006 IP
  10. Nintendo

    Nintendo ♬ King of da Wackos ♬

    Messages:
    12,890
    Likes Received:
    1,064
    Best Answers:
    0
    Trophy Points:
    430
    #10
    There should be one config file that covers the whole server. You don't need to touch the site files.

    su root

    Once you find where the file is for the whole server, go to that directory,

    cd /path_to_directory/

    something like

    cd /etc/httpd/conf/

    then

    pico httpd.conf

    Edit the file, save and close it, then restart apache. BUT, do one thing wrong, and all the domains crash until you fix it. Just pressing return in the wrong place while editing the file can crash it!!!
     
    Nintendo, Mar 14, 2006 IP
  11. cyanide

    cyanide Peon

    Messages:
    483
    Likes Received:
    26
    Best Answers:
    0
    Trophy Points:
    0
    #11
    After you have saved the httd.conf file, run
     /usr/local/apache/bin/apachectl configtest
    Code (markup):
    This will check to make sure the syntax is okay. If it is, then most likely you edited the file okay

    You should post up your my.cnf file which is the mysql config file
     
    cyanide, Mar 14, 2006 IP
  12. RectangleMan

    RectangleMan Notable Member

    Messages:
    2,825
    Likes Received:
    132
    Best Answers:
    0
    Trophy Points:
    210
    #12
    I suggest you try KeepAlive OFF. It usually just keeps connections open that you don't need.
     
    RectangleMan, Mar 14, 2006 IP
  13. Bryan

    Bryan Active Member

    Messages:
    306
    Likes Received:
    15
    Best Answers:
    0
    Trophy Points:
    58
    #13
    No idea what I'm supposed to do. Am I supposed to do this through root? Or can I do it through Direct Admin?
     
    Bryan, Mar 15, 2006 IP
  14. MatthewN

    MatthewN Well-Known Member

    Messages:
    859
    Likes Received:
    30
    Best Answers:
    0
    Trophy Points:
    195
    #14
    I would increase RAM too. 512Mb isnt too much and especially with you running other sites on the box too.

    In vBulletin there are a number of other options in the huge options list that talk about performance problems if you run a busy board. 20 online is not busy, but with that low amount of RAM it would be busy for that particular server... so go through the other options and see what others can be switched on or off.
     
    MatthewN, Mar 15, 2006 IP
  15. Nintendo

    Nintendo ♬ King of da Wackos ♬

    Messages:
    12,890
    Likes Received:
    1,064
    Best Answers:
    0
    Trophy Points:
    430
    #15
    Using SSH and then loging in as su root. Who hosts your server? Do you have access to root?
     
    Nintendo, Mar 15, 2006 IP
  16. gprime

    gprime Guest

    Messages:
    85
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    0
    #16
    In terms of ways to cut down on strain, remove unneeded queries.
     
    gprime, Mar 15, 2006 IP
  17. joeychgo

    joeychgo Notable Member

    Messages:
    3,368
    Likes Received:
    321
    Best Answers:
    0
    Trophy Points:
    255
    #17
    joeychgo, Mar 16, 2006 IP
    Bryan likes this.
  18. Bryan

    Bryan Active Member

    Messages:
    306
    Likes Received:
    15
    Best Answers:
    0
    Trophy Points:
    58
    #18
    Thanks for the article, very helpful.

    I think the best change was the gzip one, I had no idea about that since vbulletin recommends 1.
     
    Bryan, Mar 18, 2006 IP