Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 30 Jul 2015 01:39:12 -0700
From:      Doug Hardie <bc979@lafn.org>
To:        Peter Jeremy <peter@rulingia.com>
Cc:        FreeBSD Stable ML <stable@freebsd.org>
Subject:   Re: Swap Usage
Message-ID:  <10F94D23-E58C-466E-ADCA-5E6670054BD7@lafn.org>
In-Reply-To: <20150730064444.GA88137@server.rulingia.com>
References:  <BCA67F7E-676A-4226-83A0-84229948895E@lafn.org> <20150730064444.GA88137@server.rulingia.com>

next in thread | previous in thread | raw e-mail | index | archive | help

> On 29 July 2015, at 23:44, Peter Jeremy <peter@rulingia.com> wrote:
>=20
> [reformatted]
>=20
> On 2015-Jul-29 17:41:33 -0700, Doug Hardie <bc979@lafn.org> wrote:
>> I have several FreeBSD 9.3 systems that are using swap and I can=E2=80=99=
t
>> figure out what is doing it.  The key system has 6GB swap and
>> currently it has over 2GB in use.
>=20
> 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.
>=20
>> ps shows only a kernel module
>> [intr] with a W status.
>=20
> '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.
>=20
>> How do I figure out what that swap space is being used for?
>=20
> 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.

Bingo.  procstat shows the problem.  The process that I suspected has a =
large number of entries like:

  650        0x834c00000        0x835800000 rw-    0    0   1   0 ---- =
sw=20
  650        0x835800000        0x835c00000 rw-    0    0   1   0 ---- =
sw=20
  650        0x835c00000        0x837c00000 rw-    1    0   1   0 ---- =
sw=20

I don=E2=80=99t know whats in those areas yet.  If I were to kill the =
process with SIGABRT would the core dump show those areas?  I might be =
able to figure out what they are from that.

Thanks for the pointer.





Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?10F94D23-E58C-466E-ADCA-5E6670054BD7>