Swapped memory limited to about 500MB for a process ?

Mickaël Canévet canevet at embl.fr
Wed Sep 12 06:44:36 UTC 2012

On Tue, 2012-09-11 at 13:05 -0400, Lowell Gilbert wrote:
> Mickaël Canévet <canevet at embl.fr> writes:
> > 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 server
> > 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 ?
> limits(1)?
Thank you for your answer.

Here is the result of 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 ?
If so, are there any side effect of raising the stack (except exhaust
the swap space on the system) to give me more time to react by
restarting NFS or export/import Zpools for example in the case of NAMEI
memory leak before the kernel crashes ?

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part
Url : http://lists.freebsd.org/pipermail/freebsd-questions/attachments/20120912/26cc20b0/attachment.pgp

More information about the freebsd-questions mailing list