mysqltuner.pl_使用MYSQLTUNER

mysqltuner.pl

要求 (REQUIREMENTS)

Before you start, you'll need the following:

在开始之前,您需要满足以下条件:

IMPORTANT NOTICE

重要通知

The MySQLTuner script will make suggestions for changes you can make to your server to optimize your MySQL services. Media Temple does not support any suggested configuration changes. We encourage you to back up your service before making any of the changes recommended by the script.

MySQLTuner脚本将为您提供建议,以便您可以对服务器进行更改以优化MySQL服务。 Media Temple不支持任何建议的配置更改。 我们建议您在进行脚本建议的任何更改之前先备份服务。


(
)

This article is provided as a courtesy. Installing, configuring, and troubleshooting third-party applications is outside the scope of support provided by Media Temple. Please take a moment to review the Statement of Support. Please consult the MySQLTuner blog for further assistance.

本文是出于礼貌提供的。 第三方应用程序的安装,配置和故障排除不在Media Temple提供的支持范围内。 请花一点时间查看支持声明 。 请查询MySQLTuner博客以获得更多帮助。

使用说明 (INSTRUCTIONS)

  1. Log into your server with a root or sudo user via SSH.

    通过SSH以root或sudo用户身份登录到服务器。
  2. Download MySQLTuner by executing the following command:
    wget -O mysqltuner.pl https://raw.githubusercontent.com/major/MySQLTuner-perl/master/mysqltuner.pl --no-check-certificate

    通过执行以下命令下载MySQLTuner:
  3. Give the script 775 permissions:
    chmod 775 mysqltuner.pl

    授予脚本775权限:
  4. Run the script with the following command:
    perl mysqltuner.pl

    使用以下命令运行脚本:
  5. The script should run and then display statistics and recommendations. Sample output:
    >>  MySQLTuner 1.0.1 - Major Hayden <major@mhtx.net> >>  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.0.77 [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: 122K (Tables: 99) [--] Data in InnoDB tables: 52M (Tables: 155) [!!] Total fragmented tables: 5 
    -------- Performance Metrics ------------------------------------------------- [--] Up for: 262d 23h 58m 26s (2M q [0.121 qps], 328K conn, TX: 572M, RX: 207M) [--] Reads / Writes: 66% / 34% [--] Total buffers: 35.0M global + 2.7M per thread (100 max threads) [OK] Maximum possible memory usage: 303.7M (45% of installed RAM) [OK] Slow queries: 0% (3/2M) [OK] Highest usage of available connections: 5% (5/100) [OK] Key buffer size / total MyISAM indexes: 8.0M/401.0K [!!] Key buffer hit rate: 93.9% (110K cached / 6K reads) [OK] Query cache efficiency: 82.8% (932K cached / 1M selects) [OK] Query cache prunes per day: 11 [OK] Sorts requiring temporary tables: 0% (0 temp sorts / 29K sorts) [OK] Temporary tables created on disk: 25% (88K on disk / 348K total) [!!] Thread cache is disabled [!!] Table cache hit rate: 0% (64 open / 184K opened) [OK] Open file limit used: 8% (86/1K) [OK] Table locks acquired immediately: 100% (339K immediate / 339K locks) [!!] InnoDB data size / buffer pool: 52.6M/2.0M 
    -------- Recommendations ----------------------------------------------------- General recommendations: Run OPTIMIZE TABLE to defragment tables for better performance Enable the slow query log to troubleshoot bad queries Set thread_cache_size to 4 as a starting value Increase table_cache gradually to avoid file descriptor limits Variables to adjust: thread_cache_size (start at 4) table_cache (> 64) innodb_buffer_pool_size (>= 52M)

    该脚本应运行,然后显示统计信息和建议。 样本输出:
  6. Feel free to implement these suggestions at your own discretion.

    您可以自行决定实施这些建议。

For more tips, visit Media Temple's Support Community.

有关更多提示,请访问 Media Temple的支持社区

如果您尚未从Media Temple订购新的DV服务器, 请单击此处立即进行操作(If you haven't already ordered your new DV server from Media Temple, click here to do that now.)

翻译自: https://www.experts-exchange.com/articles/31524/USING-MYSQLTUNER.html

mysqltuner.pl

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值