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?
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. --Chris> > > _______________________________________________ > freebsd-stable at freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-stable > To unsubscribe, send any mail to "freebsd-stable-unsubscribe at freebsd.org"
> On 29 July 2015, at 17:41, 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?UFS although that shouldn?t matter. Swap does not use a file system. If it did, it would be easy to figure out. Top doesn?t show much.
[reformatted] On 2015-Jul-29 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.Is the system currently paging (top(1) and "systat -v" will show this)? If not, this just means that at some time in the past, the system was under memory pressure and paged some process memory out. Since then, that memory hasn't been touched so the system hasn't paged it in.>ps shows only a kernel module >[intr] with a W status.'W' means the whole process is 'swapped' out - this will only occur under severe RAM pressure. Normally, the system will just page out inactive parts of a processes address space - and none of the ps flags will show this.> How do I figure out what that swap space is being used for?I don't think this can be trivially done. "procstat -v" will show the number of resident pages within each swap-backed region, any pages in that region that have been touched but are not resident are on the swap device but any pages that have never been touched aren't counted at all. -- Peter Jeremy -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 949 bytes Desc: not available URL: <http://lists.freebsd.org/pipermail/freebsd-stable/attachments/20150730/fd6a553d/attachment.bin>