db_stat查看cache size大小

电子书《BerkeleyDB-Core-Cxx-GSG.pdf》,在chapter6描述如何查看bdb的cache size。

使用Berkeley DB 4.5.20安装包中db_stat工具查看。
具体操作如下:

\Oracle\Berkeley DB 4.5.20\bin\db_stat.exe -m -h (bdb环境home目录),也就是如下代码片段中的envHome

	DbEnv myEnv(0);
	int nRet = 0;
	try
	{
		nRet = myEnv.open(envHome.c_str(), env_flags, 0);
	}

输出结果如下:
259KB 260B      Total cache size
1       Number of caches
264KB   Pool individual cache size
0       Maximum memory-mapped file size
0       Maximum open file descriptors
0       Maximum sequential buffer writes
0       Sleep after writing maximum sequential buffers
0       Requested pages mapped into the process' address space
0       Requested pages found in the cache (0%)
1       Requested pages not found in the cache
0       Pages created in the cache
1       Pages read into the cache
0       Pages written from the cache to the backing file
0       Clean pages forced from the cache
0       Dirty pages forced from the cache
0       Dirty pages written by trickle-sync thread
1       Current total page count
1       Current clean page count
0       Current dirty page count
37      Number of hash buckets used for page location
2       Total number of times hash chains searched for a page
0       The longest hash chain searched for a page
0       Total number of hash chain entries checked for page
0       The number of hash bucket locks that required waiting (0%)
0       The maximum number of times any hash bucket lock was waited for (0%)
0       The number of region locks that required waiting (0%)
0       The number of buffers frozen
0       The number of buffers thawed
0       The number of frozen buffers freed
5       The number of page allocations
0       The number of hash buckets examined during allocations
0       The maximum number of hash buckets examined for an allocation
0       The number of pages examined during allocations
0       The max number of pages examined for an allocation
0       Threads waited on page I/O
Pool File: mydb.db
8192    Page size
0       Requested pages mapped into the process' address space
0       Requested pages found in the cache (0%)
1       Requested pages not found in the cache
0       Pages created in the cache
1       Pages read into the cache
0       Pages written from the cache to the backing file
Press any key to continue


  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值