Linux SLUB: unable to allocate memory on node

We very often receive messages below in /var/log/messages

kernel: SLUB: Unable to allocate memory on node -1 (gfp=0x8020)

      

In some cases, a distribution table follows

kernel:    cache: sigqueue(12019:454c4ebd186d964699132181ad7367c669700f7d8991c47d4bc053ed101675bc), object size: 160, buffer size: 160, default order: 0, min order: 0
kernel:    node 0: slabs: 57, objs: 23313, free: 0
kernel:    node 1: slabs: 35, objs: 14315, free: 0

      

Ok, free 0, but how can this be configured?

Following is the installation information


OS - Centos7.3
Kernel - 3.10.0-327.36.3.el7.x86_64
Docker - 1.12.6
Kubernetes - 1.5.5

      

We have a private cloud based on kurbernetes with 10 nodes; Until last month it worked fine, and now we get these warnings very often on all nodes, over the past few days the number of containers / containers has also increased.

We have enough memory

, and cpu

on each node.

Any tweak to these warnings would be very helpful.

Further information: optionssysctl.conf

net.ipv4.tcp_timestamps = 0 
net.ipv4.tcp_max_syn_backlog = 4096 
net.core.somaxconn = 1024 
net.ipv4.tcp_syncookies = 1 
net.core.rmem_max = 16777216 
net.core.wmem_max = 16777216 
net.core.rmem_default = 65535 
net.core.wmem_default = 65535 
net.ipv4.tcp_rmem = 4096 87380 16777216 
net.ipv4.tcp_wmem = 4096 65536 16777216 
net.ipv4.ip_local_port_range = 1024 65535 
vm.max_map_count = 262144 
vm.swappiness=10 
vm.vfs_cache_pressure=100

      

+5


source to share


2 answers


the problems seem to be related to kernel

, you should first check if the swap memory is allocated correctly, or free -m

and mkswap -c

, if the swap is not assigned properly, do so. if swap is ok then you may need to update your kernel.



0


source


Please take a look at this: https://pingcap.com/blog/try-to-fix-two-linux-kernel-bugs- while-testing-tidb-operator-in-k8s / . This is a kernel bug.



0


source







All Articles