大网数据广告活动
服务器运维问答

Mysql filling all the buff/cache memory

· 52CE 我爱测

The more time the server run, the more buff/cache Mysql processes use, i'm at 95% right now and only a server reboot free the buff/cache memory. None of the mysql commands free it on the go. Is it a normal behavior? What if my ot…

问题原文

原帖链接 · Owow · CC BY-SA 4.0

The more time the server run, the more buff/cache Mysql processes use, i'm at 95% right now and only a server reboot free the buff/cache memory. None of the mysql commands free it on the go.

Is it a normal behavior? What if my others processes need memory and Mysql use all the remaining with the buff/cache ? Will it unclaim it automatically or the server will just probably crash...?

已采纳解答

原帖链接 · John Mahowald · CC BY-SA 4.0

Your htop screenshot is very difficult to read. Unfortunately, capturing text does not help as the colors are significant. See also: What exactly do the colors in htop status bars mean? For the benefit of the less-sighted: the Mem line is 12 lines of green used, 1 of blue buffers, and 70 of yellow/orange cache. 950M used of 7.6GB. No swap.

This use of all available RAM for caches is normal. DRAM is much faster than permanent storage, which provides a performance boost. Memory will be reclaimed on demand, from caches first.

Observe it yourself. Run something that would use some memory, like applying software updates. Watch it not crash. See if reclaim has a noticeable impact on performance.

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Server Fault
适用范围
以原帖系统、软件版本与发布日期为准(2020-11-26)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 4.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。