Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 02 Apr 2016 01:07:55 -0700
From:      Cy Schubert <Cy.Schubert@komquats.com>
To:        Michael Butler <imb@protected-networks.net>
Cc:        "O. Hartmann" <ohartman@zedat.fu-berlin.de>, "K. Macy" <kmacy@freebsd.org>, FreeBSD CURRENT <freebsd-current@freebsd.org>
Subject:   Re: CURRENT slow and shaky network stability
Message-ID:  <201604020807.u3287tgc034452@slippy.cwsent.com>
In-Reply-To: Message from Michael Butler <imb@protected-networks.net> of "Sat, 26 Mar 2016 13:28:16 -0400." <56F6C6B0.6010103@protected-networks.net>

next in thread | previous in thread | raw e-mail | index | archive | help
In message <56F6C6B0.6010103@protected-networks.net>, Michael Butler writes:
> -current is not great for interactive use at all. The strategy of
> pre-emptively dropping idle processes to swap is hurting .. big time.

FreeBSD doesn't "preemptively" or arbitrarily push pages out to disk. LRU 
doesn't do this.

> 
> Compare inactive memory to swap in this example ..
> 
> 110 processes: 1 running, 108 sleeping, 1 zombie
> CPU:  1.2% user,  0.0% nice,  4.3% system,  0.0% interrupt, 94.5% idle
> Mem: 474M Active, 1609M Inact, 764M Wired, 281M Buf, 119M Free
> Swap: 4096M Total, 917M Used, 3178M Free, 22% Inuse

To analyze this you need to capture vmstat output. You'll see the free pool 
dip below a threshold and pages go out to disk in response. If you have 
daemons with small working sets, pages that are not part of the working 
sets for daemons or applications will eventually be paged out. This is not 
a bad thing. In your example above, the 281 MB of UFS buffers are more 
active than the 917 MB paged out. If it's paged out and never used again, 
then it doesn't hurt. However the 281 MB of buffers saves you I/O. The 
inactive pages are part of your free pool that were active at one time but 
now are not. They may be reclaimed and if they are, you've just saved more 
I/O.

Top is a poor tool to analyze memory use. Vmstat is the better tool to help 
understand memory use. Inactive memory isn't a bad thing per se. Monitor 
page outs, scan rate and page reclaims.


-- 
Cheers,
Cy Schubert <Cy.Schubert@komquats.com> or <Cy.Schubert@cschubert.com>
FreeBSD UNIX:  <cy@FreeBSD.org>   Web:  http://www.FreeBSD.org

	The need of the many outweighs the greed of the few.








Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201604020807.u3287tgc034452>