Swap exhaustion

Frank Leonhardt frank2 at fjl.co.uk
Mon Jun 8 20:09:09 UTC 2015


On 28/05/2015 00:49, Doug Hardie wrote:
> I have a process that is eating up 6 GB of swap space.  At that point, FreeBSD 9.3 terminates a process.  However, occasionally its not the one eating up the space.  When I manually quit the process then the swap space returns to a few KB used.  The system runs fine after that.
>
> I have very little knowledge of what this process is doing internally but would like to know what might be causing this issue.  There are 5 of these processes running (parent plus 4 children).  Normally each uses about 90 MB RES/SIZE.  However when the problem occurs they are about 2GB RES/SIZE each.  The system has 4 GB memory.  I thought that a malloc would not be able to grab that much memory, even with swapping as it has to be in memory.  Could a malloc cause this growth in process size or need I look elsewhere?
>
>
>

Been there and done that :-) While this doesn't directly answer you're 
question, I wrote some stuff up about it here:

http://blog.frankleonhardt.com/2011/large-swap-files-on-freebsd-die-with-mystery-killed-howto-add-lots-of-swap-space/

It was a while ago,and I'm a bit hazy, but I remember debugged the issue 
by modifying the kernel files I mention in order to tell me what was 
going on. It's actually very easy to do.

Regards, Frank.



More information about the freebsd-questions mailing list