【问题标题】:Suggestion in MySQLTunerMySQLTuner 中的建议
【发布时间】:2015-05-12 23:59:53
【问题描述】:

MySQLTuner 中的建议 嗨,我已经运行了 MySQLTuner - perl,我采取了

安全建议

Warning: Using unique option prefix pass instead of password is deprecated and will be removed in a future release. Please use the full name instead.
[OK] All database users have passwords assigned
Warning: Using unique option prefix pass instead of password is deprecated and will be removed in a future release. Please use the full name instead.

性能指标

[--] Up for: 22m 28s (463K q [344.006 qps], 1K conn, TX: 857M, RX: 90M)
[--] Reads / Writes: 99% / 1%
[--] Total buffers: 168.0M global + 2.8M per thread (151 max threads)
[OK] Maximum possible memory usage: 583.2M (1% of installed RAM)
[OK] Slow queries: 0% (0/463K)
[OK] Highest usage of available connections: 12% (19/151)
[OK] Key buffer size / total MyISAM indexes: 8.0M/146.0M
[OK] Key buffer hit rate: 100.0% (184M cached / 55K reads)
[!!] Query cache is disabled
[OK] Sorts requiring temporary tables: 0% (34 temp sorts / 738K sorts)
[!!] Joins performed without indexes: 543
[OK] Temporary tables created on disk: 23% (30K on disk / 131K total)
[!!] Thread cache is disabled
[!!] Table cache hit rate: 0% (400 open / 58K opened)
[OK] Open file limit used: 0% (759/500K)
[OK] Table locks acquired immediately: 99% (842K immediate / 842K locks)
[OK] InnoDB buffer pool / data size: 128.0M/92.3M
[OK] InnoDB log waits: 0

建议

Run OPTIMIZE TABLE to defragment tables for better performance
    MySQL started within last 24 hours - recommendations may be inaccurate
    Enable the slow query log to troubleshoot bad queries
    Adjust your join queries to always utilize indexes
    Set thread_cache_size to 4 as a starting value
    Increase table_open_cache gradually to avoid file descriptor limits
    Read this before increasing table_open_cache over 64: 

要调整的变量:

query_cache_size (>= 8M)
join_buffer_size (> 128.0K, or always use indexes with joins)
thread_cache_size (start at 4)
table_open_cache (> 400)

服务器运行 48gb 和 i7 cpu 在 my.cnf 我有

[mysqld]
max_allowed_packet=268435456
open_files_limit=500000
local-infile=0

有什么建议吗?

【问题讨论】:

  • 关于什么的建议?您从该工具中获得了很多建议。你有什么问题?
  • 是的,建议是“不要使用调整脚本”。使用默认值,除非您有特定的理由要更改它们。只改变你理解的价值观,一次只改变一件事。
  • 附加信息请求。在 pastebin.com 上发布并分享链接。文本结果: B) SHOW GLOBAL STATUS;至少 24 小时正常运行时间后 C) 显示全局变量; D) 显示完整的处理程序; E) 完成 MySQLTuner 报告 F) SHOW ENGINE INNODB STATUS;和 可选的非常有用的信息,如果可用,包括 - htop 或 top 或 mytop 用于大多数活动应用程序,ulimit -a 用于 linux/unix 限制列表,iostat -xm 5 3 用于按设备和核心/cpu 计数的 IOPS,用于服务器工作负载调整分析。

标签: mysql mysqltuner


【解决方案1】:

你应该使用github上最新版本的mysqltuner。

Mysqltuner 说: MySQL 在过去 24 小时内启动 - 建议可能不准确

您应该在较长时间后使用 mysqltuner。

【讨论】:

    猜你喜欢
    • 2015-07-30
    • 1970-01-01
    • 2011-04-14
    • 1970-01-01
    • 2012-12-05
    • 1970-01-01
    • 2011-04-05
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多