From owner-freebsd-pkg@freebsd.org Mon Feb 13 21:27:49 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 0B61BCDD861 for ; Mon, 13 Feb 2017 21:27:49 +0000 (UTC) (envelope-from cy.schubert@komquats.com) Received: from mailman.ysv.freebsd.org (unknown [127.0.1.3]) by mx1.freebsd.org (Postfix) with ESMTP id E1A3C93C for ; Mon, 13 Feb 2017 21:27:48 +0000 (UTC) (envelope-from cy.schubert@komquats.com) Received: by mailman.ysv.freebsd.org (Postfix) id DE01BCDD860; Mon, 13 Feb 2017 21:27:48 +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 DDAC3CDD85E for ; Mon, 13 Feb 2017 21:27:48 +0000 (UTC) (envelope-from cy.schubert@komquats.com) Received: from smtp-out-so.shaw.ca (smtp-out-so.shaw.ca [64.59.136.139]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "Client", Issuer "CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 8857E93B; Mon, 13 Feb 2017 21:27:48 +0000 (UTC) (envelope-from cy.schubert@komquats.com) Received: from spqr.komquats.com ([96.50.22.10]) by shaw.ca with SMTP id dO7OcRAUsC3JIdO7PczOVR; Mon, 13 Feb 2017 14:25:09 -0700 X-Authority-Analysis: v=2.2 cv=XbT59Mx5 c=1 sm=1 tr=0 a=jvE2nwUzI0ECrNeyr98KWA==:117 a=jvE2nwUzI0ECrNeyr98KWA==:17 a=kj9zAlcOel0A:10 a=n2v9WMKugxEA:10 a=BWvPGDcYAAAA:8 a=6I5d2MoRAAAA:8 a=YxBL1-UpAAAA:8 a=fxzhD6Ib2CnelIb-tmQA:9 a=3ebCIXgWIYJXdpcr:21 a=xJiquAOHPBaEKifk:21 a=CjuIK1q_8ugA:10 a=pxhY87DP9d2VeQe4joPk:22 a=IjZwj45LgO3ly-622nXo:22 a=Ia-lj3WSrqcvXOmTRaiG:22 Received: from slippy.cwsent.com (slippy [10.1.1.91]) by spqr.komquats.com (Postfix) with ESMTPS id 56865B3C; Mon, 13 Feb 2017 13:25:06 -0800 (PST) Received: from slippy (localhost [127.0.0.1]) by slippy.cwsent.com (8.15.2/8.15.2) with ESMTP id v1DLP5LD063026; Mon, 13 Feb 2017 13:25:05 -0800 (PST) (envelope-from Cy.Schubert@cschubert.com) Message-Id: <201702132125.v1DLP5LD063026@slippy.cwsent.com> X-Mailer: exmh version 2.8.0 04/21/2012 with nmh-1.6 Reply-to: Cy Schubert From: Cy Schubert X-os: FreeBSD X-Sender: cy@cwsent.com X-URL: http://www.cschubert.com/ To: Alan Somers cc: Cy Schubert , scrappy@freebsd.org, Brian Somers , freebsd-bugzilla@ayaken.net, Cy Schubert , pkg@freebsd.org Subject: Re: Bug 217055 - Consolidate random sleeps in periodic scripts In-Reply-To: Message from Alan Somers of "Mon, 13 Feb 2017 08:54:20 -0700." Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Mon, 13 Feb 2017 13:25:05 -0800 X-CMAE-Envelope: MS4wfOxzLXpNaljJoHk1wbsjIrGHeM37CQT/BWqzNoPTbBKcIexTWpyNLh7C9OqQOEONOdiJ3+tl96iy/ZnZUvMzUCkNT0S7Nvp02AdDmQSczBQNV/SHtxPF kGNOQ5SS2J9giip0ZtUMQZsVt6RcuAKUqdKho8TbnmGhVpSnp5Q7/SX8wsykl/Qfeg23s+MtTxNqC9bmOBQWZtBSn+bz1bjWZpQXWKE/lyOUU8+SVBZbO4x9 pU4GAim50u6+Tw/U7LF8Nxgd6sD5+iLUz3+hLHol/K22wH/xW1cy9Fg9bl0w6f6GNd4xte1KoCCSG5Ub8P8IAQeb9e6pI7l2Ezk4eIJLsI0= 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: Mon, 13 Feb 2017 21:27:49 -0000 In message , Alan Somers writes: > On Mon, Feb 13, 2017 at 12:01 AM, Cy Schubert wrot > e: > > In message c > > om> > > , Alan Somers writes: > >> I propose that we remove the various anti-congestion sleeps from > >> different periodic scripts, and add a single anti-congestion sleep to > >> the very beginning. Does this sound like a good idea to all of you? > >> > >> https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=217055 > > > > I think the problem with the sleeps is simply the sleeps. My original plan > > to put my sleep/fetch in the background was shot down by some who thought > > it wasn't simple enough. > > > > Secondly, we don't need sleeps every boot. Ntpd for example only needs a > > sleep twice a year max to fetch a new leapfile so, to have a sleep every > > boot would be annoying. > > > > The best solution to replace sleeps would be to put a list of files:URLs > > into a queue to be fetched by fetcher script which would fetch only needed > > files that boot (or in the case of ntp via periodic.conf twice a year). > > > > A single script with a queue of files to fetch with one anti-congestion > > sleep, preferably in the background. > > > > NTP, btw can (will) use the leapfile in /etc/ntp until a fresher copy is > > fetched. > > > > Let's remove all fetching functions from the various rc scripts and queue > > them up early in a fetcher rc script, preferably in the background if at > > all possible. > > > > > > -- > > Cheers, > > Cy Schubert > > FreeBSD UNIX: Web: http://www.FreeBSD.org > > > > The need of the many outweighs the greed of the few. > > Unfortunately that won't work, Cy. Some scripts may need to > dynamically determine what files to fetch, in a way that we can't do > in a single separate fetcher script. Worse, some scripts, like > 300.statistics from sysutils/bsdstats, need to _post_ a URL, not get > one. Diverse requirements cannot be addressed by one knob. To assume that various applications all have the same sleep requirement won't work. I suppose we could have an optional single sleep script but we can't summarily remove all sleeps and assume all rc and periodic scripts sleep for some, one or possibly no applications requiring a sleep at any given time. We can have a general sleep but removing the option of others would be counter productive. It doesn't make sense to have an arbitrary sleep just in case a subsequent script might need it. If we have to, let's either reduce the length of the sleeps or put better yet background them. What's motivating this? Server? Laptop? -- Cheers, Cy Schubert FreeBSD UNIX: Web: http://www.FreeBSD.org The need of the many outweighs the greed of the few.