From owner-freebsd-stable@freebsd.org Fri Jan 31 06:10:36 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 120A32343CD for ; Fri, 31 Jan 2020 06:10:36 +0000 (UTC) (envelope-from gerrit.kuehn@aei.mpg.de) Received: from mailgate2.uni-hannover.de (mailgate2.uni-hannover.de [130.75.2.114]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4886K720mkz4913 for ; Fri, 31 Jan 2020 06:10:34 +0000 (UTC) (envelope-from gerrit.kuehn@aei.mpg.de) Received: from intranet.aei.uni-hannover.de (ahin1.aei.uni-hannover.de [130.75.117.40]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mailgate2.uni-hannover.de (Postfix) with ESMTPS id C37C51D02 for ; Fri, 31 Jan 2020 07:10:32 +0100 (CET) Received: from arc.aei.uni-hannover.de ([130.75.117.1]) by intranet.aei.uni-hannover.de (IBM Domino Release 9.0.1FP8) with ESMTP id 2020013107103167-19959 ; Fri, 31 Jan 2020 07:10:31 +0100 Date: Fri, 31 Jan 2020 07:10:32 +0100 From: Gerrit =?UTF-8?B?S8O8aG4=?= To: freebsd-stable@freebsd.org Subject: limit process memory usage Message-ID: <20200131071032.20a9a379@arc.aei.uni-hannover.de> Organization: Albert-Einstein-Institut X-Mailer: Claws Mail 3.17.4 (GTK+ 2.24.32; amd64-portbld-freebsd11.3) MIME-Version: 1.0 X-MIMETrack: Itemize by SMTP Server on intranet/aei-hannover(Release 9.0.1FP8|February 23, 2017) at 31/01/2020 07:10:31, Serialize by Router on intranet/aei-hannover(Release 9.0.1FP8|February 23, 2017) at 31/01/2020 07:10:31, Serialize complete at 31/01/2020 07:10:31 X-TNEFEvaluated: 1 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-Rspamd-Queue-Id: 4886K720mkz4913 X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=none (mx1.freebsd.org: domain of gerrit.kuehn@aei.mpg.de has no SPF policy when checking 130.75.2.114) smtp.mailfrom=gerrit.kuehn@aei.mpg.de X-Spamd-Result: default: False [-0.90 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-0.83)[-0.833,0]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; NEURAL_HAM_LONG(-0.78)[-0.777,0]; MIME_GOOD(-0.10)[text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-stable@freebsd.org]; TO_DN_NONE(0.00)[]; AUTH_NA(1.00)[]; RCPT_COUNT_ONE(0.00)[1]; HAS_ORG_HEADER(0.00)[]; RCVD_COUNT_THREE(0.00)[3]; DMARC_NA(0.00)[mpg.de]; RCVD_IN_DNSWL_MED(-0.20)[114.2.75.130.list.dnswl.org : 127.0.11.2]; R_SPF_NA(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:680, ipnet:130.75.0.0/16, country:DE]; RCVD_TLS_LAST(0.00)[]; IP_SCORE(0.01)[asn: 680(0.09), country: DE(-0.02)] 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 06:10:36 -0000 Hello all, 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. cu Gerrit