Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 13 Feb 2004 15:28:34 -0600
From:      "dap" <dap99@i-55.com>
To:        <questions@freebsd.org>
Subject:   Determining free memory on FreeBSD 4.8-REL
Message-ID:  <00bc01c3f278$5f6dbb10$6401a8c0@yourqqh4336axf>

next in thread | raw e-mail | index | archive | help
I know this question has been asked, but the answers I find tend to be along
the lines of "Well, it's complicated."

How do I determine if my FreeBSD is actually low on memory not? And what is
Inact? I did read the manpages, but even they seem to skirt how I should
view Inact vs. Free. (I did read the tuning manpage.)

Let's say I have this:

last pid: 23737;  load averages:  0.21,  0.15,  0.27  up 5+20:43:14
15:22:31
231 processes: 1 running, 230 sleeping
CPU states:  5.0% user,  0.0% nice,  2.7% system,  1.6% interrupt, 90.7%
idle
Mem: 76M Active, 25M Inact, 62M Wired, 2876K Cache, 35M Buf, 82M Free
Swap: 496M Total, 41M Used, 456M Free, 8% Inuse

So I have 82MB of free memory, 35MB of memory being used by the OS as disk
IO, cache is different from Buf in some way or another (the top manpage
doesn't quite go into details here). I don't quite get Inact and Wired.

Why am I using 41MB of swap then if I have 82MB of free memory?

On another box I have:

last pid: 42029;  load averages:  0.46,  0.38,  0.34   up 5+20:24:15
15:27:12
35 processes:  2 running, 33 sleeping
CPU states:  1.0% user,  0.0% nice, 11.7% system,  6.1% interrupt, 81.3%
idle
Mem: 51M Active, 332M Inact, 97M Wired, 19M Cache, 61M Buf, 992K Free
Swap: 1008M Total, 116K Used, 1008M Free

992K in Free but 332MB in Inact. So what is my conclusion here? That I have
332,992 KB free for use?

Looking at vmstat I have no swapping going on:

# vmstat 5
 procs      memory      page                    disks     faults      cpu
 r b w     avm    fre  flt  re  pi  po  fr  sr ad0 ad4   in   sy  cs us sy
id
 3 0 0  189844  29624   80   0   0   0 442 375   0   0 2863 4011 564  3  6
90 (ignore)
 2 0 0  188480  27132    2   0   0   0 829 714   0   0 5244 1041 667  1  9
90
 2 0 0  188900  16660    1   0   0   0 1231 710   0   3 7215 1425 809  1 10
89

If I see ANY swapping going on should I worry? I don't think so. Some
swapping is normal in UNIX in general.




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?00bc01c3f278$5f6dbb10$6401a8c0>