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!

High iowat and swap usage mysql

Discussion in 'Workarounds and Optimization' started by sreeninair, Jul 8, 2014.

  1. sreeninair

    sreeninair Well-Known Member

    Dec 23, 2013
    Likes Received:
    Trophy Points:
    cPanel Access Level:
    Root Administrator

    Mysql is using high memory and iowait. I have ran mysql tuner . What are the values that needs to be changed?

    -------- General Statistics --------------------------------------------------
    [--] Skipped version check for MySQLTuner script
    [OK] Currently running supported MySQL version 5.1.72-cll
    [OK] Operating on 64-bit architecture
    -------- Storage Engine Statistics -------------------------------------------
    [--] Status: +Archive -BDB -Federated +InnoDB -ISAM -NDBCluster
    [--] Data in MyISAM tables: 31G (Tables: 24487)
    [--] Data in InnoDB tables: 752M (Tables: 5424)
    [--] Data in MEMORY tables: 2M (Tables: 149)
    [!!] Total fragmented tables: 2328
    -------- Performance Metrics -------------------------------------------------
    [--] Up for: 17m 55s (38K q [36.278 qps], 1K conn, TX: 1B, RX: 25M)
    [--] Reads / Writes: 75% / 25%
    [--] Total buffers: 4.6G global + 19.0M per thread (500 max threads)
    [!!] Maximum possible memory usage: 13.9G (178% of installed RAM)
    [OK] Slow queries: 0% (11/38K)
    [OK] Highest usage of available connections: 10% (51/500)
    [OK] Key buffer size / total MyISAM indexes: 2.4G/2.1G
    [OK] Key buffer hit rate: 97.4% (436K cached / 11K reads)
    [OK] Query cache efficiency: 59.5% (18K cached / 30K selects)
    [OK] Query cache prunes per day: 0
    [OK] Sorts requiring temporary tables: 0% (2 temp sorts / 3K sorts)
    [!!] Joins performed without indexes: 17
    [!!] Temporary tables created on disk: 36% (591 on disk / 1K total)
    [OK] Thread cache hit rate: 96% (51 created / 1K connections)
    [OK] Table cache hit rate: 27% (4K open / 14K opened)
    [OK] Open file limit used: 14% (7K/50K)
    [OK] Table locks acquired immediately: 99% (19K immediate / 19K locks)
    [OK] InnoDB data size / buffer pool: 752.5M/2.0G
    -------- Recommendations -----------------------------------------------------
    General recommendations:
        Run OPTIMIZE TABLE to defragment tables for better performance
        MySQL started within last 24 hours - recommendations may be inaccurate
        Reduce your overall MySQL memory footprint for system stability
        Enable the slow query log to troubleshoot bad queries
        Adjust your join queries to always utilize indexes
        When making adjustments, make tmp_table_size/max_heap_table_size equal
        Reduce your SELECT DISTINCT queries without LIMIT clauses
    Variables to adjust:
      *** MySQL's maximum memory usage is dangerously high ***
      *** Add RAM before increasing MySQL buffer variables ***
        join_buffer_size (> 16.0M, or always use indexes with joins)
        tmp_table_size (> 32M)
        max_heap_table_size (> 32M)
  2. SS-Maddy

    SS-Maddy Well-Known Member

    Mar 28, 2009
    Likes Received:
    Trophy Points:
    cPanel Access Level:
    Root Administrator
    Deducting configuration parameters from this output may not be effective. Kindly share your primary memory availability, my.cnf configuration and the output of "mysqladmin proc stat" for better understanding about the issue.
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. cPanelMichael

    cPanelMichael Technical Support Community Manager
    Staff Member

    Apr 11, 2011
    Likes Received:
    Trophy Points:
    cPanel Access Level:
    Root Administrator
    Hello :)

    Please ensure you let MySQL run for at least 24 hours before running the tuner to ensure the accurate results.

    Thank you.
    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