MySQLTunerはGitHubに最新があります。Versionは1.2.0
GitHub · Build software better, together.
https://github.com/
GitHub
http://ja.wikipedia.org/wiki/GitHub
1.1.1をアンインストールして1.2.0に入れ替えることにしました
- mysqltunerのアンインストール
- gitのインストール
- mysqltunerのインストール
- mysqltunerの実行
yumでインストールしたmysqltunerをアンインストールします
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 |
; html-script: false ] [root@host1 ~]# yum erase mysqltuner Loaded plugins: fastestmirror Setting up Remove Process Resolving Dependencies --> Running transaction check ---> Package mysqltuner.noarch 0:1.1.1-1.el5 set to be erased --> Finished Dependency Resolution Dependencies Resolved ================================================================================ Package Arch Version Repository Size ================================================================================ Removing: mysqltuner noarch 1.1.1-1.el5 installed 78 k Transaction Summary ================================================================================ Remove 1 Package(s) Reinstall 0 Package(s) Downgrade 0 Package(s) Is this ok [y/N]: y Downloading Packages: Running rpm_check_debug Running Transaction Test Finished Transaction Test Transaction Test Succeeded Running Transaction Erasing : mysqltuner 1/1 Removed: mysqltuner.noarch 0:1.1.1-1.el5 Complete! |
githubのソースコードを管理するgitがインストールされていなかったので、最初にこれをインストールします
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 |
; html-script: false ][root@host1 ~]# yum info git Loaded plugins: fastestmirror Loading mirror speeds from cached hostfile * addons: ftp.riken.jp * base: ftp.riken.jp * centosplus: ftp.riken.jp * epel: ftp.riken.jp * extras: ftp.riken.jp * remi: mirrors.mediatemple.net * updates: ftp.riken.jp addons | 1.9 kB 00:00 base | 1.1 kB 00:00 centosplus | 1.9 kB 00:00 dag | 1.9 kB 00:00 epel | 3.6 kB 00:00 extras | 2.1 kB 00:00 remi | 2.5 kB 00:00 updates | 1.9 kB 00:00 Available Packages Name : git Arch : i386 Version : 1.8.2.1 Release : 1.el5 Size : 7.3 M Repo : epel Summary : Fast Version Control System URL : http://git-scm.com/ License : GPLv2 Description: Git is a fast, scalable, distributed revision control system with : an unusually rich command set that provides both high-level : operations and full access to internals. : : The git rpm installs the core tools with minimal dependencies. To : install all git packages, including tools for integrating with : other SCMs, install the git-all meta-package. [root@host1 ~]# yum install git Loaded plugins: fastestmirror Loading mirror speeds from cached hostfile * addons: ftp.riken.jp * base: ftp.riken.jp * centosplus: ftp.riken.jp * epel: ftp.riken.jp * extras: ftp.riken.jp * remi: mirrors.mediatemple.net * updates: ftp.riken.jp Setting up Install Process Resolving Dependencies --> Running transaction check ---> Package git.i386 0:1.8.2.1-1.el5 set to be updated --> Processing Dependency: perl-Git = 1.8.2.1-1.el5 for package: git --> Processing Dependency: perl(Git) for package: git --> Processing Dependency: perl(Error) for package: git --> Running transaction check ---> Package perl-Error.noarch 1:0.17010-1.el5 set to be updated ---> Package perl-Git.i386 0:1.8.2.1-1.el5 set to be updated --> Finished Dependency Resolution Dependencies Resolved ================================================================================ Package Arch Version Repository Size ================================================================================ Installing: git i386 1.8.2.1-1.el5 epel 7.3 M Installing for dependencies: perl-Error noarch 1:0.17010-1.el5 epel 26 k perl-Git i386 1.8.2.1-1.el5 epel 49 k Transaction Summary ================================================================================ Install 3 Package(s) Upgrade 0 Package(s) Total download size: 7.4 M Is this ok [y/N]: y Downloading Packages: (1/3): perl-Error-0.17010-1.el5.noarch.rpm | 26 kB 00:00 (2/3): perl-Git-1.8.2.1-1.el5.i386.rpm | 49 kB 00:00 (3/3): git-1.8.2.1-1.el5.i386.rpm | 7.3 MB 00:10 -------------------------------------------------------------------------------- Total 668 kB/s | 7.4 MB 00:11 Running rpm_check_debug Running Transaction Test Finished Transaction Test Transaction Test Succeeded Running Transaction Installing : perl-Error 1/3 Installing : git 2/3 Installing : perl-Git 3/3 Installed: git.i386 0:1.8.2.1-1.el5 Dependency Installed: perl-Error.noarch 1:0.17010-1.el5 perl-Git.i386 0:1.8.2.1-1.el5 Complete! |
githubからmysqltunerをインストールします
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
; html-script: false ] [root@host1 ~]# git clone git://github.com/rackerhacker/MySQLTuner-perl.git Cloning into 'MySQLTuner-perl'... remote: Counting objects: 235, done. remote: Compressing objects: 100% (110/110), done. remote: Total 235 (delta 92), reused 212 (delta 71) Receiving objects: 100% (235/235), 71.91 KiB | 57 KiB/s, done. Resolving deltas: 100% (92/92), done. [root@host1 ~]# ls -l drwxr-xr-x 3 root root 4096 8月 15 15:45 MySQLTuner-perl [root@host1 ~]# ls -l MySQLTuner-perl/ -rw-r--r-- 1 root root 35147 8月 15 15:45 LICENSE -rw-r--r-- 1 root root 3739 8月 15 15:45 README -rwxr-xr-x 1 root root 41847 8月 15 15:45 mysqltuner.pl |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 |
; html-script: false ][root@host1 ~]# perl MySQLTuner-perl/mysqltuner.pl >> MySQLTuner 1.2.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 Please enter your MySQL administrative login: root Please enter your MySQL administrative password: -------- General Statistics -------------------------------------------------- [--] Skipped version check for MySQLTuner script [OK] Currently running supported MySQL version 5.5.33 [OK] Operating on 32-bit architecture with less than 2GB RAM -------- Storage Engine Statistics ------------------------------------------- [--] Status: +Archive -BDB -Federated +InnoDB -ISAM -NDBCluster [--] Data in MyISAM tables: 88M (Tables: 38) [--] Data in InnoDB tables: 1M (Tables: 73) [!!] Total fragmented tables: 73 -------- Security Recommendations ------------------------------------------- [OK] All database users have passwords assigned -------- Performance Metrics ------------------------------------------------- [--] Up for: 1d 5h 45m 8s (596K q [5.571 qps], 5K conn, TX: 3B, RX: 101M) [--] Reads / Writes: 93% / 7% [--] Total buffers: 168.0M global + 2.7M per thread (151 max threads) [OK] Maximum possible memory usage: 573.8M (28% of installed RAM) [OK] Slow queries: 0% (1/596K) [OK] Highest usage of available connections: 8% (13/151) [OK] Key buffer size / total MyISAM indexes: 8.0M/16.4M [OK] Key buffer hit rate: 99.7% (17M cached / 51K reads) [!!] Query cache is disabled [OK] Sorts requiring temporary tables: 0% (0 temp sorts / 147K sorts) [!!] Temporary tables created on disk: 37% (74K on disk / 198K total) [!!] Thread cache is disabled [!!] Table cache hit rate: 13% (134 open / 967 opened) [OK] Open file limit used: 11% (116/1K) [OK] Table locks acquired immediately: 99% (688K immediate / 689K locks) [OK] InnoDB data size / buffer pool: 1.2M/128.0M -------- Recommendations ----------------------------------------------------- General recommendations: Run OPTIMIZE TABLE to defragment tables for better performance Enable the slow query log to troubleshoot bad queries When making adjustments, make tmp_table_size/max_heap_table_size equal Reduce your SELECT DISTINCT queries without LIMIT clauses Set thread_cache_size to 4 as a starting value Increase table_cache gradually to avoid file descriptor limits Variables to adjust: query_cache_size (>= 8M) tmp_table_size (> 16M) max_heap_table_size (> 16M) thread_cache_size (start at 4) table_cache (> 400) |