db_stat查看cache size大小

來源:互聯網
上載者:User

電子書《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

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.