No subject


Tue Nov 13 08:16:38 EST 2012


  http://support.coraid.com/support/linux/EtherDrive-2.6-HOWTO-5.html#ss5.19

... there's this example:

echo 3 > /proc/sys/vm/dirty_ratio
echo 4 > /proc/sys/vm/dirty_background_ratio
echo 32768 > /proc/sys/vm/min_free_kbytes

You'd have to read about those settings and think about the right values
for your particular circumstances, but they might be interesting to you.
-- 
  Ed Cashin <ecashin at noserose.net>
  http://noserose.net/e/
  http://www.coraid.com/

--089e011600989693dc04e4dabfe2
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">On Sun, Aug 25, 2013 at 11:36 PM, Alex Carver <span dir=3D=
"ltr">&lt;<a href=3D"mailto:agcarver+ale at acarver.net" target=3D"_blank">agc=
arver+ale at acarver.net</a>&gt;</span> wrote:<br><div class=3D"gmail_extra"><=
div class=3D"gmail_quote">
<blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-=
left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;p=
adding-left:1ex"><div class=3D"im">On 8/25/2013 19:34, Brian Mathis wrote:<=
br>

<blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-=
left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;p=
adding-left:1ex">
<br>
The &#39;free&#39; command will directly show you how much of the used RAM =
is in<br>
buffers/cache, and how much is in use by programs. =A0As far as reducing RA=
M<br>
used for cache, you almost always don&#39;t want to do that. =A0RAM is both=
 fast<br>
and expensive, so unused RAM is wasted RAM. =A0Linux is smart enough to be<=
br>
able to free buffers/cache when a program needs to use it.<br>
</blockquote>
<br></div>
I know in theory it&#39;s supposed to be smart enough but I don&#39;t think=
 that&#39;s the case on this particular system. =A0It appears to be caching=
 things that don&#39;t get reused so there&#39;s almost no value to the cac=
he.<br>

<br>
The main job of this particular system is to log data and then present a fe=
w micro websites (20-30kB pages) that update regularly. =A0Each page is dyn=
amic (generated each visit by polling the database) so there isn&#39;t much=
 to cache.<br>
</blockquote><div><br></div><div>Sometimes stuff that&#39;s cached is &quot=
;free&quot; even though it doesn&#39;t show up as &quot;free&quot;. =A0:)</=
div><div><br></div><div>For example, if there are blocks on disk that are p=
art of the apache executable, then those blocks get mapped read-only into m=
emory. =A0You can see regions like that in the &quot;maps&quot; in /proc.</=
div>
<div><br></div><div>=A0 awk &#39;$2~/r/&amp;&amp;$2!~/rw/{print}&#39; /proc=
/$$/maps</div><div><br></div><div>If the system needs a free page of memory=
 to, e.g., run awk, then all that stuff is essentially ready to be used, si=
nce the blocks can be read from disk if they&#39;re needed again. =A0So eve=
n though it doesn&#39;t show up as free, it&#39;s usable.</div>
<div><br></div><div>The cached data that cannot be used is dirty data, and =
sometimes there&#39;s an advantage to telling the kernel to flush out write=
s from RAM to the slower backing store, disk or whatever. =A0And yes, there=
 are knobs for that.</div>
<div><br></div><div>From this text,</div><div><br></div><div>=A0=A0<a href=
=3D"http://support.coraid.com/support/linux/EtherDrive-2.6-HOWTO-5.html#ss5=
.19">http://support.coraid.com/support/linux/EtherDrive-2.6-HOWTO-5.html#ss=
5.19</a></div>
</div><div><br></div><div>... there&#39;s this example:</div><div><br></div=
><div><blockquote style=3D"color:rgb(0,0,0);font-family:Times;font-size:med=
ium"><code><pre>echo 3 &gt; /proc/sys/vm/dirty_ratio=20
echo 4 &gt; /proc/sys/vm/dirty_background_ratio=20
echo 32768 &gt; /proc/sys/vm/min_free_kbytes
</pre></code></blockquote><p style=3D"color:rgb(0,0,0);font-family:Times;fo=
nt-size:medium"></p></div><div>You&#39;d have to read about those settings =
and think about the right values for your particular circumstances, but the=
y might be interesting to you.</div>
-- <br>=A0 Ed Cashin &lt;<a href=3D"mailto:ecashin at noserose.net">ecashin at no=
serose.net</a>&gt;<br>=A0 <a href=3D"http://noserose.net/e/">http://noseros=
e.net/e/</a><br>=A0 <a href=3D"http://www.coraid.com/">http://www.coraid.co=
m/</a>
</div></div>

--089e011600989693dc04e4dabfe2--


More information about the Ale mailing list