MySQLTuner工具--效果
来源:互联网 发布:淘宝商家直播入口 编辑:程序博客网 时间:2024/06/06 19:44
在阿里云博客看到一款性能统计工具,实验了一把,感觉有几项可以关注下。
https://yq.aliyun.com/articles/52879?utm_content=m_14134
关注:
1、性能统计Performance Metrics
可以看到物理内存大小,及MySQL最大内存大小,其他进程占用内存大以及其他的几个地方占用内存大小。
还可以看到内存使用峰值。
感觉这项对监控MySQL状态有很大帮助。下节看下源码,看他这些内存统计得到的值来源哪里。
[mysql26@localhost ~]$ ./tun --user root --socket /home/mysql26/bin/mysql.sock >> MySQLTuner 1.7.2 - Major Hayden <major@mhtx.net> >> Bug reports, feature requests, and downloads at http://mysqltuner.com/ >> Run with '--help' for additional options and output filtering[--] Skipped version check for MySQLTuner script[OK] Logged in using credentials passed on the command line[OK] Currently running supported MySQL version 5.6.26-debug[OK] Operating on 32-bit architecture with less than 2GB RAM -------- Log file Recommendations ------------------------------------------------------------------[--] Log file: (0B)[!!] Log file doesn't exist[!!] Log file isn't readable. -------- Storage Engine Statistics -----------------------------------------------------------------[--] Status: +ARCHIVE +BLACKHOLE +CSV -FEDERATED +InnoDB +MEMORY +MRG_MYISAM +MyISAM +PERFORMANCE_SCHEMA [--] Data in InnoDB tables: 368K (Tables: 9)[OK] Total fragmented tables: 0 -------- Security Recommendations ------------------------------------------------------------------[!!] User '@localhost' is an anonymous account.[!!] User '@localhost.localdomain' is an anonymous account.[!!] User '@localhost' has no password set.[!!] User '@localhost.localdomain' has no password set.[!!] User 'root@127.0.0.1' has no password set.[!!] User 'root@::1' has no password set.[!!] User 'root@localhost' has no password set.[!!] User 'root@localhost.localdomain' has no password set.[!!] User '@localhost' has user name as password.[!!] User '@localhost.localdomain' has user name as password.[!!] There is no basic password file list! -------- CVE Security Recommendations --------------------------------------------------------------[--] Skipped due to --cvefile option undefined -------- Performance Metrics -----------------------------------------------------------------------[--] Up for: 15d 1h 19m 25s (540 q [0.000 qps], 161 conn, TX: 624K, RX: 44K)[--] Reads / Writes: 95% / 5%[--] Binary logging is disabled[--] Physical Memory : 1010.8M[--] Max MySQL memory : 400.1M[--] Other process memory: 338.9M[--] Total buffers: 169.0M global + 1.1M per thread (151 max threads)[--] P_S Max memory usage: 70M[--] Galera GCache Max memory usage: 0B[OK] Maximum reached memory usage: 241.8M (23.92% of installed RAM)[OK] Maximum possible memory usage: 400.1M (39.58% of installed RAM)[OK] Overall possible memory usage with other process is compatible with memory available[OK] Slow queries: 0% (4/540)[OK] Highest usage of available connections: 1% (2/151)[OK] Aborted connections: 0.00% (0/161)[!!] name resolution is active : a reverse name resolution is made for each new connection and can reduce performance[!!] Query cache may be disabled by default due to mutex contention.[!!] Query cache efficiency: 0.0% (0 cached / 227 selects)[OK] Query cache prunes per day: 0[OK] Sorts requiring temporary tables: 0% (0 temp sorts / 10 sorts)[OK] No joins without indexes[OK] Temporary tables created on disk: 0% (0 on disk / 100 total)[OK] Thread cache hit rate: 98% (2 created / 161 connections)[OK] Table cache hit rate: 54% (89 open / 164 opened)[OK] Open file limit used: 4% (46/1K)[OK] Table locks acquired immediately: 100% (106 immediate / 106 locks) -------- Performance schema ------------------------------------------------------------------------[--] Memory used by P_S: 70.6M[--] Sys schema isn't installed. -------- ThreadPool Metrics ------------------------------------------------------------------------[--] ThreadPool stat is disabled. -------- MyISAM Metrics ----------------------------------------------------------------------------[!!] Key buffer used: 11.5% (964K used / 8M cache)[OK] Key buffer size / total MyISAM indexes: 8.0M/105.0K[OK] Read Key buffer hit rate: 96.0% (25 cached / 1 reads) -------- InnoDB Metrics ----------------------------------------------------------------------------[--] InnoDB is enabled.[--] InnoDB Thread Concurrency: 0[OK] InnoDB File per table is activated[OK] InnoDB buffer pool / data size: 128.0M/368.0K[!!] Ratio InnoDB log file size / InnoDB Buffer pool size (75 %): 48.0M * 2/128.0M should be equal 25%[!!] InnoDB buffer pool <= 1G and Innodb_buffer_pool_instances(!=1).[--] InnoDB Buffer Pool Chunk Size not used or defined in your version[OK] InnoDB Read buffer efficiency: 92.84% (3840 hits/ 4136 total)[!!] InnoDB Write Log efficiency: 20.51% (8 hits/ 39 total)[OK] InnoDB log waits: 0.00% (0 waits / 31 writes) -------- AriaDB Metrics ----------------------------------------------------------------------------[--] AriaDB is disabled. -------- TokuDB Metrics ----------------------------------------------------------------------------[--] TokuDB is disabled. -------- XtraDB Metrics ----------------------------------------------------------------------------[--] XtraDB is disabled. -------- RocksDB Metrics ---------------------------------------------------------------------------[--] RocksDB is disabled. -------- Spider Metrics ----------------------------------------------------------------------------[--] Spider is disabled. -------- Connect Metrics ---------------------------------------------------------------------------[--] Connect is disabled. -------- Galera Metrics ----------------------------------------------------------------------------[--] Galera is disabled. -------- Replication Metrics -----------------------------------------------------------------------[--] Galera Synchronous replication: NO[--] No replication slave(s) for this server.[--] This is a standalone server. -------- Recommendations ---------------------------------------------------------------------------General recommendations: Remove Anonymous User accounts - there are 2 anonymous accounts. Set up a Password for user with the following SQL statement ( SET PASSWORD FOR 'user'@'SpecificDNSorIp' = PASSWORD('secure_password'); ) Set up a Secure Password for user@host ( SET PASSWORD FOR 'user'@'SpecificDNSorIp' = PASSWORD('secure_password'); ) Configure your accounts with ip or subnets only, then update your configuration with skip-name-resolve=1 Consider installing Sys schema from https://github.com/mysql/mysql-sysVariables to adjust: query_cache_size (=0) query_cache_type (=0) query_cache_limit (> 1M, or use smaller result sets) innodb_log_file_size * innodb_log_files_in_group should be equal to 1/4 of buffer pool size (=64M) if possible. innodb_buffer_pool_instances (=1)[END] 2017/5/29 16:59:30
阅读全文
0 0
- MySQLTuner工具--效果
- MySql 调优工具 mysqltuner.pl
- 利用mysqltuner工具对mysql数据库进行优化
- MySQLTuner--使用方法
- MySQL性能建议者:mysqltuner.pl
- 使用MySQLTuner-perl对MySQL进行优化
- 工具不同,效果不同
- java实现渐变效果工具
- cocos2dx GL 效果工具代码
- 遮罩效果工具代码
- 浮雕效果一键工具
- 添加测试效果工具tools
- 使用资源管理器达到ftp工具的效果
- 利用OpenOffice.org工具实现预览效果
- jQuery hover 做tooltip工具提示效果
- 查看blend func 效果的在线工具
- CSS3 Gradients简便效果演示工具
- ps 模糊工具 制造出蹦跑的效果
- 1949: JH说要ak啦!
- Vue实现魅族ebook读书app中搜索页面的搜索热词布局
- matlab数据类型及相关函数
- comparator接口与Comparable接口的区别
- Android调起相册,拍照,裁剪+6.0权限适配大总结
- MySQLTuner工具--效果
- Shader学习笔记(4)- 基本概念与基础效果(3)
- JS的数组(Array)
- 欢迎使用CSDN-markdown编辑器
- Ubuntu 14.04下部署FastDFS 5.08+Nginx 1.13.0
- C++string与char*
- wxPython之RendererNative
- hadoop 运行mahout 问题总结
- 可序列化