intr using Swap

Lowell Gilbert freebsd-stable-local at
Thu Feb 18 01:45:42 UTC 2016

Doug Hardie <bc979 at> writes:

>> On 17 February 2016, at 16:50, Lowell Gilbert <freebsd-stable-local at> wrote:
>> Have you measured that paging (not swapping; that's a more extreme
>> measure where the whole process gets removed from memory) is a
>> significant load on your system in a specific case? If not, I doubt that
>> it's actually the case, and you're mitigating a non-existent problem
> I believe the question here is what is using up the swap space.  From
> what I have been able to find with a similar situation is that malloc
> will allocate swap space to backup memory and mmap will also allocate
> swap if there is no backing file.  procstat -v can be helpful in
> chasing down some of those issues.  However, I ended up guessing which
> process it was by sequentially restarting processes and watching
> swapinfo.  I still have not been able to chase down what in that
> process is using the space.  There are no mmaps that are not file
> backed so it must be a malloc.  Finding the right one has been
> elusive.

Sure, but I'm pretty sure that the other worriers in this thread don't
actually have any problem at all. I tried to poke a (Socratically
limited) number of questions as a start of figuring out whether that's
really the case, but thus far, I'd bet that it is. If that turns out to
be a losing bet, I *will* spend time on fixing the code.

Your observations are more useful, but I'm still not sure they indicate
a problem that needs to be solved. There are clearly cases where
significant quantities of swap can get used up storing copies of clean
pages backing files on disk. Unless that slows down bringing in new
pages that need to be read or written, I don't think that's a problem.

More information about the freebsd-stable mailing list