myisam_sort_buffer_size 与 sort_buffer_size
我的服务器是 MySQL,内存为 6GB。我需要知道 myisam_sort_buffer_size 和 sort_buffer_size 之间有什么区别?
我为它们设置了以下大小:
myisam_sort_buffer_size = 8M
sort_buffer_size = 256M
另请提及这些值是否良好或需要调整?
谢谢
I am MySQL on server with 6GB RAM. I need to know what is the difference between myisam_sort_buffer_size and sort_buffer_size?
I have following size set to them:
myisam_sort_buffer_size = 8M
sort_buffer_size = 256M
Please also mention if these values are fine or need adjustments?
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
sort_buffer_size:
MySQL 文档:
您的 sort_buffer_size 值似乎非常高。默认为2M。我建议不要大于此值,因为更高的值会降低性能。 有些人建议较小的值,例如 256kB。要记住的一件事是,这是每个客户端会话的值,而不是全局值。大的值会快速累加。
myisam_sort_buffer_size:
MySQL 文档:
你的 myisam_sort_buffer_size 看起来不错。除非您使用 ALTER TABLE 或 REPAIR TABLE 等重建索引,否则这不会相关。
sort_buffer_size:
MySQL documentation:
Your sort_buffer_size value seems extremely high. The default is 2M. I'd recommend going no larger than that since there is a performance penalty for going higher. Some people recommend smaller values such as 256kB. One thing to remember is this is per-client-session, it's not a global value. Large values will add up fast.
myisam_sort_buffer_size:
MySQL documentation:
Your myisam_sort_buffer_size seems fine. This won't be relevant unless you are rebuilding indexes using ALTER TABLE or REPAIR TABLE etc.
这些参数是针对每个线程的,因此请检查 max_connections 的数量。
即,使用 15GB RAM,
我收到 mysqltuner 警告:
所以我确实将其降低到默认值。
These arguments is per thread, so check out the number of max_connections.
I.e. with 15GB of RAM
I'm getting mysqltuner warning:
So I did lower it to the default value.
排序缓冲区大小=256K
是最好的。你尝试这个并重新启动 mysql 服务器并监控几个小时,你可以很容易地注意到好处
sort_buffer_size =256K
is best.you try this and restart the mysql server and monitor for few hours you can easily notice the benefit