- 浏览: 254984 次
- 性别:
- 来自: 大连
文章分类
最新评论
-
红小豆:
Criteria和Detachedcriteria的区别及应用 -
fjjiaboming:
那就稍微翻译一下 啊....
Mysql autoReconnect 的问题 -
woyaowenzi:
非常感谢,我正想做一个画线的控件,就和windows的画图板一 ...
一个简单的FLEX画图demo -
guzen:
可以用一下flash builder 4,现在支持绝对定位了, ...
how to use flex layouts -
suifeng:
好!
一个简单的FLEX画图demo
Since this problem seems to popup on different lists, this message has
been cross-posted to the general Red Hat discussion list, the RHEL3
(Taroon) list and the RHEL4 (Nahant) list. My apologies for not having
the time to post this summary sooner.
I would still be banging my head against this problem were it not for
the generous assistance of Tom Sightler <ttsig@xxxxxxxxxxxxx> and Brian
Long <brilong@xxxxxxxxx>.
In general, the out of memory killer (oom-killer) begins killing
processes, even on servers with large amounts (6Gb+) of RAM. In many
cases people report plenty of "free" RAM and are perplexed as to why the
oom-killer is whacking processes. Indications that this has happened
appear in /var/log/messages:
Out of Memory: Killed process [PID] [process name].
In my case I was upgrading various VMware servers from RHEL3 / VMware
GSX to RHEL4 / VMware Server. One of the virtual machines on a server
with 16Gb of RAM kept getting whacked by the oom-killer. Needless to
say, this was quite frustrating.
As it turns out, the problem was low memory exhaustion. Quoting Tom:
"The kernel uses low memory to track allocations of all memory thus a
system with 16GB of memory will use significantly more low memory than a
system with 4GB, perhaps as much as 4 times. This extra pressure
happens from the moment you turn the system on before you do anything at
all because the kernel structures have to be sized for the potential of
tracking allocations in four times as much memory."
You can check the status of low & high memory a couple of ways:
# egrep 'High|Low' /proc/meminfo
HighTotal: 5111780 kB
HighFree: 1172 kB
LowTotal: 795688 kB
LowFree: 16788 kB
# free -lm
total used free shared buffers cached
Mem: 5769 5751 17 0 8 5267
Low: 777 760 16 0 0 0
High: 4991 4990 1 0 0 0
-/+ buffers/cache: 475 5293
Swap: 4773 0 4773
When low memory is exhausted, it doesn't matter how much high memory is
available, the oom-killer will begin whacking processes to keep the
server alive.
There are a couple of solutions to this problem:
If possible, upgrade to 64-bit Linux. This is the best solution because
*all* memory becomes low memory. If you run out of low memory in this
case, then you're *really* out of memory. ;-)
If limited to 32-bit Linux, the best solution is to run the hugemem
kernel. This kernel splits low/high memory differently, and in most
cases should provide enough low memory to map high memory. In most
cases this is an easy fix - simply install the hugemem kernel RPM &
reboot.
If running the 32-bit hugemem kernel isn't an option either, you can try
setting /proc/sys/vm/lower_zone_protection to a value of 250 or more.
This will cause the kernel to try to be more aggressive in defending the
low zone from allocating memory that could potentially be allocated in
the high memory zone. As far as I know, this option isn't available
until the 2.6.x kernel. Some experimentation to find the best setting
for your environment will probably be necessary. You can check & set
this value on the fly via:
# cat /proc/sys/vm/lower_zone_protection
# echo "250" > /proc/sys/vm/lower_zone_protection
To set this option on boot, add the following to /etc/sysctl.conf:
vm.lower_zone_protection = 250
As a last-ditch effort, you can disable the oom-killer. This option can
cause the server to hang, so use it with extreme caution (and at your
own risk)!
Check status of oom-killer:
# cat /proc/sys/vm/oom-kill
Turn oom-killer off/on:
# echo "0" > /proc/sys/vm/oom-kill
# echo "1" > /proc/sys/vm/oom-kill
To make this change take effect at boot time, add the following
to /etc/sysctl.conf:
vm.oom-kill = 0
For processes that would have been killed, but weren't because the oom-
killer is disabled, you'll see the following message
in /var/log/messages:
"Would have oom-killed but /proc/sys/vm/oom-kill is disabled"
Sorry for being so long-winded. I hope this helps others who have
struggled with this problem.
发表评论
-
redhat as5.4 安装网站截图软件CutyCapt
2012-02-23 09:21 2080先安装Qt47 Java代码 收藏代码 增加qt4 ... -
linux中将前台进程转入后台的方法
2011-09-07 17:31 2764今天在网上偶然看到一个不错的建议。先更新一下: 以前在使用no ... -
Vnstat: 简单实用的网络流量统计工具
2011-05-18 22:02 1468http://www.linuxeden.com/html/s ... -
视频网站架构
2011-01-23 01:01 1582http://www.doorsolutions.cn/ 概述 ... -
how to install ffmpeg
2011-01-23 00:33 1540A little while back, I posted a ... -
CentOS安装MPlayer
2010-05-31 14:36 1505http://wiki.centos.org/TipsAndT ... -
linux下tomcat启动80端口不能访问的问题
2009-06-15 21:18 7068service iptables save [code=&a ... -
Understanding memory usage on Linux
2009-06-12 10:50 1157This entry is for those people ... -
上传文件到linux时出现的乱码
2009-04-30 16:32 2124遇到见很郁闷的事。 维护一个很老的代码,编码都是gbk的,别 ... -
gdb 使用手册
2009-04-28 16:46 2094简述 一 列文件清单 二 ... -
OOM 机制
2009-03-26 21:40 1220When a system runs out of memor ... -
A Quick Benchmark: Gzip vs. Bzip2 vs. LZMA
2009-03-09 09:50 1473How the test files were selecte ... -
linux 网络配置
2009-03-03 15:54 1151网络信息查看 查看网路接口信息 1.了解lin ... -
linux下删除文件出错
2009-01-12 16:27 2084今天忘记把程序停止, ... -
linux下自动备份mysql数据库
2009-01-12 16:22 1129新建文件: vi /home/bzhang/mysql_aut ... -
计划任务工具 cron 的配置和说明
2009-01-12 10:01 1105计划任务工具 cron 的配置和说明 作者: 北南南 ... -
用vsFTPd自架Linux网络安装服务器,以及Redhat局域网安装的解决办法
2009-01-05 12:06 1309ZZ FROM: http://www.linuxsir.or ... -
Clock in a Linux Guest Runs More Slowly or Quickly
2009-01-04 10:55 2073Clock in a Linux Guest R ... -
IPTABLE 学习
2008-12-30 15:40 958To be continued... -
VSFTP的时间错误
2008-12-30 10:31 843vsftp的配置问题 /etc/vsftpd/vsftpd.c ...
相关推荐
OOM Killer,全称为Out of Memory Killer,是Linux内核中的一种机制,用于处理系统内存不足的情况。当系统内存耗尽时,为了避免整个系统的崩溃,OOM Killer会选择并终止一些进程来释放内存,从而确保系统的稳定运行...
文档标题和描述中提到的“ANDROIDBITMAP内存限制OOM,OUTOFMEMORY”指的就是在处理位图(BITMAP)时超出了虚拟机(VM)的内存预算,导致系统抛出OutOfMemoryError异常。 根据给出的内容部分,我们可以推断出以下知识...
在 Linux 系统中,OOM Killer处理机制是通过out_of_memory()函数来触发的,该函数会调用select_bad_process()函数来选择一个“bad”进程杀掉。select_bad_process()函数会根据进程的内存占用情况来判断和选择一个...
在Android开发中,我们经常会遇到内存管理的问题,特别是与Bitmap相关的内存溢出(Out Of Memory,简称OOM)问题。Bitmap对象是Android系统中用于处理图像数据的重要类,但由于其消耗大量的内存,不当使用可能导致...
Android 加载大图及多图避免程序出现OOM(OutOfMemory)异常 1、高效加载大图片 我们在编写Android程序的时候经常要用到许多图片,不同图片总是会有不同的形状、不同的大小,但在大多数情况下,这些图片都会大于我们...
如果不能使用,请修改根目录下的project.property的android:target为你当前有的target(不知道怎么改的同学可以从8到21一个个数字去试哦) ...但打开时无自动聚焦,这个问题有需要的同学可以自己加上去哦。...
1 概述 Android的设计理念之一,便是应用程序退出,但进程还会继续存在系统以便...Android基于Linux的系统,其实Linux有类似的内存管理策略——OOM killer,全称(Out Of Memory Killer), OOM的策略更多的是用于分配内存
在Android开发过程中,"Out Of Memory"(OOM)错误是一个常见的问题,特别是在处理大量数据、图像或者长时间运行的任务时。这个错误表示应用程序消耗了过多的内存,超过了系统分配的限制,导致系统无法再为该应用...
在Linux系统中,当内存资源紧张,即将耗尽时,为避免系统崩溃,Linux内核引入了一种称为OOM (Out Of Memory) Killer的机制。OOM Killer会选择性地杀死某些进程以回收内存。这一机制主要针对系统可用内存(包括Swap...
当应用程序出现Out of Memory (OOM)错误时,通常意味着系统无法分配足够的内存来执行任务,这时就需要借助专业的分析工具来查找问题的根源。MemoryAnalyzer(MAT)是IBM开发的一款强大的JVM堆内存分析工具,它能够...
在使用PyTorch进行深度学习模型训练时,有时会遇到一个常见的问题,即GPU显存充足,但在运行过程中却报出“out of memory”错误。这种情况可能会让人困惑,因为直观上,既然显存足够,就不应该出现这样的问题。本文...
FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - JavaScript heap out of memory 1: node::Abort() [node] 2: 0x8cd49c [node] 3: v8::Utils::ReportOOMFailure(char const*, bool) [node] 4: v8::...
Mar 9 11:29:16 xxxxxx kernel: mysqld invoked oom-killer: gfp_mask=0x201da, order=0, oom_adj=0, oom_score_adj=0 Mar 9 11:29:16 xxxxxx kernel: mysqld cpuset=/ mems_allowed=0 Mar 9 11:29:16 x
kubernetes-oom-event-generator 容器启动时生成Kubernetes事件,并指示该容器先前已被杀死。设计控制器侦听Kubernetes API中的新事件和事件更改。 每次收到有关事件的通知时,它都会根据事件的Reason和所涉及对象的...
Android内存回收机制策略 1、GC 2、lowmemorykiller GC GC是java虚拟机的内存...OOM(Out Of Memory) : Android内存管理机制及优化方法(https://www.2cto.com/kf/201805/741791.html) 简言之,即应用占用的最大内存
Linux操作系统的OOM (Out-Of-Memory) Killer是一个重要的内存管理机制,用于处理系统内存不足的情况。当系统资源极度紧张,无法分配新的内存时,OOM Killer会选择并终止一个或多个进程,以释放足够的内存资源,防止...
当Linux系统面临内存不足的压力时,内核会启动一个称为“Out-of-Memory (OOM) Killer”的机制来防止系统崩溃。然而,OOM Killer可能会选择终止重要的进程,包括Erlang应用程序。针对这种情况,有一个名为“heart_oom...
Android 使用 OkHttp 可能引发 OOM 的一个点 在 Android 开发中,使用 OkHttp 库是非常常见的,但是在使用 OkHttp 时,我们需要注意一个可能引发 OOM 的点,那就是在签名校验中对 RequestBody 的处理。 首先,让...