[MERGE] Use a dict for Btree internal nodes instead of LRU
John Arbash Meinel
john at arbash-meinel.com
Fri Mar 27 04:38:44 GMT 2009
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Robert Collins wrote:
> On Fri, 2009-03-27 at 03:28 +0000, Matt Nordhoff wrote:
>
>
>> If it's really unlikely that the cache will be filled, but you don't
>> want the performance cost of an LRUCache, why not compromise and use a
>> FIFOCache?
>
> Sure.
>
> -Rob
I have a small concern that once your working set is > 1M using a FIFO
cache is going to basically be equivalent to not having a cache.
However, I'll worry about that when we start hitting 1M node trees. We
always cache the root node (in a separate object), so this is only for
the extra internal nodes. If we grow beyond 100, then we'll get another
internal layer anyway. If we just set it to 1000 like the leaf-node
cache, then we would scale into the 10M nodes before it would start
thinking about flushing.
John
=:->
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iEYEARECAAYFAknMWFQACgkQJdeBCYSNAAMoQwCfagn2S5kP5FR+McUNVoUgym2t
K2AAn2UrK11LMBKV+eKPX/VKIOrow08y
=jV0h
-----END PGP SIGNATURE-----
More information about the bazaar
mailing list