Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 08 Jun 2015 21:08:55 +0100
From:      Frank Leonhardt <frank2@fjl.co.uk>
To:        freebsd-questions@freebsd.org
Subject:   Re: Swap exhaustion
Message-ID:  <5575F657.1040301@fjl.co.uk>
In-Reply-To: <1CD13C1C-5344-4909-A061-F25FBB86AFF9@lafn.org>
References:  <1CD13C1C-5344-4909-A061-F25FBB86AFF9@lafn.org>

Next in thread | Previous in thread | Raw E-Mail | Index | Archive | Help
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.




Want to link to this message? Use this URL: <http://docs.FreeBSD.org/cgi/mid.cgi?5575F657.1040301>