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.

High Memory Usage

Discussion in 'Database Discussions' started by ktangxd, May 2, 2012.

  1. ktangxd

    ktangxd Registered

    Joined:
    May 2, 2012
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    I clean installed CPanel on my VPS yesterday (Running mySQL 5.5/CentOS) and I'm noticing a high memory usage on the server. memtop-0.9.py is showing 414.8 MB memory usage. The server only has a few small databases (joomla, kayako resolve, etc.) Not sure why this is happening. Is there a way to reduce the memory usage since it's taking almost 50% of my VPS allocated RAM.


    PID | private/writ. mem |command 18:29:55
    | current | previous |(truncated) (waiting 15 min.)
    8070 | 414.8 MB | +++++ |/usr/sbin/mysqld -basedir=/usr -datadir=/var/lib
    3289 | 31.9 MB | ++++ |/usr/bin/php
    3278 | 31.9 MB | ++++ |/usr/bin/php
    1439 | 31.5 MB | ++++ |/sbin/rsyslogd-i/var/run/syslogd.pid-c4
    3271 | 17.3 MB | +++ |/usr/bin/perl/usr/local/cpanel/bin/leechprotect
    31796 | 17.0 MB | +++ |tailwatchd
    31770 | 13.3 MB | +++ |cpsrvd (SSL) - waiting for c -llu=1335989918 -li
    31822 | 13.2 MB | +++ |cpdavd - accepting connections on 2077 and 2078
    3287 | 4.5 MB | ++ |/usr/local/apache/bin/httpd-kstart-DSSL
    RAM usage: =========== 34.4 %


    Additional Details
    ---------------------------------------------------------

    [root@ve ~]# mysql_config --version
    5.5.22
    [root@ve ~]# cat /etc/my.cnf
    [mysqld]
    default-storage-engine=MyISAM
    innodb_file_per_table=1

    max_connections = 50
    max_user_connections = 150
    key_buffer = 36M
    myisam_sort_buffer_size = 64M
    join_buffer_size = 2M
    read_buffer_size = 2M
    sort_buffer_size = 3M
    table_cache = 1024
    thread_cache_size = 286
    interactive_timeout = 25
    wait_timeout = 1800
    connect_timeout = 10
    max_allowed_packet = 1M
    max_connect_errors = 1000
    query_cache_limit = 1M
    query_cache_size = 16M
    query_cache_type = 1
    tmp_table_size = 16M
    query_cache_size = 10M
    ---------------------------------------------------------

    ------- General Statistics --------------------------------------------------
    [--] Skipped version check for MySQLTuner script
    [OK] Currently running supported MySQL version 5.5.22-cll
    [OK] Operating on 64-bit architecture

    -------- Storage Engine Statistics -------------------------------------------
    [--] Status: -Archive -BDB -Federated +InnoDB -ISAM -NDBCluster
    [--] Data in MyISAM tables: 8M (Tables: 433)
    [--] Data in InnoDB tables: 28M (Tables: 197)
    [--] Data in PERFORMANCE_SCHEMA tables: 0B (Tables: 17)
    [--] Data in MEMORY tables: 1M (Tables: 4)
    [!!] Total fragmented tables: 8

    -------- Performance Metrics -------------------------------------------------
    [--] Up for: 4h 31m 8s (335K q [20.622 qps], 2K conn, TX: 64M, RX: 63M)
    [--] Reads / Writes: 1% / 99%
    [--] Total buffers: 206.0M global + 7.5M per thread (50 max threads)
    [OK] Maximum possible memory usage: 581.0M (33% of installed RAM)
    [OK] Slow queries: 0% (0/335K)
    [OK] Highest usage of available connections: 12% (6/50)
    [OK] Key buffer size / total MyISAM indexes: 36.0M/1.9M
    [OK] Key buffer hit rate: 99.7% (51K cached / 143 reads)
    [OK] Query cache efficiency: 81.7% (15K cached / 19K selects)
    [OK] Query cache prunes per day: 0
    [OK] Sorts requiring temporary tables: 0% (0 temp sorts / 1K sorts)
    [!!] Joins performed without indexes: 288
    [OK] Temporary tables created on disk: 16% (400 on disk / 2K total)
    [OK] Thread cache hit rate: 99% (6 created / 2K connections)
    [OK] Table cache hit rate: 49% (696 open / 1K opened)
    [OK] Open file limit used: 44% (935/2K)
    [OK] Table locks acquired immediately: 99% (315K immediate / 315K locks)
    [OK] InnoDB data size / buffer pool: 28.2M/128.0M

    -------- Recommendations -----------------------------------------------------
    General recommendations:
    Run OPTIMIZE TABLE to defragment tables for better performance
    MySQL started within last 24 hours - recommendations may be inaccurate
    Enable the slow query log to troubleshoot bad queries
    Adjust your join queries to always utilize indexes
    Variables to adjust:
    join_buffer_size (> 2.0M, or always use indexes with joins)
     
    #1 ktangxd, May 2, 2012
    Last edited: May 2, 2012
  2. britsenigma

    britsenigma Well-Known Member

    Joined:
    Dec 14, 2008
    Messages:
    85
    Likes Received:
    0
    Trophy Points:
    6
    Just upgraded to mysql 5.5, the performance is awful, it's actually doubled the loading times of an opencart website....
     
Loading...

Share This Page