数据库教程:mysql性能优化脚本mysqltuner.pl使用介绍分享

MySQLTuner下载地址:https://github.com/rackerhacker/MySQLTuner-perl

MySQLTuner使用方法:
DownloadingandusingMySQLTunerisactuallyaverysimpleprocess:

wgetmysqltuner.pl
perlmysqltuner.pl

Ifyou’drathernotinvokeperleverytime,justmakeitexecutable:

chmodu+xmysqltuner.pl
./mysqltuner.pl

»Latestdevelopmentversion
Ifyouwanttogetthebleedingedgecommits,youcancheckoutthelatestcodewithgit:

gitclonegit://github.com/rackerhacker/MySQLTuner-perl.git

看看我的运行结果

代码如下:
>>MySQLTuner1.1.1-MajorHayden
>>Bugreports,featurerequests,anddownloadsathttps://mysqltuner.com/
>>Runwith’–help’foradditionaloptionsandoutputfiltering

——–GeneralStatistics————————————————–
[–]SkippedversioncheckforMySQLTunerscript
[OK]CurrentlyrunningsupportedMySQLversion5.1.43-log
[OK]Operatingon64-bitarchitecture

——–StorageEngineStatistics——————————————-
[–]Status:-Archive-BDB-Federated-InnoDB-ISAM-NDBCluster
[–]DatainMyISAMtables:889M(Tables:479)
[–]DatainMEMORYtables:1M(Tables:4)
[!!]Totalfragmentedtables:29

——–SecurityRecommendations——————————————-
[OK]Alldatabaseusershavepasswordsassigned

——–PerformanceMetrics————————————————-
[–]Upfor:12h55m27s(4Mq[105.230qps],295Kconn,TX:9B,RX:546M)
[–]Reads/Writes:82%/18%
[–]Totalbuffers:432.0Mglobal+6.3Mperthread(500maxthreads)
[!!]Maximumpossiblememoryusage:3.5G(175%ofinstalledRAM)
[OK]Slowqueries:0%(48K/4M)
[OK]Highestusageofavailableconnections:3%(16/500)
[OK]Keybuffersize/totalMyISAMindexes:384.0M/332.6M
[OK]Keybufferhitrate:100.0%(2Bcached/205Kreads)
[OK]Querycacheefficiency:49.3%(1Mcached/3Mselects)
[!!]Querycacheprunesperday:268042
[OK]Sortsrequiringtemporarytables:0%(10tempsorts/122Ksorts)
[OK]Temporarytablescreatedondisk:19%(4Kondisk/22Ktotal)
[OK]Threadcachehitrate:99%(16created/295Kconnections)
[!!]Tablecachehitrate:18%(256open/1Kopened)
[OK]Openfilelimitused:19%(497/2K)
[!!]Tablelocksacquiredimmediately:88%

——–Recommendations—————————————————–
Generalrecommendations:
RunOPTIMIZETABLEtodefragmenttablesforbetterperformance
MySQLstartedwithinlast24hours-recommendationsmaybeinaccurate
ReduceyouroverallMySQLmemoryfootprintforsystemstability
Increasetable_cachegraduallytoavoidfiledescriptorlimits
Optimizequeriesand/oruseInnoDBtoreducelockwait
Variablestoadjust:
***MySQL’smaximummemoryusageisdangerouslyhigh***
***AddRAMbeforeincreasingMySQLbuffervariables***
query_cache_size(>32M)
table_cache(>256)

您可能感兴趣的文章:MySQL性能优化的一些技巧帮助你的数据库MySQL性能优化MySQLDBA教程:Mysql性能优化之缓存参数优化MySQL性能优化之路—修改配置文件my.cnfMySQL性能优化配置参数之thread_cache和table_cache详解MySQL性能优化之max_connections配置参数浅析MySQL性能优化之table_cache配置参数浅析MySQL性能优化之Open_Table配置参数的合理配置建议php导入大量数据到mysql性能优化技巧SQL性能优化之定位网络性能问题的方法(DEMO)

标签: mysql 脚本 优化 性能优化 sq pl 性能

MySQL查询优化:连接查询排序浅谈

MySQL 主键与索引的联系与区别分析

上述就是数据库技术:mysql性能优化脚本mysqltuner.pl使用介绍分享的全部内容,如果对大家有所用处且需要了解更多关于mysql数据库学习教程,希望大家多多关注—计算机技术网(www.ctvol.com)!

本文来自网络收集,不代表计算机技术网立场,如涉及侵权请联系管理员删除。

ctvol管理联系方式QQ:251552304

本文章地址:https://www.ctvol.com/dtteaching/910580.html

(0)
上一篇 2021年10月24日
下一篇 2021年10月24日

精彩推荐