From: Dan Holmsand <holmsand@gmail.com>
To: Junio C Hamano <junkio@cox.net>
Cc: Daniel Barkalow <barkalow@iabervon.org>,
torvalds@osdl.org, git@vger.kernel.org
Subject: Re: [RFC] Design for http-pull on repo with packs
Date: Mon, 11 Jul 2005 17:53:50 +0200 [thread overview]
Message-ID: <42D2960E.3050008@gmail.com> (raw)
In-Reply-To: <7v4qb2ni73.fsf@assigned-by-dhcp.cox.net>
Junio C Hamano wrote:
> One very minor problem I have with Holmsand approach [*1*] is
> that the original Barkalow puller allowed a really dumb http
> server by not requiring directory index at all. For somebody
> like me with a cheap ISP account [*2*], it was great that I did
> not have to update 256 index.html files for objects/??/
> directories. Admittedly, it would be just one directory
> object/pack/, but still...
I totally agree that you shouldn't have to do any special kind of
prepping to serve a repository thru http. Which was why I thought it was
a good thing to use the default directory listing of the web-server,
assuming that this feature would be available on most servers...
Apparently not yours, though :-(
And Cogito already relies on directory listings (to find tags to download).
But if git-repack-script generates a "pack index file" automagically,
then of course everything is fine.
> On the other hand, picking an optimum set of packs from
> overlapping set of packs is indeed a very interesting (and hard
> combinatorial) problem to solve. I am hoping that in practice
> people would not force clients to do it with "interesting" set
> of packs. I would hope them to have just a full pack and
> incrementals, never having ovelaps, like Linus plans to do on
> his kernel repo.
>
> On the other hand, for somebody like Jeff Garzik with 50 heads,
> it might make some sense to have a handful different overlapping
> packs, optimized for different sets of people wanting to pull
> some but not all of his heads.
Well, it is an interresting problem... But I don't think that the
solution is to create more pack files. In fact, you'd want as few pack
files as possible, for maximum overall efficiency.
I did a little experiment. I cloned Linus' current tree, and git
repacked everything (that's 63M + 3.3M worth of pack files). Then I got
something like 25 or so of Jeff's branches. That's 6.9M of object files,
and 1.4M packed. Total size: 70M for the entire .git/objects/pack directory.
Repacking all of that to a single pack file gives, somewhat
surprisingly, a pack size of 62M (+ 1.3M index). In other words, the
cost of getting all those branches, and all of the new stuff from Linus,
turns out to be *negative* (probably due to some strange deltification
coincidence).
I think that this shows that (at least in this case), having many
branches isn't particularly wasteful (1.4M in this case with one
incremental pack).
And that fewer packs beats many packs quite handily.
The big problem, however, comes when Jeff (or anyone else) decides to
repack. Then, if you fetch both his repo and Linus', you might end up
with several really big pack files, that mostly overlap. That could
easily mean storing most objects many times, if you don't do some smart
selective un/repacking when fetching.
/dan
next prev parent reply other threads:[~2005-07-11 16:21 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-07-10 18:42 [RFC] Design for http-pull on repo with packs Daniel Barkalow
2005-07-10 19:56 ` Dan Holmsand
2005-07-10 20:29 ` Daniel Barkalow
2005-07-10 21:39 ` Dan Holmsand
2005-07-11 3:18 ` Junio C Hamano
2005-07-11 15:53 ` Dan Holmsand [this message]
2005-07-11 17:08 ` Tony Luck
2005-07-11 23:30 ` Junio C Hamano
2005-07-12 17:21 ` Dan Holmsand
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=42D2960E.3050008@gmail.com \
--to=holmsand@gmail.com \
--cc=barkalow@iabervon.org \
--cc=git@vger.kernel.org \
--cc=junkio@cox.net \
--cc=torvalds@osdl.org \
/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).