dbTalk Databases Forums  

How to count the number of physical I/O in BDB?

comp.databases.berkeley-db comp.databases.berkeley-db


Discuss How to count the number of physical I/O in BDB? in the comp.databases.berkeley-db forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Joe
 
Posts: n/a

Default How to count the number of physical I/O in BDB? - 08-04-2006 , 03:51 AM






Dear All,

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.

Can BDB do this?

Sincerely yours,
Joe


Reply With Quote
  #2  
Old   
AndiKox
 
Posts: n/a

Default Re: How to count the number of physical I/O in BDB? - 08-04-2006 , 07:01 AM






Hi Joe,

Quote:
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



Reply With Quote
  #3  
Old   
Joe
 
Posts: n/a

Default Re: How to count the number of physical I/O in BDB? - 08-04-2006 , 12:30 PM



Hi Andikox,

I am sure that your advice helps, thanks.

Regards,
Joe

AndiKox 写道:

Quote:
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


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.