tdb2: expand more slowly.
We took the original expansion heuristic from TDB1, and they just
fixed theirs, so copy that.
Before:
After:
time ./growtdb-bench 250000 10 > /dev/null && ls -l /tmp/growtdb.tdb && time ./tdbtorture -s 0 && ls -l torture.tdb && ./speed --transaction
2000000
growtdb-bench.c: In function ‘main’:
growtdb-bench.c:74:8: warning: ignoring return value of ‘system’, declared with attribute warn_unused_result
growtdb-bench.c:108:9: warning: ignoring return value of ‘system’, declared with attribute warn_unused_result
real 1m0.243s
user 0m13.677s
sys 0m4.336s
-rw------- 1 rusty rusty
683302864 2011-04-27 21:03 /tmp/growtdb.tdb
testing with 3 processes, 5000 loops, seed=0
OK
real 1m24.074s
user 0m0.344s
sys 0m0.468s
-rw------- 1 rusty rusty 836040 2011-04-27 21:04 torture.tdb
Adding
2000000 records: 1015 ns (
110551992 bytes)
Finding
2000000 records: 641 ns (
110551992 bytes)
Missing
2000000 records: 445 ns (
110551992 bytes)
Traversing
2000000 records: 439 ns (
110551992 bytes)
Deleting
2000000 records: 807 ns (
199517112 bytes)
Re-adding
2000000 records: 851 ns (
199517112 bytes)
Appending
2000000 records: 1301 ns (
376542552 bytes)
Churning
2000000 records: 2423 ns (
553641304 bytes)