gpt4 book ai didi

mysql - MySQLTuner 中的建议

转载 作者:行者123 更新时间:2023-11-29 22:26:51 24 4
gpt4 key购买 nike

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

有什么建议吗?

最佳答案

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

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

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

关于mysql - MySQLTuner 中的建议,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30203396/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com