From owner-freebsd-stable@freebsd.org Fri Jan 31 07:29:13 2020 Return-Path: Delivered-To: freebsd-stable@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 710F6236095 for ; Fri, 31 Jan 2020 07:29:13 +0000 (UTC) (envelope-from danny@cs.huji.ac.il) Received: from kabab.cs.huji.ac.il (kabab.cs.huji.ac.il [132.65.116.210]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 48883r1P7Lz4D66 for ; Fri, 31 Jan 2020 07:29:11 +0000 (UTC) (envelope-from danny@cs.huji.ac.il) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=cs.huji.ac.il; s=57791128; h=To:References:Message-Id:Content-Transfer-Encoding:Cc:Date:In-Reply-To:From:Subject:Mime-Version:Content-Type; bh=JYh1kISgal+uTQAp1TzfkUiuRsJvv96qIY/tbHDsukM=; b=wpvsG52qppBlj6wSPx4hPwMFxAgVC+szdbMFT1F3r1ZtCoK9lSzY1Wq11pz8rQ492Ijj1r7opJKluahn7zzA94ZkUplkOqctHsKx9a1C9B9eLuKFcHTCQ9RFXxVSI/RazliF4I7mVwzwPVtH5RCsCIS9XZSQ5JINi76BZpfs7KS8XWVsVtlvtryM0lezzdYzfLhio1A4Ie2NYa8QZgVchwzqmnJTLCQpQUd6z0aJSsqxOSXPMjU0DKe1wgLwzlUYDP8ryxAYsWMmYiZg9xjV5dQLYFurmwFwLQkJ4vuj8FCrDLryZQdQ/OpKSx3XPaVd+W5sf6gLCYUtzZslGOdGrw==; Received: from bach.cs.huji.ac.il ([132.65.80.20]) by kabab.cs.huji.ac.il with esmtp id 1ixQji-000JSX-PM; Fri, 31 Jan 2020 09:29:06 +0200 Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 11.5 \(3445.9.1\)) Subject: Re: limit process memory usage From: Daniel Braniss In-Reply-To: <20200131071032.20a9a379@arc.aei.uni-hannover.de> Date: Fri, 31 Jan 2020 09:29:06 +0200 Cc: freebsd-stable@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: <343BE867-E4EA-4D22-B465-0D5C2586A4A0@cs.huji.ac.il> References: <20200131071032.20a9a379@arc.aei.uni-hannover.de> To: =?utf-8?Q?Gerrit_K=C3=BChn?= X-Mailer: Apple Mail (2.3445.9.1) X-Rspamd-Queue-Id: 48883r1P7Lz4D66 X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=cs.huji.ac.il header.s=57791128 header.b=wpvsG52q; dmarc=pass (policy=none) header.from=huji.ac.il; spf=none (mx1.freebsd.org: domain of danny@cs.huji.ac.il has no SPF policy when checking 132.65.116.210) smtp.mailfrom=danny@cs.huji.ac.il X-Spamd-Result: default: False [-4.62 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; R_DKIM_ALLOW(-0.20)[cs.huji.ac.il:s=57791128]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; MV_CASE(0.50)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.10)[text/plain]; IP_SCORE(-2.32)[ip: (-6.00), ipnet: 132.64.0.0/13(-3.14), asn: 378(-2.51), country: IL(0.05)]; TO_MATCH_ENVRCPT_SOME(0.00)[]; DKIM_TRACE(0.00)[cs.huji.ac.il:+]; RCPT_COUNT_TWO(0.00)[2]; RCVD_IN_DNSWL_NONE(0.00)[210.116.65.132.list.dnswl.org : 127.0.10.0]; DMARC_POLICY_ALLOW(-0.50)[huji.ac.il,none]; R_SPF_NA(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; RCVD_TLS_LAST(0.00)[]; ASN(0.00)[asn:378, ipnet:132.64.0.0/13, country:IL]; MID_RHS_MATCH_FROM(0.00)[]; RCVD_COUNT_TWO(0.00)[2] X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 31 Jan 2020 07:29:13 -0000 > On 31 Jan 2020, at 08:10, Gerrit K=C3=BChn = wrote: >=20 > Hello all, >=20 > I have an application that sometimes develops some kind of memory leak > or similar and eats up all RAM within a few minutes until the system = is > running out of memory and swap so the kernel starts randomly killing = other > processes and finally the crashes. > Is there a way to limit the memory available to an (or any) = application so > that something like this doesn't tear down the whole system every time = it > happens but just kills the culprit? I found the rctl tool, but I = couldn't > make out how to use it for this purpose so far. >=20 >=20 limit =E2=80=94 gives you the current settings and to change: limit memoryuse some-value > cu > Gerrit > _______________________________________________ > freebsd-stable@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-stable > To unsubscribe, send any mail to = "freebsd-stable-unsubscribe@freebsd.org"