Swap Usage

Doug Hardie bc979 at lafn.org
Thu Jul 30 05:00:24 UTC 2015

> On 29 July 2015, at 18:57, Chris H <bsd-lists at bsdforge.com> wrote:
> On Wed, 29 Jul 2015 17:41:33 -0700 Doug Hardie <bc979 at lafn.org> wrote
>> I have several FreeBSD 9.3 systems that are using swap and I can’t figure
>> out what is doing it.  The key system has 6GB swap and currently it has over
>> 2GB in use.  ps shows only a kernel module [intr] with a W status.  Obviously
>> that isn’t using the space.  No other process shows a W in its status.  I
>> suspect this is somewhat related to the use of mmap in one application. 
>> However, all of the mmaps in that application are file backed and thus
>> shouldn’t use swap.  How do I figure out what that swap space is being used
>> for? 
> Maybe top(1)?
> top -P
> for example. At least you could see who's chewing all your memory. Which
> should be a good clue as to who's responsible for swap usage.

UFS although I don’t see how that could make a difference.  Swap doesn’t use a regular file system.  However, the kernel must track the actual usage using something like a simple file system.  There must be a way to investigate it.

Top doesn’t show anything unusual.  The most VM used is by the process that uses a lot of mmap space that is all file backed.  If it was another process that was partially swapped then the ps status should show a W.  Only the one does.

More information about the freebsd-stable mailing list