CDH集群频繁告警(host频繁swapping)

本文介绍如何通过调整Linux内核参数vm.swappiness来解决CDH集群中因频繁交换内存到磁盘而导致的性能问题。默认情况下,此参数值为60,这可能导致即使存在可用内存的情况下仍进行内存交换,从而影响稳定性与性能。Cloudera建议将该参数设置为0。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

最近CDH集群频繁告警,原因是某些host频繁swapping,极大影响了集群的性能。

后来发现有个设置(/proc/sys/vm/swappiness)需要修改,默认值60

Setting the vm.swappiness Linux Kernel Parameter

vm.swappiness is a Linux Kernel Parameter that controls how aggressively memory pages are swapped to disk. It can be set to a value between 0-100; the higher the value, the more aggressive the kernel is in seeking out inactive memory pages and swapping them to disk.

You can see what value vm.swappiness is currently set to by looking at /proc/sys/vm; for example:

cat /proc/sys/vm/swappiness

On most systems, it is set to 60 by default. This is not suitable for Hadoop clusters nodes, because it can cause processes to get swapped out even when there is free memory available. This can affect stability and performance, and may cause problems such as lengthy garbage collection pauses for important system daemons. Cloudera recommends that you set this parameter to 0; for example:

# sysctl -w vm.swappiness=0 

转载于:https://www.cnblogs.com/yako/p/5379697.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值