优化BerkeleyDB JE数据库 [英] Optimizing a BerkeleyDB JE Database

查看:239
本文介绍了优化BerkeleyDB JE数据库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我计划在 BerkeleyDB JE 数据库。

密钥的长度固定(~10个字节),但值的长度可变。数据库不是事务性的。

The keys will have a fixed length ( ~10 bytes ) but the values will have a variable length. The database won't be transactional.

您建议哪些参数 EnvironmentConfig DatabaseConfig ,用于优化数据库的大小和速度?

What parameters would you suggest for the EnvironmentConfig and the DatabaseConfig for optimizing the size and the speed of my database ?

非常感谢,

Pierre

推荐答案

好的,我发现解决方案使用实用程序 com.sleepycat.je.util.DbCacheSize 打包到berkeleyDB-JE

OK, I found the solution using the utility com.sleepycat.je.util.DbCacheSize packaged into berkeleyDB-JE

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

这篇关于优化BerkeleyDB JE数据库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆