From owner-freebsd-stable@FreeBSD.ORG Wed Dec 15 13:52:31 2010 Return-Path: Delivered-To: stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B686A1065675 for ; Wed, 15 Dec 2010 13:52:31 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from mail.zoral.com.ua (mx0.zoral.com.ua [91.193.166.200]) by mx1.freebsd.org (Postfix) with ESMTP id 270E88FC1F for ; Wed, 15 Dec 2010 13:52:30 +0000 (UTC) Received: from deviant.kiev.zoral.com.ua (root@deviant.kiev.zoral.com.ua [10.1.1.148]) by mail.zoral.com.ua (8.14.2/8.14.2) with ESMTP id oBFDphnf012827 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 15 Dec 2010 15:51:43 +0200 (EET) (envelope-from kostikbel@gmail.com) Received: from deviant.kiev.zoral.com.ua (kostik@localhost [127.0.0.1]) by deviant.kiev.zoral.com.ua (8.14.4/8.14.4) with ESMTP id oBFDphhh058926; Wed, 15 Dec 2010 15:51:43 +0200 (EET) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.14.4/8.14.4/Submit) id oBFDphLd058925; Wed, 15 Dec 2010 15:51:43 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to kostikbel@gmail.com using -f Date: Wed, 15 Dec 2010 15:51:43 +0200 From: Kostik Belousov To: George Mamalakis Message-ID: <20101215135143.GY33073@deviant.kiev.zoral.com.ua> References: <4D08A0A1.40205@eng.auth.gr> <4D08C61C.4090006@eng.auth.gr> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="lXBubL3wS507qnlw" Content-Disposition: inline In-Reply-To: <4D08C61C.4090006@eng.auth.gr> User-Agent: Mutt/1.4.2.3i X-Virus-Scanned: clamav-milter 0.95.2 at skuns.kiev.zoral.com.ua X-Virus-Status: Clean X-Spam-Status: No, score=-3.4 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, DNS_FROM_OPENWHOIS autolearn=no version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on skuns.kiev.zoral.com.ua Cc: stable@freebsd.org Subject: Re: vm.swap_reserved toooooo large? X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Dec 2010 13:52:31 -0000 --lXBubL3wS507qnlw Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Dec 15, 2010 at 03:43:56PM +0200, George Mamalakis wrote: > On 15/12/2010 13:26, Trond Endrest??l wrote: > >On Wed, 15 Dec 2010 13:04+0200, George Mamalakis wrote: > > > >>I was testing a program that would exhaust all my memory (in C++), > >>and when this would happen, it would call set_new_handler() along > >>with one of my functions that would inform the user about the lack > >>of memory and then it would exit the program. Instead, the program > >>was force-killed by the kernel (signal 9) and I was informed that: > >If all your process' memory is exhausted, then there is no memory left > >for the runtime system for doing I/O and the other stuff you want. > >Next, unless I'm on drugs, maybe you should call set_new_handler() > >before you actually run out of memory. Just my $0.02. > > > > > >Trond. > > > > > > > >_______________________________________________ > >freebsd-stable@freebsd.org mailing list > >http://lists.freebsd.org/mailman/listinfo/freebsd-stable > >To unsubscribe, send any mail to "freebsd-stable-unsubscribe@freebsd.org" > Trond, >=20 > My problem was not that the program was force-killed, my problem was=20 > that the system reserved 500G+ of swap, even though the total size is 4G. Read tuning(7), in particular, the description of vm.overcommit sysctl. --lXBubL3wS507qnlw Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (FreeBSD) iEYEARECAAYFAk0Ix+8ACgkQC3+MBN1Mb4gPjQCeJ2dn1EvNvyyxvaUc6dn1acIo wUEAnjujMA2If/mtVwQIwqJ6npMFmUzK =lNou -----END PGP SIGNATURE----- --lXBubL3wS507qnlw--