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.

mySQL Optimization

Discussion in 'Workarounds and Optimization' started by zmenchhofer, Sep 19, 2014.

  1. zmenchhofer

    zmenchhofer Member

    Joined:
    Jun 16, 2004
    Messages:
    14
    Likes Received:
    0
    Trophy Points:
    1
    can someone look at mysqltunner results and config and give some advice ?

    THanks!!!!



    Code:
     >>  MySQLTuner 1.3.0 - Major Hayden <major@mhtx.net>
     >>  Bug reports, feature requests, and downloads at http://mysqltuner.com/
     >>  Run with '--help' for additional options and output filtering
    [OK] Currently running supported MySQL version 5.5.37-cll
    [OK] Operating on 64-bit architecture
    
    -------- Storage Engine Statistics -------------------------------------------
    [--] Status: +ARCHIVE +BLACKHOLE +CSV -FEDERATED +InnoDB +MRG_MYISAM
    [--] Data in MyISAM tables: 2G (Tables: 508)
    [--] Data in InnoDB tables: 2G (Tables: 190)
    [--] Data in PERFORMANCE_SCHEMA tables: 0B (Tables: 17)
    [--] Data in MEMORY tables: 0B (Tables: 5)
    [!!] Total fragmented tables: 49
    
    -------- Security Recommendations  -------------------------------------------
    [OK] All database users have passwords assigned
    
    -------- Performance Metrics -------------------------------------------------
    [--] Up for: 1d 8h 24m 45s (12M q [107.484 qps], 323K conn, TX: 284B, RX: 13B)
    [--] Reads / Writes: 85% / 15%
    [--] Total buffers: 3.4G global + 258.6M per thread (151 max threads)
    [!!] Maximum possible memory usage: 41.5G (540% of installed RAM)
    [OK] Slow queries: 0% (160/12M)
    [OK] Highest usage of available connections: 22% (34/151)
    [OK] Key buffer size / total MyISAM indexes: 1.0G/499.6M
    [OK] Key buffer hit rate: 99.9% (183M cached / 114K reads)
    [OK] Query cache efficiency: 51.1% (5M cached / 10M selects)
    [!!] Query cache prunes per day: 286388
    [OK] Sorts requiring temporary tables: 0% (581 temp sorts / 204K sorts)
    [!!] Joins performed without indexes: 340
    [OK] Temporary tables created on disk: 1% (1K on disk / 124K total)
    [OK] Thread cache hit rate: 99% (51 created / 323K connections)
    [OK] Table cache hit rate: 36% (890 open / 2K opened)
    [OK] Open file limit used: 13% (1K/8K)
    [OK] Table locks acquired immediately: 99% (7M immediate / 7M locks)
    [!!] InnoDB  buffer pool / data size: 2.0G/2.7G
    [OK] InnoDB log waits: 0
    -------- Recommendations -----------------------------------------------------
    General recommendations:
        Run OPTIMIZE TABLE to defragment tables for better performance
        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
    Variables to adjust:
      *** MySQL's maximum memory usage is dangerously high ***
      *** Add RAM before increasing MySQL buffer variables ***
        query_cache_size (> 128M)
        join_buffer_size (> 256.0M, or always use indexes with joins)
        innodb_buffer_pool_size (>= 2G)
    
    and my config
    Code:
    [mysqld]
    default-storage-engine=MyISAM
    innodb_file_per_table=1
    max_allowed_packet=256M
    open_files_limit=5780
    
    query_cache_type=1
    query_cache_size=128M
    query_cache_limit=150M
    tmp_table_size=256M
    max_heap_table_size=256M
    long_query_time = 5
    thread_cache_size=16
    table_cache=1K
    table_definition_cache = 4K
    table_open_cache=4096
    innodb_buffer_pool_size=2G
    key_buffer_size=1G
    join_buffer_size=256M
    low_priority_updates=1
    concurrent_insert=ALWAYS
    
     
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,854
    Likes Received:
    676
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Hello :)

    Sometimes it's helpful to provide information about what lead you to seeking assistance with optimization. Are you experiencing a specific issue with speed, or is it simply a matter of wanting to optimize the performance the most you can?

    Thank you.
     
  3. PascM

    PascM Member

    Joined:
    Jun 2, 2012
    Messages:
    24
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    127.0.0.1
    cPanel Access Level:
    DataCenter Provider
    Twitter:
    Seems like the OP needs some help considering
     
Loading...

Share This Page