[Bug 2137] [vm] systat(1) total vm statistics are b

Bruce Evans brde at optusnet.com.au
Tue Nov 10 19:33:00 UTC 2015


On Tue, 10 Nov 2015 a bug that doesn't want a reply wrote:

> --- Comment #4 from NGie Cooper <ngie at FreeBSD.org> ---
> This is still sadly valid on 11-CURRENT -- please note that the amount of
> memory shown is negative ~2GB :(...
>
> This affects many people because... having this much memory is commonplace now.

Er, this was fixed in 2005 (except for the count line which overflows at
1G pages = 4 TB on x86).

> % sysctl hw.physmem
> hw.physmem: 3188523008

That is a small memory.  freefall has about 8 times as much.  But only 24GB.
Its real memory can grow 682 times larger before the display overflows, or
2730 times large before the kernel overflows.

> % systat -vmstat
>
>    6 users    Load  0.38  0.28  0.82                  Nov 10 00:59
>
> Mem:KB    REAL            VIRTUAL                       VN PAGER   SWAP PAGER
>        Tot   Share      Tot    Share    Free           in   out     in   out
> Act   24340    7768   577584    11968  114780  count
> All   27000    7816   -2146M    24652          pages

freefall:

         Tot   Share      Tot    Share    Free           in   out     in   out
Act  985808   25312  7531484    49332 5109528  count    74
All 1108128  123268  8216028   612212          pages    74

The virtual memory sizes will overflow sooner, but this one is only 8 times
larger for 'Tot'.  It is only about 8M, and can expand by almost a factor
of 512 before overflowing.

These sizes show very little of the 24GB is "Allocated" -- only about 1GB
real and 8GB virtual.  The other large counts (in K) on freefall now are
about 5M for "wire", 13M for "inact" (vmio) and 5M for "free".  That is
almost all of the other 24GB of real memory.

Bruce


More information about the freebsd-bugs mailing list