Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 26 Mar 2015 22:58:54 -0400
From:      J David <j.david.lists@gmail.com>
To:        Steven Hartland <killing@multiplay.co.uk>,  "freebsd-questions@freebsd.org" <freebsd-questions@freebsd.org>
Cc:        freebsd-stable <freebsd-stable@freebsd.org>
Subject:   Re: Significant memory leak in 9.3p10?
Message-ID:  <CABXB=RR0sd1-HUq7%2BfMde38dzPTMLZwWWgV1orG6ousu4=sz6w@mail.gmail.com>
In-Reply-To: <5514B220.6080308@multiplay.co.uk>
References:  <CABXB=RRhynY5FWvw3tHrLFRyitTemavXYLBpev5Mjs_kPqimXA@mail.gmail.com> <20150316232404.GM2379@kib.kiev.ua> <CABXB=RSt0MgEyoJs4o5utTg7oSu0RZ%2B-czeY0k-Ro%2BfRubK3kQ@mail.gmail.com> <CABXB=RTe9d0DD68RCi6JWKH%2BcK%2Ba8McmKmeejTypLhVZRc0t7w@mail.gmail.com> <CAN6yY1si_6KRXrTdXABGdtAfqRcCyqqe48acbVUmRT1eZ7tuXw@mail.gmail.com> <CABXB=RRsF4RoMiVA88WeAgXoYQihU8s2g3T=ToO3HW9DceroKw@mail.gmail.com> <5514B220.6080308@multiplay.co.uk>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, Mar 26, 2015 at 9:28 PM, Steven Hartland
<killing@multiplay.co.uk> wrote:
> Does vmstat -m or vmstat -z shed any light?

None, as those show kernel memory usage, not user space.  Looking at
them anyway shows nothing unusual, consuming large amounts of memory,
or disproportionate to the kernel memory shown as in-use.

The list of suspects that can consume user memory without being
associated with any user process is very short: some sort of
anonymous, persistent shared memory object.  Konstantin offered a
partial list of some likely candidates in response to the initial
message, including:

- NO: tmpfs mounts (not used)
- NO: swap-backed md disks (not used)
- PROBABLY NO: sysv shared memory (believed not to be used)
- MAYBE: possibly posix shared memory (unknown whether used)
- MAYBE: anonymous mmap segments that have somehow got lost (i.e. file
descriptor is hanging around in the kernel somewhere) -- proposed by
someone off-list
- MAYBE: others?

Of the two remaining known possibilities, posix shared memory seems
more likely than an unknown mmap bug.  Unfortunately, I have not found
any way to gather statistics and/or get/set limits on posix shared
memory usage.  Does such a method exist?

Really, it would be great if there were a tool that could walk the
entire list of VM blocks and generate some kind of report or
statistics (like vmstat -z or vmstat -m, but for VM rather than kernel
memory).  As it is, we are reduced to guessing what might be going on,
which is decidedly suboptimal.  However, I have no idea if such a tool
exists, if it is even possible to write, or (if it is) how to go about
writing it.

Thanks!



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CABXB=RR0sd1-HUq7%2BfMde38dzPTMLZwWWgV1orG6ousu4=sz6w>