Re: Avoid building object ref lists when not needed
From: Linus Torvalds <torvalds@osdl.org>
Date: 2016-06-15 22:42:06
On Fri, 16 Sep 2005, Linus Torvalds wrote:
and note how the number of pages touched by git-rev-list for this particular object list has shrunk from 26,718 (104 MB) to 18,509 (72 MB).
One final note: since I'm only looking at the total page footprint for the process, this _includes_ all the mmap faults of not just the executable, but since my kernel is usign a packed archive, also the actual mapping of the pack itself. The pack itself is 76MB in size, but obviously not all of it actually needs to be read in. For example, it doesn't need to actually read any of the objects themselves (that's done by the actual packing phase), so we're only touching the "commit" and "tree" parts of the pack. Of the 72MB, valgrind reports that "only" about 24MB is now used for actual malloc'ed memory. So while the _total_ "touched pages" have shrunk from 187 MB (when I started) to 72 MB (now), the malloc()'ed memory has actually shrunk a lot more (all the savings have been by either avoiding allocations altogether, or by freeing them as soon as we can). I'm done for the while. There are small wins still to be had, but they are smaller and harder to reach. Maybe I'll get a spurt of energy one of these days, so if somebody finds a particularly problematic load, tell me. Linus