Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 13 Feb 2017 13:25:05 -0800
From:      Cy Schubert <Cy.Schubert@komquats.com>
To:        Alan Somers <asomers@freebsd.org>
Cc:        Cy Schubert <Cy.Schubert@komquats.com>, scrappy@freebsd.org, Brian Somers <brian@freebsd.org>, freebsd-bugzilla@ayaken.net, Cy Schubert <cy@freebsd.org>, pkg@freebsd.org
Subject:   Re: Bug 217055 - Consolidate random sleeps in periodic scripts
Message-ID:  <201702132125.v1DLP5LD063026@slippy.cwsent.com>
In-Reply-To: Message from Alan Somers <asomers@freebsd.org> of "Mon, 13 Feb 2017 08:54:20 -0700." <CAOtMX2jj_GCKjWW8CpapHutwH7OY00WnSWQS5VOuruv6i9Avqw@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
In message <CAOtMX2jj_GCKjWW8CpapHutwH7OY00WnSWQS5VOuruv6i9Avqw@mail.gmail.c
om>
, Alan Somers writes:
> On Mon, Feb 13, 2017 at 12:01 AM, Cy Schubert <Cy.Schubert@komquats.com> wrot
> e:
> > In message <CAOtMX2gJRuKKwwcHW5ZxTTZAm5Tmb7cVQ1SZEjwnuingYnO-Zg@mail.gmail.
> 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 <Cy.Schubert@cschubert.com>
> > FreeBSD UNIX:  <cy@FreeBSD.org>   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 <Cy.Schubert@cschubert.com>
FreeBSD UNIX:  <cy@FreeBSD.org>   Web:  http://www.FreeBSD.org

	The need of the many outweighs the greed of the few.





Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201702132125.v1DLP5LD063026>