Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

CPU/Memory/MySQL Usage

Discussion in 'General Discussion' started by SBSB, Jan 7, 2006.

  1. SBSB

    SBSB Member

    Jan 22, 2002
    Likes Received:
    Trophy Points:

    I have noticed in CPU/Memory/MySQL Usage that MySQL is showing memory usage over 100%. Is this possible?

    As I go back and look at a number of days it has showed: 149.37, 99.77, 141.08, 141.00, 383.88, 142.82.

    I have noticed a slowdown of the server at certain times /tmp fills up the server ends up needing a restart.

    When support wss contacted they tell me "I don't think there is any "problem" that needs to be corrected - everything is configured properly, the hardware is all good, and there isn't any processes that we have caught overloading your server." but I think that mysql might somehow be causing the issue.

    Their method of fixing the issue is "a cronjob to delete the contents of the tmp directory every 15-30 minutes"



    Note: These figures are averages since 0000 hours today.
    Note: This script will not able to track cgi cpu/memory usage if you do not have suexec installed.
    Note: Percentages are based on one cpu. If you have 2 cpus divide the number in half to get the percentage of all cpu power used
    User Domain %CPU %MEM Mysql Processes
    mysql 12.81 149.37 0.0
    Top Process %CPU 54.5 /usr/sbin/mysqld --basedir/ --datadir/var/lib/mysql --usermysql --pid-file/var/lib/mysql/ --skip-locking
    Top Process %CPU 45.6 /usr/sbin/mysqld --basedir/ --datadir/var/lib/mysql --usermysql --pid-file/var/lib/mysql/ --skip-locking
    Top Process %CPU 7.4 /usr/sbin/mysqld --basedir/ --datadir/var/lib/mysql --usermysql --pid-file/var/lib/mysql/ --skip-locking
    root 4.19 1.60 2.0....................

    my.cnf looks like this.....
    max_connections = 650
    key_buffer = 16M
    myisam_sort_buffer_size = 64M
    join_buffer_size = 1M
    read_buffer_size = 1M
    sort_buffer_size = 2M
    table_cache = 1280
    thread_cache_size = 64
    wait_timeout = 1200
    connect_timeout = 10
    tmp_table_size = 64M
    max_allowed_packet = 16M
    max_connect_errors = 10
    query_cache_limit = 1M
    query_cache_size = 32M
    query_cache_type = 1
    query_prealloc_size = 16384
    query_alloc_block_size = 16384

    open_files_limit = 8192

    max_allowed_packet = 16M

    key_buffer = 64M
    sort_buffer = 64M
    read_buffer = 16M
    write_buffer = 16M
    #1 SBSB, Jan 7, 2006
    Last edited: Jan 7, 2006
  2. Murtaza_t

    Murtaza_t Well-Known Member

    Jan 24, 2005
    Likes Received:
    Trophy Points:
    cPanel Access Level:
    Website Owner
    There might be one user on your server that is causing problem as he must be having bad MySql Database or php script.. you can try Login in to the server with shell as root and run this command :
    ]# mysqladmin proc
    this will show all the sql processes that are currently active on your server along with the database that is been used, hence you can locate the user which is having the most connection.
    And setting a cron to delete files in /tmp is not the best option I suppose.
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice