  | |  | Strange out of memory | Strange out of memory 2004-05-07 - By Robert Brod�n
Back Hi,
I have 3 servers that runs out of memory about once every 2-3 days. The strange thing is that they are populated with 6 GB of memory and they use only about 4 GB. From what I can se it seams like the problem is that the cache uses up all available memory and then fails to release it when it 's needed by some other process, due to this the system kills a few of my processes and logs "Out of memory - Killing process xxxx " in the message log.
the moment before this happens a free yields this:
total used free shared buffers cached
Mem: 6190296 6165828 24468 0 116284 1978136
-/+ buffers/cache: 4071408 2118888
Swap: 0 0 0
It actually even has triggered a core dump with a system halt once!
(We do not use swap and really don 't want to either since we depend on having data accessible instantly and the delay we would get if the application would be swapped out is unacceptable, besides that it really shouldn 't be needed with 2 spare GB right?)
Does anyone know how to limit the cache (or even better, patch this "bug ")?
Regards
// Robert Broden
<html >
<head >
<meta http-equiv=Content-Type content= "text/html; charset=iso-8859-1 " >
<meta name=Generator content= "Microsoft Word 10 (filtered) " >
<style >
<!--
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
margin-bottom:.0001pt;
font-size:12.0pt;
font-family: "Times New Roman ";}
a:link, span.MsoHyperlink
{color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{color:purple;
text-decoration:underline;}
p
{margin-right:0cm;
margin-left:0cm;
font-size:12.0pt;
font-family: "Times New Roman ";}
span.EmailStyle17
{font-family:Arial;
color:windowtext;}
@(protected) Section1
{size:612.0pt 792.0pt;
margin:72.0pt 90.0pt 72.0pt 90.0pt;}
div.Section1
{page:Section1;}
-- >
</style >
</head >
<body lang=SV link=blue vlink=purple >
<div class=Section1 >
<p class=MsoNormal > <font size=2 face=Arial > <span lang=EN-GB style= 'font-size:
10.0pt;font-family:Arial ' >Hi, </span > </font > </p >
<p class=MsoNormal > <font size=2 face=Arial > <span lang=EN-GB style= 'font-size:
10.0pt;font-family:Arial ' > </span > </font > </p >
<p class=MsoNormal > <font size=2 face=Arial > <span lang=EN-GB style= 'font-size:
10.0pt;font-family:Arial ' >I have 3 servers that runs out of memory about once
every 2-3 days. The strange thing is that they are populated with 6 GB of
memory and they use only about 4 GB. From what I can se it seams like the
problem is that the cache uses up all available memory and then fails to
release it when it’s needed by some other process, due to this the system
kills a few of my processes and logs “Out of memory – Killing
process xxxx” in the message log. </span > </font > </p >
<p class=MsoNormal > <font size=2 face=Arial > <span lang=EN-GB style= 'font-size:
10.0pt;font-family:Arial ' > </span > </font > </p >
<p class=MsoNormal > <font size=2 face=Arial > <span lang=EN-GB style= 'font-size:
10.0pt;font-family:Arial ' >the moment before this happens a free yields
this: </span > </font > </p >
<p class=MsoNormal > <font size=2 face=Arial > <span lang=EN-GB style= 'font-size:
10.0pt;font-family:Arial ' > </span > </font > </p >
<p class=MsoNormal > <font size=2 face=Arial > <span lang=EN-GB style= 'font-size:
10.0pt;font-family:Arial ' > total
used free
shared buffers cached </span > </font > </p >
<p class=MsoNormal > <font size=2 face=Arial > <span lang=EN-GB style= 'font-size:
10.0pt;font-family:Arial ' >Mem:
6190296 6165828
24468
0 116284 1978136 </span > </font > </p >
<p class=MsoNormal > <font size=2 face=Arial > <span lang=EN-GB style= 'font-size:
10.0pt;font-family:Arial ' >-/+ buffers/cache: 4071408
2118888 </span > </font > </p >
<p class=MsoNormal > <font size=2 face=Arial > <span lang=EN-GB style= 'font-size:
10.0pt;font-family:Arial ' >Swap:
0
0 0 </span > </font > </p >
<p class=MsoNormal > <font size=2 face=Arial > <span lang=EN-GB style= 'font-size:
10.0pt;font-family:Arial ' > </span > </font > </p >
<p class=MsoNormal > <font size=2 face=Arial > <span lang=EN-GB style= 'font-size:
10.0pt;font-family:Arial ' >It actually even has triggered a core dump with a
system halt once! </span > </font > </p >
<p class=MsoNormal > <font size=2 face=Arial > <span lang=EN-GB style= 'font-size:
10.0pt;font-family:Arial ' > </span > </font > </p >
<p class=MsoNormal > <font size=2 face=Arial > <span lang=EN-GB style= 'font-size:
10.0pt;font-family:Arial ' >(We do not use swap and really don’t want to
either since we depend on having data accessible instantly and the delay we
would get if the application would be swapped out is unacceptable, besides that
it really shouldn’t be needed with 2 spare GB right?) </span > </font > </p >
<p class=MsoNormal > <font size=2 face=Arial > <span lang=EN-GB style= 'font-size:
10.0pt;font-family:Arial ' > </span > </font > </p >
<p class=MsoNormal > <font size=2 face=Arial > <span lang=EN-GB style= 'font-size:
10.0pt;font-family:Arial ' >Does anyone know how to limit the cache (or even
better, patch this “bug”)? </span > </font > </p >
<p class=MsoNormal > <font size=2 face=Arial > <span lang=EN-GB style= 'font-size:
10.0pt;font-family:Arial ' > </span > </font > </p >
<p class=MsoNormal > <font size=2 face=Arial > <span lang=EN-GB style= 'font-size:
10.0pt;font-family:Arial ' >Regards </span > </font > </p >
<p class=MsoNormal > <font size=2 face=Arial > <span lang=EN-GB style= 'font-size:
10.0pt;font-family:Arial ' >// Robert Broden </span > </font > </p >
<p class=MsoNormal > <font size=2 face=Arial > <span lang=EN-GB style= 'font-size:
10.0pt;font-family:Arial ' > </span > </font > </p >
<p class=MsoNormal > <font size=2 face=Arial > <span lang=EN-GB style= 'font-size:
10.0pt;font-family:Arial ' > </span > </font > </p >
<p class=MsoNormal > <font size=3 face= "Times New Roman " > <span lang=EN-GB
style= 'font-size:12.0pt ' > </span > </font > </p >
</div >
</body >
</html >
|
|
|