On 2009.04.07 09:13:45 -0400, Nicolas Pitre wrote: > On Tue, 7 Apr 2009, Jakub Narebski wrote: > > > Björn Steinbrink <B.Steinbrink@xxxxxx> writes: > > > On 2009.04.05 23:24:27 -0400, Nicolas Pitre wrote: > > > > On Sun, 5 Apr 2009, Sverre Rabbelier wrote: > > > > > > > > > > I agree here, we should either say "look, we don't really support big > > > > > repositories because [explanation here], unless you [workarounds > > > > > here]" OR we should work to improve the support we do have. Of course, > > > > > the latter option does not magically create developer time to work on > > > > > that, but if we do go that way we should at least tell people that we > > > > > are aware of the problems and that it's on the global TODO list (not > > > > > necessarily on anyone's personal TODO list though). > > > > > > > > For the record... I at least am aware of the problem and it is indeed on > > > > my personal git todo list. Not that I have a clear solution yet (I've > > > > been pondering on some git packing issues for almost 4 years now). > > > > > > > > Still, in this particular case, the problem appears to be unclear to me, > > > > like "this shouldn't be so bad". > > > > > > It's not primarily pack-objects, I think. It's the rev-list that's run > > > by upload-pack. Running "git rev-list --objects --all" on that repo > > > eats about 2G RSS, easily killing the system's cache on a small box, > > > leading to swapping and a painful time reading the packfile contents > > > afterwards to send them to the client. > > > > Than I think that "packfile caching" GSoC project (which is IIRC > > "object enumeration caching", or at least includes it) should help > > here. > > NO! > > Please people stop being so creative with all sort of ways to simply > avoid the real issue and focussing on a real fix. Git has not become > what it is today by the accumulation of workarounds and ignorance of > fundamental issues. > > Having git-rev-list consume about 2G RSS for the enumeration of 4M > objects is simply inacceptable, period. This is the equivalent of 500 > bytes per object pinned in memory on average, just for listing object, > which is completely silly. We ought to do better than that. Ah, crap, I might have been fooled by "ps aux", top actually shows about 1.3G being shared, likely the mmapped pack files. And that will be reused, assuming the box has enough memory to keep all that stuff. But that's still 700MB or about 150 bytes per object on average. A "struct tree" is 40 bytes here, adding the average path length (19 in this repo) that's 59 byte, leaving about 90 bytes of "overhead" per object, as end the end we seem to care only about the sha1 and the path name. And in the upload-pack case, there's also pack-objects running concurrently, already going up to 950M RSS/100M shared _while_ the rev-list is still running. So that's 3G of memory usage (2G if you ignore the shared stuff) before the "Compressing objects" part even starts. And of course, pack-objects will apparently start to mmap the pack files only after the rev-list finished, so a "smart" OS might have removed a lot of the mmapped stuff from memory again, causing it to be re-read. :-/ Björn -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html