Welcome to the JaguarPC Community
JaguarPC
Sales: (888) 338-5261
Support: (888)-551-3050
Results 1 to 7 of 7

This is a discussion on Server load high after optamization in the VPS & Dedicated forum
Ok I changed the MSQL file and the APACHE config as follows; APACHE Code: Timeout 200 KeepAlive On MaxKeepAliveRequests 200 KeepAliveTimeout 3 MinSpareServers 5 MaxSpareServers ...

  1. #1
    JPC Senior Member
    Join Date
    Aug 2006
    Posts
    61

    Server load high after optamization

    Ok I changed the MSQL file and the APACHE config as follows;


    APACHE

    Code:

    Timeout 200
    KeepAlive On
    MaxKeepAliveRequests 200
    KeepAliveTimeout 3
    MinSpareServers 5
    MaxSpareServers 15
    StartServers 5
    MaxClients 50 "They stated to make this 20 but it sounds to low a number?"
    MaxRequestsPerChild 2000
    HostnameLookups Off




    MYSQL

    [mysqld]
    max_connections = 400
    key_buffer = 16M
    myisam_sort_buffer_size = 32M
    join_buffer_size = 1M
    read_buffer_size = 1M
    sort_buffer_size = 2M
    table_cache = 1024
    thread_cache_size = 286
    interactive_timeout = 25
    wait_timeout = 1000
    connect_timeout = 10
    max_allowed_packet = 16M
    max_connect_errors = 10
    query_cache_limit = 1M
    query_cache_size = 16M
    query_cache_type = 1
    tmp_table_size = 16M
    skip-innodb

    [mysqld_safe]
    open_files_limit = 8192

    [mysqldump]
    quick
    max_allowed_packet = 16M

    [myisamchk]
    key_buffer = 32M
    sort_buffer = 32M
    read_buffer = 16M
    write_buffer = 16M


    My original config was;



    Mysql


    [mysqld]
    set-variable = max_connections=500
    safe-show-database




    APACHE

    #
    # Timeout: The number of seconds before receives and sends time out.
    #
    Timeout 300

    #
    # KeepAlive: Whether or not to allow persistent connections (more than
    # one request per connection). Set to "Off" to deactivate.
    #
    KeepAlive On

    #
    # MaxKeepAliveRequests: The maximum number of requests to allow
    # during a persistent connection. Set to 0 to allow an unlimited amount.
    # We recommend you leave this number high, for maximum performance.
    #
    MaxKeepAliveRequests 100

    #
    # KeepAliveTimeout: Number of seconds to wait for the next request from the
    # same client on the same connection.
    #
    KeepAliveTimeout 15

    #
    # Server-pool size regulation. Rather than making you guess how many
    # server processes you need, Apache dynamically adapts to the load it
    # sees --- that is, it tries to maintain enough server processes to
    # handle the current load, plus a few spare servers to handle transient
    # load spikes (e.g., multiple simultaneous requests from a single
    # Netscape browser).
    #
    # It does this by periodically checking how many servers are waiting
    # for a request. If there are fewer than MinSpareServers, it creates
    # a new spare. If there are more than MaxSpareServers, some of the
    # spares die off. The default values are probably OK for most sites.
    #
    MinSpareServers 5
    MaxSpareServers 10

    #
    # Number of servers to start initially --- should be a reasonable ballpark
    # figure.
    #
    StartServers 5

    #
    # Limit on total number of servers running, i.e., limit on the number
    # of clients who can simultaneously connect --- if this limit is ever
    # reached, clients will be LOCKED OUT, so it should NOT BE SET TOO LOW.
    # It is intended mainly as a brake to keep a runaway server from taking
    # the system with it as it spirals down...
    #
    MaxClients 150

    #
    # MaxRequestsPerChild: the number of requests each child process is
    # allowed to process before the child dies. The child will exit so
    # as to avoid problems after prolonged use when Apache (and maybe the
    # libraries it uses) leak memory or other resources. On most systems, this
    # isn't really needed, but a few (such as Solaris) do have notable leaks
    # in the libraries. For these platforms, set to something like 10000
    # or so; a setting of 0 means unlimited.
    #
    # NOTE: This value does not include keepalive requests after the initial
    # request per connection. For example, if a child process handles
    # an initial request and 10 subsequent "keptalive" requests, it
    # would only count as 1 request towards this limit.
    #
    MaxRequestsPerChild 0

    I see some improvement while surfing my website, however the server load now is much higher than I have ever seen it. Is the optimization supposed to cause higher server load?

    I just checked mysql/cpu/,memory usqage on WHM and I get the following information;



    mysite.net 10.88 0.00 0.4
    Top Process %CPU 20.0 [php-cgi]
    Top Process %CPU 17.0 [php-cgi]
    Top Process %CPU 13.0 /usr/bin/php-cgi vbseo.php
    myseccondsite.com 1.61 0.04 0.6
    Top Process %CPU 6.5 /usr/bin/php-cgi cron.php
    Top Process %CPU 1.2 /usr/bin/php-cgi cron.php
    mysql 0.98 0.20 0.0
    Top Process %CPU 1.0 /usr/sbin/mysqld --basedir/ --datadir/var/lib/mysql --usermysql --pid-file/var/lib/mysql/vps.myserver.com.pid --skip-external-locking
    Top Process %CPU 0.9 /usr/sbin/mysqld --basedir/ --datadir/var/lib/mysql --usermysql --pid-file/var/lib/mysql/vps.myserver.com.pid --skip-external-locking
    root 0.58 1.12 1.8
    Top Process %CPU 0.8 /usr/bin/perl /scripts/restartsrv_clamd --check
    n 0.00 0.00 0.0

    Any Idea on how to reduce server load while keeping the sites fast? I am afraid that a backup will bring the VPS to its knees. Currently I have 537 mb I think of ram on the VPS.
    Last edited by Redemption; 12-28-2007 at 10:31 PM.

  2. #2
    the Windlord Gwaihir's Avatar
    Join Date
    Jun 2002
    Posts
    2,562
    Quote Originally Posted by Redemption View Post
    however the server load now is much higher than I have ever seen it. Is the optimization supposed to cause higher server load?

    I just checked mysql/cpu/,memory usqage on WHM and I get the following information;

    mysite.net 10.88 0.00 0.4
    What makes you say load is high? I've not seen the insides of WHM, but this looks like it reports the standard *nix load averages (number of threads in queue) for the past 1, 5, and 15 minutes. If they are, the machine is not terribly loaded at all. It doesn't matter much what that first number spikes to, as long as the other two don't move.

    I'm also not sure that on a VPS WHM is the place to look for such info. WHM doesn't know about the VPS situation. Doesn't the VPS's control panel come with such numbers as well? If so they will be much more reliable.
    Regards,

    Wim Heemskerk
    ---
    Visit MeCCG.net - Cardgaming in J.R.R. Tolkien's Middle-earth
    And Gwaihir.net - The Middle-earth CCG store

  3. #3
    JPC Senior Member
    Join Date
    Aug 2006
    Posts
    61
    WHM shows apache on red as servvice and virtuozzo shows the following usage of resources.


    CPU Usage
    Resource Capacity
    CPU The resource is in Green Zone


    4.0%
    Load Average 0.44, 0.67, 0.76
    System Usage
    Resource Capacity
    System The resource is in Green Zone



    79.38%
    I have never seen the system usage past 45 percent.

  4. #4
    JPC Senior Member
    Join Date
    Aug 2006
    Posts
    61
    I rebooted server and now it appears to be back to normal!

  5. #5
    JPC Senior Member
    Join Date
    Aug 2006
    Posts
    61
    Anyone has an idea what is this little criter? It is a mysql process but I am curious about the --skip-external-locking part.


    /usr/sbin/mysqld --basedir=/ --datadir=/var/lib/mysql --user=mysql --pid-file=/var/lib/mysql/vps.mysite.com.pid --skip-external-locking
    It seems to eat up the most of my memory.

  6. #6
    JPC Dream Team JPC-Veena's Avatar
    Join Date
    Sep 2002
    Posts
    572
    Redemption,

    That is your mysql process, it is normal. Since you seem to have setup some mysql query caching and other optimizations for mysql, it is normal to see mysql on "top" eating up cpu. You will however notice the performance improvement.
    The load averages you have posted is not at all high, it is very much normal:
    Load Average 0.44, 0.67, 0.76
    Veena K John
    Jaguar Technologies, LLC.

    Helpful Links
    Knowledge Base | Network Status | Current Specials

    Need a Manager?
    (pm) | (email) David, Customer Service Manager

  7. #7
    the Windlord Gwaihir's Avatar
    Join Date
    Jun 2002
    Posts
    2,562
    Quote Originally Posted by Redemption View Post
    It seems to eat up the most of my memory.
    Ah! You count memory too when you speak of load and resource use! But one of the main things you've been doing is reducing the need for (slow) disk access by caching more things in memory instead. So, of course you're using more memory now. Looks like that memory is easily yours to spare, so no problem at all.
    Regards,

    Wim Heemskerk
    ---
    Visit MeCCG.net - Cardgaming in J.R.R. Tolkien's Middle-earth
    And Gwaihir.net - The Middle-earth CCG store

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •