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.

Weird CPU overload when checking CPU

Discussion in 'General Discussion' started by martynh, Oct 6, 2009.

  1. martynh

    martynh Active Member

    Joined:
    Oct 6, 2009
    Messages:
    32
    Likes Received:
    0
    Trophy Points:
    6
    Hello,

    Im pretty new to having a dedicated server having come from reseller hosting but I have a strange problem and wondering if anyone else has had this?

    I have got a core2 quad core server with 2 GB RAM and is 4 days old, I have transfer all my clients to the server which there are no more than 40 accounts. this morning I did a rutine check that I always do and thats check "CPU/Memory/MySQL Usage" to see how its been going thoughout the night and I see a bit of a load show, but I when check the "Show Current CPU Usage next" it gives a load of 95.0+ and 80+ memory and I have to get my server reboot via the datacentre.

    When I check "top" command in ssh I see a very high load & memory usage from kswapd0

    Its really weird because the server is running 100% fine now with a load of 0.1 with memory at 19.5% but if I go to check the usage again kswapd0 will pop back and overload which causes all the other software to load too



    Is there a problem with my server or cpanel, I have had the RAM modules changed but with no difference or is there a better way of getting usage details

    thanks in advance!
    Martyn
     
  2. thewebhosting

    thewebhosting Well-Known Member

    Joined:
    May 9, 2008
    Messages:
    1,201
    Likes Received:
    1
    Trophy Points:
    38
  3. martynh

    martynh Active Member

    Joined:
    Oct 6, 2009
    Messages:
    32
    Likes Received:
    0
    Trophy Points:
    6
    Thanks very much for that, I will try install eaccelerator and see what that does but I installed this when I first got the server but it keeps filling /tmp up and I get error emails, is there a way to round this? at the moment my /tmp is 400MB

    I'm just thinking of upgrading my RAM and see if that makes a difference but the one thing I dont understand is I have come from a reseller account with less specs than my server and his server was never down.

    Thanks
    Martyn
     
  4. Spiral

    Spiral BANNED

    Joined:
    Jun 24, 2005
    Messages:
    2,023
    Likes Received:
    7
    Trophy Points:
    0
    With respect, the webhostingtalk article makes a huge number of assumptions and the problem the user describes could be caused by any of several hundred reasons.

    Without more specific information and details as to what is causing the load increase and memory drain, you really could not make a specific recommendation.

    To martynh, if you would like a hand, I'd be glad to review your server for you and try to identify the real underlying issue and at least give you a much better idea in which direction you should pursue this.
     
  5. martynh

    martynh Active Member

    Joined:
    Oct 6, 2009
    Messages:
    32
    Likes Received:
    0
    Trophy Points:
    6
    Hello,

    Thank you sprial for the offer... These are the current steps I have taken...

    I have got another 2GB RAM placed my my server so I now have 4GB. The server still hit 90% which was really stressing to know I have just spent some money that could be needed for the main problem but then I did install the eaccelerator but changed the cache location so I can get more saved into this....

    I had to install PAE kernel to get it to read my new memory which caused the load to go high but not use the swap memory (hope im using the right terms)

    The main thing I have done which has stopped the memory and CPU usage is removing everything from within the my.cnf The following is what I have removed from within the file which im thinking is the cause (I got told to use this in a forum once)

    Code:
    [mysqld]
    skip-locking
    #skip-networking
    safe-show-database
    query_cache_limit=1M
    query_cache_size=128M ## 32MB for every 1GB of RAM
    query_cache_type=1
    max_user_connections=200
    max_connections=500
    interactive_timeout=10
    wait_timeout=20
    connect_timeout=20
    thread_cache_size=128
    key_buffer=512M ## 128MB for every 1GB of RAM
    max_connect_errors=20
    max_allowed_packet=16M
    table_cache=1024
    record_buffer=1M
    sort_buffer_size=4M ## 1MB for every 1GB of RAM
    read_buffer_size=4M ## 1MB for every 1GB of RAM
    read_rnd_buffer_size=4M  ## 1MB for every 1GB of RAM
    thread_concurrency=4 ## Number of CPUs x 2
    
    I have just left the following in the file...

    Code:
    [mysqld]
    max_user_connections=200
    max_connections=500
    interactive_timeout=10
    wait_timeout=20
    connect_timeout=20
    

    Im not sure what it can do with or without this code but if its this code thats causing the problem it works better without it... does anyone know how to optimize MySQL without it doing this to my server


    please let me know your views on this and if you think it was this causing my problems

    Thanks
    Martyn
     
Loading...

Share This Page