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!

MySQL optimize help for Server

Discussion in 'Workarounds and Optimization' started by dos_santos_rj, Apr 12, 2012.

  1. dos_santos_rj

    dos_santos_rj Member

    Apr 12, 2012
    Likes Received:
    Trophy Points:
    cPanel Access Level:
    Root Administrator

    I need help to optimize MySQL

    I have a dedicate server
    CPU GenuineIntel, Intel(R) Xeon(R)CPU L5630 @ 2.13GHz
    Version Parallels Plesk Panel v10.1.1_build1010110120.18 os_CentOS 5
    OS Linux 2.6.18-028stab099.3
    2Gb Memory


    query-cache-type = 1
    query-cache-size = 8M
    key_buffer_size = 256M
    # Disabling symbolic-links is recommended to prevent assorted security risks
    # To enable the InnoDB Plugin, uncomment the 2 next lines
    # To enable InnoDB-related INFORMATION_SCHEMA tables
    # Join the following options to above directive
    set-variable = innodb_buffer_pool_size=2M
    set-variable = innodb_additional_mem_pool_size=500K
    set-variable = innodb_log_buffer_size=500K
    set-variable = innodb_thread_concurrency=2
    set-variable = innodb_buffer_pool_size=2M
    set-variable = innodb_additional_mem_pool_size=500K
    set-variable = innodb_log_buffer_size=500K
    set-variable = innodb_thread_concurrency=2

     >>  MySQLTuner 1.2.0 - Major Hayden <>
     >>  Bug reports, feature requests, and downloads at
     >>  Run with '--help' for additional options and output filtering
    -------- General Statistics --------------------------------------------------
    [--] Skipped version check for MySQLTuner script
    [OK] Currently running supported MySQL version 5.1.54
    [OK] Operating on 64-bit architecture
    -------- Storage Engine Statistics -------------------------------------------
    [--] Status: +Archive -BDB -Federated +InnoDB -ISAM -NDBCluster 
    [--] Data in MyISAM tables: 614M (Tables: 418)
    [--] Data in InnoDB tables: 2M (Tables: 178)
    [!!] Total fragmented tables: 179
    -------- Security Recommendations  -------------------------------------------
    [OK] All database users have passwords assigned
    -------- Performance Metrics -------------------------------------------------
    [--] Up for: 6m 36s (48K q [121.841 qps], 222 conn, TX: 132M, RX: 5M)
    [--] Reads / Writes: 98% / 2%
    [--] Total buffers: 299.0M global + 3.6M per thread (151 max threads)
    [OK] Maximum possible memory usage: 846.4M (28% of installed RAM)
    [OK] Slow queries: 0% (0/48K)
    [OK] Highest usage of available connections: 7% (11/151)
    [OK] Key buffer size / total MyISAM indexes: 256.0M/233.9M
    [OK] Key buffer hit rate: 99.8% (3M cached / 7K reads)
    [OK] Query cache efficiency: 65.5% (28K cached / 43K selects)
    [!!] Query cache prunes per day: 1551709
    [OK] Sorts requiring temporary tables: 0% (0 temp sorts / 332 sorts)
    [!!] Joins performed without indexes: 5
    [!!] Temporary tables created on disk: 47% (3K on disk / 8K total)
    [OK] Thread cache hit rate: 95% (11 created / 222 connections)
    [!!] Table cache hit rate: 19% (64 open / 330 opened)
    [OK] Open file limit used: 10% (104/1K)
    [OK] Table locks acquired immediately: 100% (15K immediate / 15K locks)
    [!!] InnoDB data size / buffer pool: 3.0M/2.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
        When making adjustments, make tmp_table_size/max_heap_table_size equal
        Reduce your SELECT DISTINCT queries without LIMIT clauses
        Increase table_cache gradually to avoid file descriptor limits
    Variables to adjust:
        query_cache_size (> 8M)
        join_buffer_size (> 1.0M, or always use indexes with joins)
        tmp_table_size (> 64M)
        max_heap_table_size (> 32M)
        table_cache (> 64)
        innodb_buffer_pool_size (>= 2M)

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