From a4c31683d0550ba3aef4c22e6179952f3251101d Mon Sep 17 00:00:00 2001 From: Matthew Dillon Date: Tue, 29 Aug 2017 23:56:42 -0700 Subject: [PATCH] systat - clarify 'Free' in systat -vm 1 * Clarify Free by indicating i+c+f (inactive + cache + free). That is, the Free memory reported in the upper left counts the Inactive page queue as part of its total, even though it isn't quite free. * The main reason for this is that when the memory pressure de-stresses, the VM system doesn't bother wasting time moving pages out of the inactive queue, even though they are effectively freeable. On the otherhand, if the system is under significant memory pressure, the inactive queue will itself become stressed and minimize. This makes it a fairly accurate representation of what is potentially freeable (albeit with some effort by the paging system). --- usr.bin/systat/vmstat.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/usr.bin/systat/vmstat.c b/usr.bin/systat/vmstat.c index 6e22f94c97..b7769d6697 100644 --- a/usr.bin/systat/vmstat.c +++ b/usr.bin/systat/vmstat.c @@ -318,6 +318,8 @@ labelkre(void) mvprintw(MEMROW + 2, MEMCOLA, "Free "); mvprintw(MEMROW + 3, MEMCOLA, "Total "); + mvprintw(MEMROW + 2, MEMCOLA + 14, "i+c+f"); + mvprintw(MEMROW + 0, MEMCOLB, "VM-rss"); mvprintw(MEMROW + 1, MEMCOLB, "VM-swp"); mvprintw(MEMROW + 1, MEMCOLB + 15, "/"); -- 2.41.0