Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 24 Oct 2017 08:41:35 -0600
From:      Alan Somers <asomers@freebsd.org>
To:        Borja Marcos <borjam@sarenet.es>
Cc:        "freebsd-hackers@freebsd.org" <freebsd-hackers@freebsd.org>, freebsd-security@freebsd.org
Subject:   Re: Periodic jobs lockf timeout
Message-ID:  <CAOtMX2hb_Ur8XtTdoPju3ZQGMfJ_pApUKsZiaocxaG9n%2BDVycA@mail.gmail.com>
In-Reply-To: <AEF2CF7D-BFAC-4ACE-95F2-EF5026E89959@sarenet.es>
References:  <AEF2CF7D-BFAC-4ACE-95F2-EF5026E89959@sarenet.es>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, Oct 24, 2017 at 3:07 AM, Borja Marcos <borjam@sarenet.es> wrote:
>
> Hi,
>
> I=E2=80=99ve come across a problem with the =E2=80=9Cdaily=E2=80=9D secur=
ity job. On an overloaded system with lots of ZFS datasets,
> lots of files, heavy system load and, to add insult to injury, a ZFS crub=
 going on the find=E2=80=99s issued by the
> periodic checks can take forever. They can take so long, I have found sev=
eral lockf=E2=80=99s waiting.
>
> Is it sane to have an unlimited timeout for lockf? Probably it would be b=
etter to have at least a configurable
> timeout for each cathegory. It=E2=80=99s really unlikely to see an overla=
p for a weekly or monthly job, but for daily
> jobs it would be good to have a sane default, say, an hour or two.
>
> There=E2=80=99s even a parameter on /etc/defaults/periodic.conf but it se=
ems it=E2=80=99s not used right now.
>
> # Max time to sleep to avoid causing congestion on download servers
> anticongestion_sleeptime=3D3600
>
>
> The alternative would be to have defaults for a sane timeout for each cat=
hegory, like
>
> daily_lockf_timeout
> weekly_lockf_timeout
> monthly_lockf_timeout
>
> Thoughts? It=E2=80=99s pretty simple to do and overlapping periodic jobs =
are really useless.

Are you talking about the lockf in /usr/sbin/periodic?  It already has
a timeout of 0, which should prevent overlapping periodic jobs.  Or is
there some other lockf involved?  Without knowing which lockf you're
talking about, I can't understand your problem.

The anticongestion_sleeptime variable is unrelated to lockf.

-Alan



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAOtMX2hb_Ur8XtTdoPju3ZQGMfJ_pApUKsZiaocxaG9n%2BDVycA>