Date: Mon, 22 Oct 2001 16:04:17 -0400 From: Bob Johnson <bob89@garbonzo.hos.ufl.edu> To: marco@radzinschi.com Cc: questions@freebsd.org Subject: Re: Q: Inactive vs. free memory? Message-ID: <3BD47BC1.310AF913@garbonzo.hos.ufl.edu>
next in thread | raw e-mail | index | archive | help
> Date: Sun, 21 Oct 2001 14:20:20 -0400 (EDT) > From: Marco Radzinschi <marco@radzinschi.com> > Subject: Q: Inactive vs. free memory? > > Hello: > > I am confused by the inactive and free readings given by top. I > certainly understand the free part, but what is the inactive memory being > used for? > See http://www.freebsd.org/doc/en_US.ISO8859-1/articles/vm-design/ and more specifically, http://www.freebsd.org/doc/en_US.ISO8859-1/articles/vm-design/x75.html The relatively short answer is that "Inactive" memory is dirty memory that needs to be written to swap before it can be reallocated. "Cache" is memory that can be reallocated immediately, either because it has already been written to swap, or for some reason it can be reused without doing so (I suppose an example of this would be executable code that will be re-read from the original file if it is needed again). Memory gets into the "Inactive" or "Cache" queue by not being accessed for a while. Something is still claiming it, but since it hasn't been accessed recently, it is considered a good candidate for re-use when something else needs some physical memory. If the process that owns the memory accesses it, it will be moved back to "Active" without any swapping being necessary. > Below is a typical top reading on a box with 256 MB of RAM. > > Mem: 26M Active, 174M Inact, 23M Wired, 11M Cache, 35M Buf, 16M Free > Swap: 1024M Total, 1024M Free > > Could anyone clarify what FreeBSD is doing with the 174MB of inactive > memory? > Well, basically, it is doing nothing but watching it age. If necessary, it will eventually be written to swap. That's not going to happen until memory needs can't be met from the "Free" and "Cache" pools. > Thanks, > > Marco Radzinschi > > E-Mail: marco@radzinschi.com > AOL IM: CrackedBoy > - Bob To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3BD47BC1.310AF913>