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.

CPU/Memory/MySQL Usage

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

  1. SBSB

    SBSB Member

    Joined:
    Jan 22, 2002
    Messages:
    9
    Likes Received:
    0
    Trophy Points:
    1
    Hi,

    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"

    Cheers

    Buac

    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/host1.xyz.net.pid --skip-locking
    Top Process %CPU 45.6 /usr/sbin/mysqld --basedir/ --datadir/var/lib/mysql --usermysql --pid-file/var/lib/mysql/host1.xyz.net.pid --skip-locking
    Top Process %CPU 7.4 /usr/sbin/mysqld --basedir/ --datadir/var/lib/mysql --usermysql --pid-file/var/lib/mysql/host1.xyz.net.pid --skip-locking
    root 4.19 1.60 2.0....................


    my.cnf looks like this.....
    [mysqld]
    safe-show-database
    skip-locking
    skip-innodb
    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

    [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
     
    #1 SBSB, Jan 7, 2006
    Last edited: Jan 7, 2006
  2. Murtaza_t

    Murtaza_t Well-Known Member

    Joined:
    Jan 24, 2005
    Messages:
    476
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Earth
    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 :
    Code:
    ]# 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.
     
Loading...

Share This Page