directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Emmanuel L├ęcharny <>
Subject Mavibot cache experiment, some results
Date Wed, 11 Sep 2013 07:57:43 GMT
Hi guys,

I have run some performance tests with Mavibot and cache, and the
numbers are not quite good, but at least, I know why.

First, if I use 1000 as a cache size, and inject 10 000 entries, I can
get around 13 000 search/s, pretty similar to what I get with the
previous mavinot version (which uses weak references). That's good.

Second, I can now add 100 000 entries into the server, but it takes 1h
more or less.

Third, searching in the 100 000 entries base takes forever, ie I can't
get more than 700 search/s, which is 20 times slower than when the cache
is big enough to keep all the entries in memory.

Now, I profiled the server with a small cache and I found that we spend
60% of the time deserializing entries. All in all, for one single
search, we deserialize 12 entries. The reson is that when we have to
read the data from disk - something likely to happen when the cache is
small - then we pay the cost of reading the data from the disk, plus an
extra penalty for deserializing *all* the entries stored in the leaf we
just read from disk (around 12 entries per leaf, if the leaf contains 16
available slots).

There is plenty of room for imtpovement here...

Emmanuel L├ęcharny 

View raw message