加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 综合聚焦 > 服务器 > Linux > 正文

linux – 页面分配失败 – 我的内存耗尽了吗?

发布时间:2020-12-13 18:36:42 所属栏目:Linux 来源:网络整理
导读:最近,我注意到我的一个服务器的kern.log中的这样的条目: Feb 16 00:24:05 aramis kernel: swapper: page allocation failure. order:0,mode:0x20 我想知道: 这条消息到底意味着什么? 我的服务器内存不足吗? 交换使用率非常低(低于10%),到目前为止,我没
最近,我注意到我的一个服务器的kern.log中的这样的条目:
Feb 16 00:24:05 aramis kernel: swapper: page allocation failure. order:0,mode:0x20

我想知道:

>这条消息到底意味着什么?
>我的服务器内存不足吗?

交换使用率非常低(低于10%),到目前为止,我没有注意到由于内存不足而导致任何进程被杀死.

附加信息:

>服务器是运行Debian 6.0的Xen实例(DomU)
>它有512 MB的RAM和512 MB的交换分区
>虚拟机内的CPU负载平均显示为0.25

解决方法

Debian bug 666021似乎是同一个问题的报告.建议有:
#change value for this boot
sysctl -w vm.min_free_kbytes=65536

#change value for subsequent boots
echo "vm.min_free_kbytes=65536" >> /etc/sysctl.conf

http://russ.garrett.co.uk/2009/01/01/linux-kernel-tuning/讨论了何时更改此设置可能有用,转载于此处:

This tells the kernel to try and keep 64MB of RAM free at all times.
It’s useful in two main cases:

  • Swap-less machines,where you don’t want incoming network traffic to overwhelm the kernel and force an OOM before it has time to flush
    any buffers.

  • x86 machines,for the same reason: the x86 architecture only allows DMA transfers below approximately 900MB of RAM. So you can end
    up with the bizarre situation of an OOM error with tons of RAM free.

我在3.2.12-gentoo x86机器上应用了这个设置,但我仍然遇到这些错误.

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读