mysql性能优化脚本mysqltuner.pl使用介绍
MySQLTuner 下载地址:http://github.com/rackerhacker/MySQLTuner-perl
MySQLTuner 使用方法:
Downloading and using MySQLTuner is actually a very simple process:
wget mysqltuner.pl
perl mysqltuner.pl
If you'd rather not invoke perl every time, just make it executable:
chmod u+x mysqltuner.pl
./mysqltuner.pl
» Latest development version
If you want to get the bleeding edge commits, you can check out the latest code with git:
git clone git://github.com/rackerhacker/MySQLTuner-perl.git
看看我的运行结果
>> MySQLTuner 1.1.1 - Major Hayden
>> Bug reports, feature requests, and downloads at http://mysqltuner.com/
>> 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.43-log
[OK] Operating on 64-bit architecture
-------- Storage Engine Statistics -------------------------------------------
[--] Status: -Archive -BDB -Federated -InnoDB -ISAM -NDBCluster
[--] Data in MyISAM tables: 889M (Tables: 479)
[--] Data in MEMORY tables: 1M (Tables: 4)
[!!] Total fragmented tables: 29
-------- Security Recommendations -------------------------------------------
[OK] All database users have passwords assigned
-------- Performance Metrics -------------------------------------------------
[--] Up for: 12h 55m 27s (4M q [105.230 qps], 295K conn, TX: 9B, RX: 546M)
[--] Reads / Writes: 82% / 18%
[--] Total buffers: 432.0M global + 6.3M per thread (500 max threads)
[!!] Maximum possible memory usage: 3.5G (175% of installed RAM)
[OK] Slow queries: 0% (48K/4M)
[OK] Highest usage of available connections: 3% (16/500)
[OK] Key buffer size / total MyISAM indexes: 384.0M/332.6M
[OK] Key buffer hit rate: 100.0% (2B cached / 205K reads)
[OK] Query cache efficiency: 49.3% (1M cached / 3M selects)
[!!] Query cache prunes per day: 268042
[OK] Sorts requiring temporary tables: 0% (10 temp sorts / 122K sorts)
[OK] Temporary tables created on disk: 19% (4K on disk / 22K total)
[OK] Thread cache hit rate: 99% (16 created / 295K connections)
[!!] Table cache hit rate: 18% (256 open / 1K opened)
[OK] Open file limit used: 19% (497/2K)
[!!] Table locks acquired immediately: 88%
-------- 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
Increase table_cache gradually to avoid file descriptor limits
Optimize queries and/or use InnoDB to reduce lock wait
Variables to adjust:
*** MySQL's maximum memory usage is dangerously high ***
*** Add RAM before increasing MySQL buffer variables ***
query_cache_size (> 32M)
table_cache (> 256)
相关文章
MySQL使用select语句查询指定表中指定列(字段)的数据
本文介绍MySQL数据库中执行select查询语句,查询指定列的数据,即指定字段的数据,需要的朋友可以参考下2016-11-11完美解决mysql启动后随即关闭的问题(ibdata1文件损坏导致)
下面小编就为大家带来一篇完美解决mysql启动后随即关闭的问题(ibdata1文件损坏导致)。小编觉得挺不错的,现在就分享给大家,也给大家做个参考。一起跟随小编过来看看吧2017-03-03MySQL5.7升级MySQL8.0的完整卸载与安装及连接Navicat的步骤
因为一个项目交接需要需要将mysql物理备份文件还原至MySQL5.7,并且将mysql5.7升级到MySQL8.0,下面这篇文章主要给大家介绍了关于MySQL5.7升级MySQL8.0的完整卸载与安装及连接Navicat的相关资料,需要的朋友可以参考下2023-03-03
最新评论