Re: [PATCH] doc: mention bigFileThreshold for packing

2 messages, 2 authors, 2021-02-10 · open the first message on its own page

Re: [PATCH] doc: mention bigFileThreshold for packing

From: Junio C Hamano <hidden>
Date: 2021-02-09 23:12:24

"Christian Walther via GitGitGadget" [off-list ref]
writes:
From: Christian Walther <redacted>

Knowing about the core.bigFileThreshold configuration variable is
helpful when examining pack file size differences between repositories.
Add a reference to it to the manpages a user is likely to read in this
situation.
Thanks.

I doubt that the description of --window/--depth command line
options, for both repack and pack-objects, is the best place to add
this "Note".  Even if we were to add it as an appendix to these
places, please do not break the flow of explanation by inserting it
before the description of the default values of these options.
    I recently spent a lot of time trying to figure out why git repack would
    create huge packs on some clones of my repository and small ones on
    others, until I found out about the existence of the
    core.bigFileThreshold configuration variable, which happened to be set
    on some and not on others. It would have saved me a lot of time if that
    variable had been mentioned in the relevant manpages that I was reading,
    git-repack and git-pack-objects. So this patch adds that.
Not related to the contents of the patch, but I am somewhat curious
to know what configuration resulted in the "huge" ones and "small"
ones.  Documentation/config/core.txt::core.bigFileThreashold may be
helped by addition of a success story, and the configuration for the
"small" ones may be a good place to start.

Thanks

Re: [PATCH] doc: mention bigFileThreshold for packing

From: Christian Walther <hidden>
Date: 2021-02-10 21:44:56

Junio C Hamano wrote:
I doubt that the description of --window/--depth command line
options, for both repack and pack-objects, is the best place to add
this "Note".  Even if we were to add it as an appendix to these
places, please do not break the flow of explanation by inserting it
before the description of the default values of these options.
OK. That was where I would have looked for it, because it explains why --window wasn't effective in my attempts to get better compression, but I don't insist on it - any place would have worked, as I read both manpages back and forth several times.

In git-repack.txt, there is a "Configuration" section at the bottom, I guess it would fit there? There is none in git-pack-objects.txt, but I could add it. What do you think?

quoted
   I recently spent a lot of time trying to figure out why git repack would
   create huge packs on some clones of my repository and small ones on
   others
Not related to the contents of the patch, but I am somewhat curious
to know what configuration resulted in the "huge" ones and "small"
ones.  Documentation/config/core.txt::core.bigFileThreashold may be
helped by addition of a success story, and the configuration for the
"small" ones may be a good place to start.
The "huge" repository had bigFileThreshold = 1m. That was set by SubGit when converting from Subversion, for reasons unknown to me (see some discussion at https://support.tmatesoft.com/t/reduce-repository-size/2551 and https://issues.tmatesoft.com/issue/SGT-604). The result is a pack file of about 3 GB.

The "small" repository has it unset, so the default 512m applies, resulting in a pack file of about 50 MB.

What causes the huge difference is that the repository contains a "changelog" file that changes in almost every commit and has grown to 2.4 MB over 10000 commits. So it exists in about that many different versions, of which about 6000 are larger than 1 MB, but they only differ from each other by successive addition of small pieces.

I'm not sure if that makes for a good success story. 1m seems a rather extreme value to me. If you think so, I can try to come up with something.

Thanks

 Christian
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help