我计划在BerkeleyDB JE数据库中插入大量唯一键(〜3E9).
键的长度是固定的(〜10个字节),但是值的长度是可变的.该数据库将不是事务性的.
您对EnvironmentConfig和DatabaseConfig建议什么参数来优化数据库的大小和速度?
非常感谢,
皮埃尔
解决方法:
好的,我使用打包到berkeleyDB-JE中的实用程序com.sleepycat.je.util.DbCacheSize找到了解决方案
java -cp je-4.0.103.jar com.sleepycat.je.util.DbCacheSize -records 3000000000 -key 8
Inputs: records=3000000000 keySize=8 dataSize=-1 nodeMax=128 binMax=128 density=80% overhead=10%
=== Cache Sizing Summary ===
Cache Size Btree Size Description
--------------- --------------- -----------
206,574,616,257 185,917,154,632 Minimum, internal nodes only
231,821,163,884 208,639,047,496 Maximum, internal nodes only
To get leaf node sizing specify -data
=== Memory Usage by Btree Level ===
Minimum Bytes Maximum Bytes Nodes Level
--------------- --------------- ---------- -----
184,101,562,500 206,601,562,500 29,296,875 1
1,797,864,968 2,017,591,304 286,102 2
17,551,212 19,696,236 2,793 3
169,668 190,404 27 4
6,284 7,052 1 5