High Server Load Issues

Discussion in 'Site & Server Administration' started by powerbfore, Jul 2, 2012.

  1. #1
    Alright, so I've noticed through checking via SSH, mysqld sometimes would go EXTREMELY high on cpu usage. So I addressed this issue with my providers and they changed the settings to:

    tmp_table_size=64M
    max_heap_table_size=64M
    query_cache_type=1
    query_cache_limit=1M
    query_cache_size =64M
    thread_cache_size = 128
    table_cache=160
    key_buffer=128M
    innodb_buffer_pool_size = 128M

    Now, the CPU usage is never above 30% or so, which is great. And the CPU load average wont go drastically high anymore.
    However, now mysqld will instead, use EXTREME amounts of memory, hitting my limit.
    How would I address this problem? Buy more RAM (I have 2GB atm)? Or virtual processor..?
     
    powerbfore, Jul 2, 2012 IP
  2. InnovusHost

    InnovusHost Peon

    Messages:
    136
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #2
    You need to add more RAM for MySQL to use. Your provider is giving MySQL more RAM to use which decreased the load since it can process the work faster.
     
    InnovusHost, Jul 2, 2012 IP
  3. aqualabs

    aqualabs Peon

    Messages:
    24
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Here are few steps you could perform to get more information on the issue:

    1. to use mysqltuner.pl
    2. to enable slow query log
    3. to investigate slow queries
     
    aqualabs, Jul 2, 2012 IP
  4. Harijith

    Harijith Peon

    Messages:
    20
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Try to optimize your database. Enable slow query log which will help a lot. :)
     
    Harijith, Jul 2, 2012 IP
  5. dom19

    dom19 Active Member

    Messages:
    344
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    53
    #5
    I think you better add more ram on your server
     
    dom19, Jul 2, 2012 IP
  6. RHS-Chris

    RHS-Chris Well-Known Member

    Messages:
    1,007
    Likes Received:
    35
    Best Answers:
    10
    Trophy Points:
    150
    #6
    Hello there,

    What is your max_connections variable set to? If you have this inflated, it will use up more RAM for connections that never get used. I would also suggest using a couple of tuning scripts, as well as repairing and optimizing all databases on your server.

    Regards,
    Chris
     
    RHS-Chris, Jul 2, 2012 IP
  7. Hostwinds_Dan

    Hostwinds_Dan Active Member

    Messages:
    149
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    53
    #7
    Usually that is how things work in this regard. When you limit CPU usage, your RAM usage generally rises. When you limit RAM usage, your CPU will go higher. The only way to prevent this cycle is to purchase more of one or the other. The most simple solution, in that case, would be to buy more RAM.
     
    Hostwinds_Dan, Jul 3, 2012 IP
  8. atxsurf

    atxsurf Peon

    Messages:
    2,394
    Likes Received:
    21
    Best Answers:
    1
    Trophy Points:
    0
    #8
    NO, before doing any fine-tuning check mysql slow queries log (enable or change the slowness threshold if you don't see it)
    there might be one sql command in your script that is badly written/not optimized. Multiple users executing that query (with different parameters so it won't cache) would kill the server without a problem
     
    atxsurf, Jul 3, 2012 IP
  9. lonelycrypto

    lonelycrypto Greenhorn

    Messages:
    48
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    16
    #9
    Optimize your database.. Go through the queries..
     
    lonelycrypto, Jul 10, 2012 IP
  10. secureax

    secureax Member

    Messages:
    22
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    38
    #10
    Maybe you want to post more information like CPU and RAM detail ?
     
    secureax, Jul 12, 2012 IP
  11. WordPressBlogNetwork

    WordPressBlogNetwork Member

    Messages:
    29
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    46
    #11
    WordPressBlogNetwork, Jul 19, 2012 IP