git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Derrick Stolee <stolee@gmail.com>
To: Shubham Kanodia <shubham.kanodia10@gmail.com>, git@vger.kernel.org
Cc: Patrick Steinhardt <ps@pks.im>
Subject: Re: Prefetch maintenance might lead to thundering herd issues
Date: Fri, 20 Sep 2024 15:20:47 -0400	[thread overview]
Message-ID: <b67c7b6b-f11b-4306-b3ba-c440e8cf7cab@gmail.com> (raw)
In-Reply-To: <CAG=Um+3C1JMKoW+j03nF6uS2DjcJnKD7+0PSaiXGB-td9qyc8Q@mail.gmail.com>

On 9/20/24 11:15 AM, Shubham Kanodia wrote:
> The current git-maintenance prefetch command allows daily, weekly, and
> hourly schedules.
> However, in repositories with many active developers, timing `fetch`
> to happen at the same wall clock time can lead to a thundering herd
> problem for the backend server.
> 
> Ideally, these fetch requests would be spaced out by a small amount,
> so as not to lead to a co-ordinated load on the server.
> 
> I don't see a way to configure this at the moment in a cross-platform
> way at the moment. Perhaps it might be sensible to offset the cron
> schedules slightly for users so as to not cause such an issue?

This is already handled by using a random minute of the hour, as
implemented in 9b43399057 (maintenance: use random minute in cron
scheduler, 2023-08-10), for example. There are similar uses for
systemd, launchctl, and schtasks schedulers (look for uses of
the get_random_minute() method).

Are you noticing that this isn't working as expected?

Thanks,
-Stolee


  reply	other threads:[~2024-09-20 19:20 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-09-20 15:15 Prefetch maintenance might lead to thundering herd issues Shubham Kanodia
2024-09-20 19:20 ` Derrick Stolee [this message]
2024-09-22 18:40   ` Shubham Kanodia
2024-09-23  1:26     ` Derrick Stolee

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=b67c7b6b-f11b-4306-b3ba-c440e8cf7cab@gmail.com \
    --to=stolee@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=ps@pks.im \
    --cc=shubham.kanodia10@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).