<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>Memory on Simon Žekar — unix, communications, stupidities</title><link>https://simon.zekar.com/tags/memory/</link><description>Recent content in Memory on Simon Žekar — unix, communications, stupidities</description><generator>Hugo</generator><language>en-us</language><lastBuildDate>Fri, 30 Jan 2009 22:07:17 +0000</lastBuildDate><atom:link href="https://simon.zekar.com/tags/memory/index.xml" rel="self" type="application/rss+xml"/><item><title>understanding freebsd memory usage</title><link>https://simon.zekar.com/2009/01/30/understanding-freebsd-memory-usage/</link><pubDate>Fri, 30 Jan 2009 22:07:17 +0000</pubDate><guid>https://simon.zekar.com/2009/01/30/understanding-freebsd-memory-usage/</guid><description>&lt;p>I think it is better to write in english, since I’m often googling around about some problem and land on a site in chinese with some configuration pasted in the site.&lt;/p>
&lt;p>The problem is I don’t know what poor chinese boy wrote: “This configuration is working for me:” or “This configuration is not working at all, can someone help me:”. So I try it. Never worked.&lt;/p>
&lt;p>Recently I found a &lt;a href="http://lists.freebsd.org/pipermail/freebsd-questions/2005-February/075925.html">post&lt;/a> which nicely describes statuses of FreeBSD memory allocation.&lt;/p>
&lt;p>Top shows:&lt;/p>
&lt;p>&lt;code>Mem: 4589M Active, 13G Inact, 489M Wired, 733M Cache, 214M Buf, 886M Free&lt;/code>&lt;/p>
&lt;p>And the snip from the post:&lt;/p>
&lt;p>Memory normally moves along the following path:&lt;/p>
&lt;p>Wired -&amp;gt; Active -&amp;gt; Inactive -&amp;gt; Cached -&amp;gt; Free&lt;/p>
&lt;p>and then when it gets allocated and used it moves back to Wired.&lt;/p>
&lt;p>The difference between the categories is mainly that “Inactive” and&lt;br>
“Cached” memory still contains data that the system might be able to&lt;br>
reuse, while “Free” memory is completely free and unused.&lt;br>
In order to use Cached or Inactive memory it might need to be flushed&lt;br>
first, with Inactive probably being dirty and Cached probably not.&lt;br>
(“Active” memory is almost certainly dirty and is therefore somewhat&lt;br>
more expensive to reuse.&lt;/p></description></item></channel></rss>