Date: Wed, 12 Sep 2012 10:03:53 -0400 From: Lowell Gilbert <freebsd-questions-local@be-well.ilk.org> To: =?iso-8859-1?Q?Micka=EBl_Can=E9vet?= <canevet@embl.fr> Cc: freebsd-questions@freebsd.org Subject: Re: Swapped memory limited to about 500MB for a process ? Message-ID: <44y5kfgwxi.fsf@be-well.ilk.org> In-Reply-To: <1347432178.4141.82.camel@pc437.embl.fr> (=?iso-8859-1?Q?=22M?= =?iso-8859-1?Q?icka=EBl_Can=E9vet=22's?= message of "Wed, 12 Sep 2012 08:42:58 %2B0200") References: <1347268974.4141.65.camel@pc437.embl.fr> <44k3w0ij6n.fsf@be-well.ilk.org> <1347432178.4141.82.camel@pc437.embl.fr>
next in thread | previous in thread | raw e-mail | index | archive | help
Micka=EBl Can=E9vet <canevet@embl.fr> writes: > On Tue, 2012-09-11 at 13:05 -0400, Lowell Gilbert wrote: >> Micka=EBl Can=E9vet <canevet@embl.fr> writes: >>=20 >> > I was impacted by a memory leak that has been fixed by this patch: >> > http://people.freebsd.org/~rmacklem/namei-leak.patch >> > >> > What I noticed when the server was paging is that it seems that only >> > about 500MB of my 4GB swap partition was used before crashing. I was >> > wondering why it didn't take the whole 4GB up to the crash of the serv= er >> > because of lake of memory (that would let me more time to react). >> > >> > Is there such king of setting that prevent a process to put more then >> > 500MB of data in swap ? >>=20 >> limits(1)? >>=20 > Thank you for your answer. > > Here is the result of limits: > > limits > Resource limits (current): > cputime infinity secs > filesize infinity kB > datasize 33554432 kB > stacksize 524288 kB > coredumpsize infinity kB > memoryuse infinity kB > memorylocked infinity kB > maxprocesses 5547 > openfiles 11095 > sbsize infinity bytes > vmemoryuse infinity kB > pseudo-terminals infinity > swapuse infinity kB > > swapuse is set to unlimited, but stacksize is set to 512MB. > Is it the stacksize setting that prevent my kernel to swap more then > 512MB ? No, I don't think so. datasize was the parameter I was most suspecting; and it assumes that a particular process was causing the crash (which is unlikely; the OS is supposed to protect you against it).=20 Most likely, the crash was not directly caused by a shortage of virtual memory. You would have to diagnose through crash dumps, but it could be that some more specific resource was exhausted. Or perhaps the memory leak left dangling references in a vnode.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?44y5kfgwxi.fsf>