The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

mySQL 5.0.24 High Server Load, Need Help

Discussion in 'General Discussion' started by ReB, Aug 22, 2006.

  1. ReB

    ReB Member

    Joined:
    Aug 10, 2006
    Messages:
    20
    Likes Received:
    0
    Trophy Points:
    1
    Ever since Cpanel updated to mySQl 5.0.24 my server is having unusual high loads. Before my server load hardly makes to 3.

    Server specs.

    Dual Opteron 246 / 4 GB Ram / Dual SCSI 36 GB Drive


    Current CPU Usage

     
  2. carluk

    carluk Well-Known Member

    Joined:
    Sep 2, 2003
    Messages:
    162
    Likes Received:
    0
    Trophy Points:
    16
    what does the following return:

    Kernel:
    Code:
    uname -a
    
    Usual suspects:
    Code:
    ps aux | grep httpd; ps aux | grep exim; ps aux | grep mysql
    
    Then what's mysql doing?
    Code:
    mysqladmin processlist
    
    Cpanel version:
    Code:
    /usr/local/cpanel/cpanel -V
    
    Also out of interest whats your php and apache versions?
     
  3. ReB

    ReB Member

    Joined:
    Aug 10, 2006
    Messages:
    20
    Likes Received:
    0
    Trophy Points:
    1
    Kernel Version : Linux cp.xxx.com 2.6.9-34.0.1.ELsmp

    ps aux | grep httpd; ps aux | grep exim; ps aux | grep mysql


    Cpanel Version : 10.8.2-STABLE_120

    PHP Version : 4.4.3

    Apache Version : 1.3.37 (Unix)
     
  4. ReB

    ReB Member

    Joined:
    Aug 10, 2006
    Messages:
    20
    Likes Received:
    0
    Trophy Points:
    1
    MySQL Process List

     
  5. carluk

    carluk Well-Known Member

    Joined:
    Sep 2, 2003
    Messages:
    162
    Likes Received:
    0
    Trophy Points:
    16
    Under server status in WHM click "Apache Status" and see what apache it doing.

    I would suggest upgrading to php 4.4.4 which you can do via /scripts/easyapache or probably easier via the WHM interface. Make sure 4.4.3 is de-selected before selecting 4.4.4

    Also do:
    Code:
    /scripts/restartsrv_mysql
    
    Has that resolved your load problems (the mysql restart)?

    If you could post the following also I think you might have a mysql misconfiguration.

    Code:
    cat /etc/my.cnf
    
    Also some information about your system:

    Memory usage:
    Code:
    free -m
    
    edit: my mistake for forgetting about the system information you gave up the first post.
     
  6. ReB

    ReB Member

    Joined:
    Aug 10, 2006
    Messages:
    20
    Likes Received:
    0
    Trophy Points:
    1
    I don't see it the panel? How do you do this?

    Thanks in advance.
     
  7. nickp666

    nickp666 Well-Known Member

    Joined:
    Jan 28, 2005
    Messages:
    770
    Likes Received:
    2
    Trophy Points:
    18
    Location:
    /dev/null
    did you do a kernel upgrade recently? there have been multiple threads here about the 2.6.9-34.0.x.ELsmp kernel and load, increases with mysql, the answer was and is to upgrade to a newer kernel
     
  8. carluk

    carluk Well-Known Member

    Joined:
    Sep 2, 2003
    Messages:
    162
    Likes Received:
    0
    Trophy Points:
    16
    It's under "Software" in WHM called "Apache Update".
     
  9. ReB

    ReB Member

    Joined:
    Aug 10, 2006
    Messages:
    20
    Likes Received:
    0
    Trophy Points:
    1
    /scripts/restartsrv_mysql : didn't solve the problem.

    my.cnf


    free -m

     
  10. AndyReed

    AndyReed Well-Known Member
    PartnerNOC

    Joined:
    May 29, 2004
    Messages:
    2,222
    Likes Received:
    3
    Trophy Points:
    38
    Location:
    Minneapolis, MN
    Not necessarily. Upgrading the Kernel is just one thing to solve high server load issue. It's perfectly normal to have 'spikes' in your Server Load. Peak visitor times, log processing, database backup scripts, automated cron jobs - all can cause 'spikes' in your server load. It's when the server load is constantly above 5.00 - that's the time to start asking questions. To read about the causes of high server load and how to solve it, go to:

    http://www.servertune.com/kbase/security/server_load.html
    http://www.servertune.com/kbase/security/concept.html
     
  11. nickp666

    nickp666 Well-Known Member

    Joined:
    Jan 28, 2005
    Messages:
    770
    Likes Received:
    2
    Trophy Points:
    18
    Location:
    /dev/null
    given recent problems it most likely is the cause (Had the exact same scenario on a server of mine), hence my suggestion to upgrade
     
  12. ReB

    ReB Member

    Joined:
    Aug 10, 2006
    Messages:
    20
    Likes Received:
    0
    Trophy Points:
    1
    kernel update did the trick...it's now 2.6.9-34.0.1.ELsmp

    it's now stable at 2-3...it used to be 0.5-2.0 but that's just fine with me...probably just need a little tweak.

    Thanks for the help guys.
     
  13. carluk

    carluk Well-Known Member

    Joined:
    Sep 2, 2003
    Messages:
    162
    Likes Received:
    0
    Trophy Points:
    16
    Suggestions (not perfect, might need a bit tweaking for 4GB memory and what else you have on the server) based upon your current my.cnf

    Code:
    [mysqld]
    
    max_connect_errors = 10
    max_connections = 250
    max_user_connections = 50
    
    wait_timeout = 15
    connect_timeout = 15
    interactive_timeout = 15
    
    myisam_sort_buffer_size = 128M
    join_buffer_size = 4M
    read_buffer_size = 4M
    sort_buffer_size = 6M
    
    key_buffer = 512M
    table_cache = 1024M
    thread_cache_size = 286M
    max_allowed_packet = 16M
    
    query_cache_limit = 1M
    query_cache_size = 32M
    query_cache_type = 1
    tmp_table_size = 96M
    
    skip-locking
    skip-innodb
    safe-show-database
    tmpdir = /home/tmp
    thread_concurrency=4
    
    [mysqld_safe]
    open_files_limit = 8192
    
    [mysqldump]
    quick
    max_allowed_packet = 16M
    
    [myisamchk]
    key_buffer = 64M
    sort_buffer = 64M
    read_buffer = 16M
    write_buffer = 16M
    
     
  14. ReB

    ReB Member

    Joined:
    Aug 10, 2006
    Messages:
    20
    Likes Received:
    0
    Trophy Points:
    1
    Additional info.

    The server runs only one site...it's a pretty heavy traffic site...average users at peak hours (Normally business hours) would be around 1,000 - 1,200..

    though like i mentioned awhile ago that load was 0.5-2...hardly made 3.0 then suddenly rocketed..

    carluk, i'll experiment with your input. though i must say that i can not use the number for the max_connections. but everything else i taken a note of. thanks.
     
  15. ReB

    ReB Member

    Joined:
    Aug 10, 2006
    Messages:
    20
    Likes Received:
    0
    Trophy Points:
    1
    I guess I spoke too soon.

    This is at peak hours....before load never get past 3 at peak hours. we get same number of visits.
     
  16. robocap

    robocap Well-Known Member

    Joined:
    Nov 6, 2006
    Messages:
    67
    Likes Received:
    0
    Trophy Points:
    6
    Hello
    root@part1 [/]# free -m
    total used free shared buffers cached
    Mem: 1514 1468 45 0 53 396
    -/+ buffers/cache: 1019 494
    Swap: 2047 365 1681
    root@part1 [/]# cat /etc/my.cnf
    [mysqld]
    set-variable = max_connections=500
    safe-show-database
    root@part1 [/]#

    i can config max_connections=500 of where?
    php.ini?

    please Help me

    Thanks
     
  17. brendanrtg

    brendanrtg Well-Known Member

    Joined:
    Oct 4, 2006
    Messages:
    311
    Likes Received:
    0
    Trophy Points:
    16

    /etc/my.cnf
     
Loading...

Share This Page