git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Reducing CPU load on git server

From
Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Date
Aug 29, 2016, 20:14 UTC
Message-ID
<CACBZZX63DAmFt_ZiUHj-bs9dtwRd4MOxoLfM8r1uRi3q4Mwnkw@mail.gmail.com>
In-Reply-To
<CAFMAO9y3LsrAb_jp8XVq2mexaA4bBqmWFwJu55r4S6Dxd2-zxw@mail.gmail.com>

On Sun, Aug 28, 2016 at 9:42 PM, W. David Jarvis <william.d.jarvis@gmail.com> wrote:

> I've run into a problem that I'm looking for some help with. Let me
> describe the situation, and then some thoughts.

Just a few points that you may not have considered, and I didn't see mentioned in this thread:

 * Consider having that queue of yours just send the pushed payload
instead of "pull this", see git-bundle. This can turn this sync entire
thing into a static file distribution problem.
 * It's not clear from your post why you have to worry about all these
branches, surely your Chef instances just need the "master" branch,
just push that around.
 * If you do need branches consider archiving stale tags/branches
after some time. I implemented this where I work, we just have a
$REPO-archive.git with every tag/branch ever created for a given
$REPO.git, and delete refs after a certain time.
 * If your problem is that you're CPU bound on the master have you
considered maybe solving this with something like NFS, i.e. replace
your ad-hoc replication with just a bunch of "slave" boxes that mount
the remote filesystem.
 * Or, if you're willing to deal with occasional transitory repo
corruption (just retry?): rsync.
 * Theres's no reason for why your replication chain needs to be
single-level if master CPU is really the issue. You could have master
-> N slaves -> N*X slaves, or some combination thereof.
 * Does it really even matter that your "slave" machines are all
up-to-date? We have something similar at work but it's just a minutely
cronjob that does "git fetch" on some repos, since the downstream
thing (e.g. the chef run) doesn't run more than once every 30m or
whatever anyway.
Previous: Dennis KaarsemakerNext: W. David Jarvis
Message 14 of 16 in “Reducing CPU load on git server”
  1. W. David JarvisAug 28, 2016
  2. Jakub NarębskiAug 28, 2016
  3. W. David JarvisAug 28, 2016
  4. Jeff KingAug 29, 2016
  5. Jakub NarębskiAug 29, 2016
  6. Jeff KingAug 29, 2016
  7. W. David JarvisAug 29, 2016
  8. Jeff KingAug 29, 2016
  9. W. David JarvisAug 29, 2016
  10. Jeff KingAug 31, 2016
  11. git blame <directory> [was: Reducing CPU load on git server]Jakub Narębski, Aug 30, 2016
  12. Jeff KingAug 31, 2016
  13. Dennis KaarsemakerAug 31, 2016
  14. Ævar Arnfjörð BjarmasonAug 29, 2016
  15. W. David JarvisAug 29, 2016
  16. Dennis KaarsemakerAug 29, 2016

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.