From owner-freebsd-hackers@freebsd.org Thu Jan 28 12:08:04 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 3AC30A70CFD for ; Thu, 28 Jan 2016 12:08:04 +0000 (UTC) (envelope-from wjw@digiware.nl) Received: from smtp.digiware.nl (unknown [IPv6:2001:4cb8:90:ffff::3]) (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 0586B1035; Thu, 28 Jan 2016 12:08:03 +0000 (UTC) (envelope-from wjw@digiware.nl) Received: from rack1.digiware.nl (unknown [127.0.0.1]) by smtp.digiware.nl (Postfix) with ESMTP id CB613153402; Thu, 28 Jan 2016 13:07:51 +0100 (CET) X-Virus-Scanned: amavisd-new at digiware.nl Received: from smtp.digiware.nl ([127.0.0.1]) by rack1.digiware.nl (rack1.digiware.nl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id cmsvUaB2Jnpr; Thu, 28 Jan 2016 13:07:32 +0100 (CET) Received: from [IPv6:2001:4cb8:3:1:399a:72bc:fe59:e022] (unknown [IPv6:2001:4cb8:3:1:399a:72bc:fe59:e022]) by smtp.digiware.nl (Postfix) with ESMTP id E119515340D; Thu, 28 Jan 2016 13:07:32 +0100 (CET) Subject: Re: syslogd(8) with OOM Killer protection To: araujo@FreeBSD.org, Warren Block References: <56A86D91.3040709@freebsd.org> Cc: freebsd-hackers@freebsd.org, Allan Jude From: Willem Jan Withagen Organization: Digiware Management b.v. Message-ID: <56AA047D.8070807@digiware.nl> Date: Thu, 28 Jan 2016 13:07:25 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.5.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit 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: Thu, 28 Jan 2016 12:08:04 -0000 On 27-1-2016 17:40, Marcelo Araujo wrote: > On Jan 28, 2016 12:37 AM, "Warren Block" wrote: >> >> On Wed, 27 Jan 2016, Allan Jude wrote: >> >>> On 2016-01-27 01:21, Marcelo Araujo wrote: >>>> >>>> Hi guys, >>>> >>>> I would like to know your opinion about this REVIEW[1]. >>>> The basic idea is protect by default the syslogd(8) against been killed > by >>>> OOM with an option to disable the protection. >>>> >>>> Some people like the idea, other people would prefer something more > global >>>> where we can protect any daemon by the discretion of our choice. >>>> >>>> Thoughts? >>>> >>>> >>>> [1] https://reviews.freebsd.org/D4973 >>>> >>>> >>>> Best, >>>> >>> >>> I do like the idea of generalizing it, say via rc.subr >>> >>> So you can just do: >>> >>> someapp_protect=YES (and maybe syslogd has this enabled by default in >>> /etc/defaults/rc.conf) and it prefixes the start command with protect -i. >> >> >> Possibly simpler to provide a list in one setting than an individual > setting for each daemon. With ideas from other posters: >> >> oomprotect_daemons="crond syslogd" I would really NOT like that. I'm trying to keep settings per deamon together in a file in /etc/rc.conf.d/, and load configs from there. This makes daemon managment from external tools (puppet etc) a LOT easier. It can just copy a default file into /etc/rc.conf.d if it wants a daemon available on a server. Requiring a collection of damons in one config-options wil make that totally impossible. just my 2 cts., --WjW