From owner-freebsd-questions@FreeBSD.ORG Wed Sep 12 14:05:08 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 63D59106566B for ; Wed, 12 Sep 2012 14:05:08 +0000 (UTC) (envelope-from canevet@embl.fr) Received: from emblmta1.embl.fr (emblmta1.embl.fr [193.49.43.176]) by mx1.freebsd.org (Postfix) with ESMTP id E868E8FC18 for ; Wed, 12 Sep 2012 14:05:07 +0000 (UTC) X-IronPort-AV: E=Sophos;i="4.80,410,1344204000"; d="asc'?scan'208";a="4291077" Received: from unknown (HELO [172.26.15.24]) ([172.26.15.24]) by emblmta1.embl.fr with ESMTP/TLS/DHE-RSA-CAMELLIA256-SHA; 12 Sep 2012 16:04:56 +0200 Message-ID: <1347458607.4141.88.camel@pc437.embl.fr> From: =?ISO-8859-1?Q?Micka=EBl_Can=E9vet?= To: freebsd-questions@freebsd.org Date: Wed, 12 Sep 2012 16:03:27 +0200 In-Reply-To: <44y5kfgwxi.fsf@be-well.ilk.org> References: <1347268974.4141.65.camel@pc437.embl.fr> <44k3w0ij6n.fsf@be-well.ilk.org> <1347432178.4141.82.camel@pc437.embl.fr> <44y5kfgwxi.fsf@be-well.ilk.org> Content-Type: multipart/signed; micalg="pgp-sha1"; protocol="application/pgp-signature"; boundary="=-yS8310VM1ggOs3AycHSz" X-Mailer: Evolution 3.4.3-1 Mime-Version: 1.0 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 List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Sep 2012 14:05:08 -0000 --=-yS8310VM1ggOs3AycHSz Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Wed, 2012-09-12 at 10:03 -0400, Lowell Gilbert wrote: > Micka=C3=ABl Can=C3=A9vet writes: >=20 > > On Tue, 2012-09-11 at 13:05 -0400, Lowell Gilbert wrote: > >> Micka=C3=ABl Can=C3=A9vet 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 se= rver > >> > 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 the= n > >> > 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 ? >=20 > 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 >=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. >=20 OK, Thanks a lot for your explanations. Cheers, Micka=C3=ABl --=-yS8310VM1ggOs3AycHSz Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (GNU/Linux) iEYEABECAAYFAlBQli8ACgkQZjBmN5Hi/YYZxwCcC1H2xwJ8xyuKR1yQXYTw4j9Z hHUAn1A45LJ5zhHFwFusfoimrbchpWK1 =maKz -----END PGP SIGNATURE----- --=-yS8310VM1ggOs3AycHSz--