![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
I want to ask a question about how to count the number of physical I/O in BDB? Assuming we do some operations fetching some data from BDB. I cannot see any parameter in db_stat() can reflect the information I need. |
#3
| |||
| |||
|
|
Hi Joe, I want to ask a question about how to count the number of physical I/O in BDB? Assuming we do some operations fetching some data from BDB. I cannot see any parameter in db_stat() can reflect the information I need. The db_stat utility provides the information that you need. The number of I/O operations can be estimated by analyzing the no of pages that were: - needed to be read in the cache; - written from the cache to the backing file; - dirty pages written by the trickle-sync thread. For example, running the utility like this, % db_stat -m -h TESTDIR, where TESTDIR is the enviroment's name, displays an output in the following format: 257KB 868B Total cache size 1 Number of caches 264KB Pool individual cache size ...... 189 Requested pages found in the cache (98%) 2 Requested pages not found in the cache 0 Pages created in the cache 2 Pages read into the cache 1 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 2 Current total page count 1 Current clean page count 1 Current dirty page count Please note that you can determine the no of physical I/O operations based on the following facts: - each time a key/data is not found in the cache BDB has to go to disk to get the page that contains the record (once in the cache, that page could contain other key/data pairs requested in future operations, so there will be no need for future I/O); - each time you want to write a page (a dirty one, containing updated key/data) BDB has to go to disk (flushing/syncing,checkpointing,trickleing... all imply that BDB goes to disk). There are a couple of links that you can reffer to for further information: http://www.sleepycat.com/docs/ref/am...cachesize.html http://www.sleepycat.com/docs/utility/db_stat.html http://www.sleepycat.com/docs/api_c/memp_stat.html Regards, hope this information will be of help to you, Andrei Costache, Oracle Corporation |
![]() |
| Thread Tools | |
| Display Modes | |
| |