From owner-freebsd-pkg@freebsd.org Wed Feb 15 13:17:51 2017 Return-Path: Delivered-To: freebsd-pkg@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 54350CDFC63 for ; Wed, 15 Feb 2017 13:17:51 +0000 (UTC) (envelope-from Ephaeton@gmx.net) Received: from mailman.ysv.freebsd.org (mailman.ysv.freebsd.org [IPv6:2001:1900:2254:206a::50:5]) by mx1.freebsd.org (Postfix) with ESMTP id 35137B5B for ; Wed, 15 Feb 2017 13:17:51 +0000 (UTC) (envelope-from Ephaeton@gmx.net) Received: by mailman.ysv.freebsd.org (Postfix) id 3167DCDFC62; Wed, 15 Feb 2017 13:17:51 +0000 (UTC) Delivered-To: pkg@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 310C6CDFC61 for ; Wed, 15 Feb 2017 13:17:51 +0000 (UTC) (envelope-from Ephaeton@gmx.net) Received: from mout.gmx.net (mout.gmx.net [212.227.17.22]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "mout.gmx.net", Issuer "TeleSec ServerPass DE-2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 86CDAB5A; Wed, 15 Feb 2017 13:17:49 +0000 (UTC) (envelope-from Ephaeton@gmx.net) Received: from hephaistos.local ([79.208.142.144]) by mail.gmx.com (mrgmx101 [212.227.17.168]) with ESMTPSA (Nemesis) id 0LkCU2-1c7gqo27IY-00c5dM; Wed, 15 Feb 2017 14:17:36 +0100 Received: by hephaistos.local (Postfix, from userid 1000) id 55731297CDF6; Wed, 15 Feb 2017 14:17:34 +0100 (CET) Date: Wed, 15 Feb 2017 14:17:34 +0100 From: "Martin S. Weber" To: Alan Somers Cc: Cy Schubert , scrappy@freebsd.org, Brian Somers , Cy Schubert , pkg@freebsd.org, Dag-Erling =?iso-8859-1?Q?Sm=F8rgrav?= Subject: Re: Bug 217055 - Consolidate random sleeps in periodic scripts Message-ID: <20170215131734.GA2129@hephaistos.local> References: <201702140647.v1E6lVd8078946@slippy.cwsent.com> <20170214113643.GA3593@hephaistos.local> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.7.2 (2016-11-26) X-Provags-ID: V03:K0:iqzRoDvmDJvLwqhGWOrk8p1PNuOea6PhBlHcnC1bJorPxXdn24t qZ4XyHFplVoOp7Sl+jnpqdPoNLAX7iFgvPIBQqJ/okOC4wLC+5gspc7P77EOzScHRyshTWl WS6oBTqrLotoNO5jrY6khwU507IE64OGGBIRnPxhW4ULW1UPkpGSlV3+9Y42PqeDmyntQ0S 5gveZFr6w4gs1q/EGAmgw== X-UI-Out-Filterresults: notjunk:1;V01:K0:0XpLXPUWTlU=:Huw22EJWWJRQIMP9tSWqyv JZzko0yOhuokeiseqrcY4+by18MjFUw7URyaqaVA6fBPZcaZKw4hl4spb5AZr/kxogwms4f0Z /Zi3nSkXJzBAEvBDkIkJOKkjPn7OTaXhGwMAJlHis0mmnEtNHnXaLm4S+JkCq2mRx8L3SRyc3 MDVyyq64z4bol9+Xrv9Sl/yU955QfUIn8N9Kz/nGwmABbY64di/rJwNjP7iPGV3M5qVFyd5UT rZ0dgZlanuImc2e9GOrKiYlSRDQVwPaHgJWNQvSU2NHSBQ4OfLi2UA04Mn6rGBAI6kvCdN4uu JefDIjbRMbMbAijABQ4ad/gYf5ERTUvGyuxKZX9Al642PHpTB2hMtoMXuKzG+VhNtpKWVi7x+ ZDCGFcWV9K5sHisjRWQ06zzAUaOUakiWyARzHx/Y73uOV6fsHC5Y1uF9gLDSuQaXIxXsIClFR WyV6pxghOUaDdegEKGGmYQVggbgd3GbWbUuA343/OHvWUkUvtTQwUqz02lj+MZ1fqE2XCouht LU+pQDpnd5c/zMLPMNPaqXFxMSZHEdhAGtn/OhM9Bra18/PDwqI42ogwu+rwGP8209E6AJcp4 aGZv1dl8ZlNcbI4gtmD+9Ht/DJJPZYlDqd1SYAkOevdrtvbNlEVR/6a++c8UxIVZDSa79XW6k /LkgtbI0fan9t51+AXBYf9Wf10CPrkZhImmVr41JD8Q8Ebn6Qkiqd4PC6a1pGE70PXSlZ87ti IycblS83bNIh8sIMSnEpyXXuuvakXHQAO1VBadFi2ikj3NOAobhS5DJgnpdPnddJC0yjyVOO7 z8PrpLE X-BeenThere: freebsd-pkg@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Binary package management and package tools discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Feb 2017 13:17:51 -0000 On 2017-02-14 09:29:47, Alan Somers wrote: > Ok, the consensus opinion seems to be that: > 1) A single sleep would be better than 3 sleeps > 2) Periodic shouldn't sleep if no script requires it > 3) Nothing should be backgrounded > 4) Periodic shouldn't sleep when run interactively. > > I can achieve all of this by putting a common sleep function in > /etc/defaults/periodic.conf. Some passing of environment variables > will be required. I'll put everyone on the code review when it's > ready. You can achieve all of this by teaching crond to introduce the random jitter itself as well and keep the whole rc.d scripts sleep-less. This would automatically fix periodic incantations from the command lines. Then in the system crontab (no, not root's crontab as is wrongly documented), just add the JITTER=3600 or equivalent to vary calls by up to an hour (or whatever mileage you prefer) and we're all happy ;) Regards, -Martin