Скрипт для тюнинга MYSQL

Знакомый кинул линк на перловый скриптец, который собирает статистику из конфига и логов и выдает рекомендации по оптимизации бд.
Вот такой вывод:

-------- General Statistics --------------------------------------------------
[--] Skipped version check for MySQLTuner script
[OK] Currently running supported MySQL version 5.0.51a-24+lenny5-log
[!!] Switch to 64-bit OS - MySQL cannot currently use all of your RAM

-------- Storage Engine Statistics -------------------------------------------
[--] Status: +Archive -BDB +Federated -InnoDB -ISAM -NDBCluster 

[--] Data in MyISAM tables: 5M (Tables: 260)
[OK] Total fragmented tables: 0

-------- Security Recommendations  -------------------------------------------
[OK] All database users have passwords assigned

-------- Performance Metrics -------------------------------------------------
[--] Up for: 1d 12h 14m 59s (4M q [33.837 qps], 39K conn, TX: 822M, RX: 460M)
[--] Reads / Writes: 30% / 70%
[--] Total buffers: 57.0M global + 50.5M per thread 
(400 max threads)
[!!] Allocating > 2GB RAM on 32-bit systems can cause system instability
[!!] Maximum possible memory usage: 19.8G (293% 
of installed RAM)
[!!] Slow queries: 10% 
(443K/4M)
[OK] Highest usage of available connections: 38% 
(152/400)
[OK] Key buffer size / total MyISAM indexes: 
15.0M/4.7M
[OK] Key buffer hit rate: 99.1% (9M cached 
/ 91K reads)
[OK] Query cache efficiency: 75.5% (2M cached / 
2M selects)
[OK] Query cache prunes per day: 0
[OK] Sorts requiring temporary tables: 0% (0 temp 
sorts / 439K sorts)
[OK] Temporary tables created on disk: 1% (8K 
on disk / 444K total)
[OK] Thread cache hit rate: 99% (307 created / 
39K connections)
[!!] Table cache hit rate: 0% (5 open / 
11K opened)
[OK] Open file limit used: 0% 
(11/65K)
[OK] Table locks acquired immediately: 99% 
(2M immediate / 2M 
locks)

-------- Recommendations -----------------------------------------------------
General recommendations:
    Increase table_cache gradually to avoid file descriptor limits
Variables to adjust:
  *** MySQL's maximum memory usage is dangerously high ***
  *** Add RAM before increasing MySQL buffer variables ***
    table_cache (> 32562)

Сам скрипт лежит тут: веб, гит

0.00 avg. rating (0% score) - 0 votes

One Comment

  • Так как я в этом только начал разбираться — вопрос может показаться не столь мудрым…

    Этот скрипт можно использовать для последней версии «мускула» или для предыдущих тоже? 

css.php