From owner-freebsd-hackers@freebsd.org Wed Jan 27 12:16:10 2016 Return-Path: Delivered-To: freebsd-hackers@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E543DA6FB66 for ; Wed, 27 Jan 2016 12:16:10 +0000 (UTC) (envelope-from maxim.konovalov@gmail.com) Received: from mp2.macomnet.net (mp2.macomnet.net [195.128.64.6]) (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 6E91412F0; Wed, 27 Jan 2016 12:16:09 +0000 (UTC) (envelope-from maxim.konovalov@gmail.com) Received: from localhost (localhost [127.0.0.1]) by mp2.macomnet.net (8.15.2/8.15.2) with ESMTP id u0RCC0K4036432; Wed, 27 Jan 2016 15:12:00 +0300 (MSK) (envelope-from maxim.konovalov@gmail.com) Date: Wed, 27 Jan 2016 15:12:00 +0300 (MSK) From: Maxim Konovalov To: Pavel Timofeev cc: Baptiste Daroussin , freebsd-hackers@freebsd.org, Allan Jude Subject: Re: syslogd(8) with OOM Killer protection In-Reply-To: Message-ID: References: <56A86D91.3040709@freebsd.org> <20160127072850.GG35911@ivaldir.etoilebsd.net> User-Agent: Alpine 2.20 (BSF 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-Mailman-Approved-At: Wed, 27 Jan 2016 12:33:09 +0000 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Jan 2016 12:16:11 -0000 [...] > I'm one that people. I find this generilized way very usefull. > I have least a couple of daemons that it'd never wanted to be OOMed on > my machines. Besides syslogd, I'd protect sshd and even crond in some > cases. While I agree with the generalization idea via protect(1) or similar tool just a sidenote, sshd already has this feature: >From sshd.c: /* Avoid killing the process in high-pressure swapping environments. */ if (!inetd_flag && madvise(NULL, 0, MADV_PROTECT) != 0) debug("madvise(): %.200s", strerror(errno)); -- Maxim Konovalov