From owner-freebsd-questions@FreeBSD.ORG Wed Sep 12 14:03:55 2012 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9C624106568A for ; Wed, 12 Sep 2012 14:03:55 +0000 (UTC) (envelope-from freebsd-questions-local@be-well.ilk.org) Received: from asbnvacz-mailrelay01.megapath.net (asbnvacz-mailrelay01.megapath.net [207.145.128.243]) by mx1.freebsd.org (Postfix) with ESMTP id 6A2D98FC19 for ; Wed, 12 Sep 2012 14:03:55 +0000 (UTC) Received: from mail6.sea5.speakeasy.net (mail6.sea5.speakeasy.net [69.17.117.50]) by asbnvacz-mailrelay01.megapath.net (Postfix) with ESMTP id E1CA9A713B0 for ; Wed, 12 Sep 2012 10:03:54 -0400 (EDT) Received: (qmail 27723 invoked from network); 12 Sep 2012 14:03:54 -0000 Received: by simscan 1.4.0 ppid: 23283, pid: 19868, t: 0.1856s scanners: clamav: 0.88.2/m:52/d:10739 Received: from unknown (HELO be-well.ilk.org) ([66.92.78.145]) (envelope-sender ) by mail6.sea5.speakeasy.net (qmail-ldap-1.03) with SMTP for ; 12 Sep 2012 14:03:54 -0000 Received: by be-well.ilk.org (Postfix, from userid 1147) id CC9FA33C27; Wed, 12 Sep 2012 10:03:53 -0400 (EDT) From: Lowell Gilbert To: =?iso-8859-1?Q?Micka=EBl_Can=E9vet?= 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 +0200") References: <1347268974.4141.65.camel@pc437.embl.fr> <44k3w0ij6n.fsf@be-well.ilk.org> <1347432178.4141.82.camel@pc437.embl.fr> Date: Wed, 12 Sep 2012 10:03:53 -0400 Message-ID: <44y5kfgwxi.fsf@be-well.ilk.org> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Cc: freebsd-questions@freebsd.org Subject: Re: Swapped memory limited to about 500MB for a process ? X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: freebsd-questions@freebsd.org List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Sep 2012 14:03:55 -0000 Micka=EBl Can=E9vet writes: > On Tue, 2012-09-11 at 13:05 -0400, Lowell Gilbert wrote: >> Micka=EBl Can=E9vet 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.