]> git.michaelhowe.org Git - packages/b/bup.git/commit
Reduce default max objects per pack to 200,000 to save memory.
authorAvery Pennarun <apenwarr@gmail.com>
Tue, 12 Jan 2010 01:06:08 +0000 (20:06 -0500)
committerAvery Pennarun <apenwarr@gmail.com>
Tue, 12 Jan 2010 01:09:57 +0000 (20:09 -0500)
commitcfd369dc74924202dd79beb15a8ee619c9ed970e
treed2c187185d996b1111357d4ab10161673f9464ac
parent0aec3f6ed9c6dcddc914e5f18dfcb74c4c2f4f96
Reduce default max objects per pack to 200,000 to save memory.

After some testing, it seems each object sha1 we need to cache while writing
a pack costs us about 83 bytes of memory.  (This isn't so great, so
optimizing it in C later could cut this down a lot.)  The new limit of 200k
objects takes about 16.6 megs of RAM, which nowadays is pretty acceptable.
It also corresponds to roughly 1GB of packfile for my random select of
sample data, so (since the default packfile limit is about 1GB anyway), this
*mostly* won't matter.

It will have an effect if your data is highly compressible, however; an
8192-byte object could compress down to a very small size and you'd end up
with a large number of objects.  The previous default limit of 10 million
objects was ridiculous, since that would take 830 megs of RAM.
git.py
hashsplit.py