You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

AlmaLinux 9.4升级后MariaDB持续占用交换分区问题求助

AlmaLinux 9.4升级后MariaDB持续占用交换分区问题求助

各位大佬好,最近把几台服务器从AlmaLinux 9.3升级到9.4后,碰到了个闹心的问题:MariaDB开始持续且越来越多地占用交换分区(swap),升级前完全没这情况。

先给大家同步下当前环境细节:

  • MariaDB版本:10.11.8
  • 系统vm.swappiness配置:1(本来就是想尽量让系统别碰swap)

我用MySQLTuner 2.5.3做了检测,输出结果如下:

-------- Performance Metrics -----------------------------------------------------------------------
[--] Up for: 9h 12m 55s (780K q [23.532 qps], 33K conn, TX: 3G, RX: 1G)
[--] Reads / Writes: 88% / 12%
[--] Binary logging is disabled
[--] Physical Memory     : 7.5G
[--] Max MySQL memory    : 3.5G
[--] Other process memory: 0B
[--] Total buffers: 3.3G global + 1.7M per thread (25 max threads)
[--] Performance_schema Max memory usage: 110M
[--] Galera GCache Max memory usage: 0B
[OK] Maximum reached memory usage: 3.4G (45.86% of installed RAM)
[OK] Maximum possible memory usage: 3.5G (46.12% of installed RAM)
[OK] Overall possible memory usage with other process is compatible with memory available
[OK] Slow queries: 0% (0/780K)
[OK] Highest usage of available connections: 52% (13/25)
[OK] Aborted connections...(原输出此处截断)

从检测数据看,MariaDB实际用到的内存最多才到物理内存的45%左右,远没到吃满内存的地步,而且swappiness设得这么低,按理说不该出现swap持续被占用的情况。

有没有大佬遇到过AlmaLinux 9.4升级后类似的MariaDB内存/swap异常问题?或者能给我点排查方向?比如是不是新系统的内核参数有变化、MariaDB在新系统下有配置兼容问题?麻烦大家支支招了!

备注:内容来源于stack exchange,提问作者ivp

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.04.17 08:19:29