473,769 Members | 3,857 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

buffer pool hit ratio

Hi there,

BP hit ratio = 1 - (BP physical reads / BP logical reads).

If all the BP physical reads are asynchronous, it should mean that the pages
are brought up to the bufferpool before the database manager needs them.
But in that case, the BP hit ratio will be 0% (BP physical reads = BP async.
physical reads = BP logical reads).

Could this formula BP hit ratio = 1 - ((BP physical reads - BP async.
physical reads) / BP logical reads) be more accurate or am I missing a point
?

Thanks for your help,

Eric

Nov 12 '05 #1
7 11418
Ian
eric wrote:
Hi there,

BP hit ratio = 1 - (BP physical reads / BP logical reads).

If all the BP physical reads are asynchronous, it should mean that the pages
are brought up to the bufferpool before the database manager needs them.
But in that case, the BP hit ratio will be 0% (BP physical reads = BP async.
physical reads = BP logical reads).


Your formula is not correct, and I think that's what's causing
your confusion. The total number of reads in the database is
the sum of the logical and physical reads. Therefore,

BP hit ratio = 100 * logical / (physical + logical).
As you can see, if BP physical reads = 0, then the hit ratio is
100%.
Good luck,

-----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
-----== Over 100,000 Newsgroups - 19 Different Servers! =-----
Nov 12 '05 #2
Thanks Ian,

Your formula sounds more comprehensible to me.
BP hit ratio = 100 * logical / (physical + logical).

However, the formula BP hit ratio = (1 - (BP physical reads / BP logical
reads))*100 was taken from the DB2 UDB HTML documentation.
Can someone explain why this formula and not Ian's one ?

Thanks,

Eric

"Ian" <ia*****@mobile audio.com> a écrit dans le message de
news:3f******** **@corp.newsgro ups.com...
eric wrote:
Hi there,

BP hit ratio = 1 - (BP physical reads / BP logical reads).
>
If all the BP physical reads are asynchronous, it should mean that the pages are brought up to the bufferpool before the database manager needs them.
But in that case, the BP hit ratio will be 0% (BP physical reads = BP async. physical reads = BP logical reads).


Your formula is not correct, and I think that's what's causing
your confusion. The total number of reads in the database is
the sum of the logical and physical reads. Therefore,

BP hit ratio = 100 * logical / (physical + logical).
As you can see, if BP physical reads = 0, then the hit ratio is
100%.
Good luck,

-----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
-----== Over 100,000 Newsgroups - 19 Different Servers! =-----

Nov 12 '05 #3
(BP physical reads / BP logical reads) is there to measure the relation
between
the physical io's (disk access) vs the logical ones (buffered pages/in
bufferpool).

There are logical and physical io's.
Physical io's can be split into sync (direct) and async io's (prefetch,
etc.).

logical
physical sync
physical async

PM
Nov 12 '05 #4
PM,

If you take the (1 - (BP physical reads / BP logical reads)) * 100 formula
in a DSS context, where let say you have many physical ios and 95% of them
are asynchronous, the formula always leads you to a very weak hit ratio, for
example: 1 - (500 / 600) = 16.7% [ 500*.95=475 async ios]

Now, if you substract the Async IOs:
(1 - (500 - 475)/ 600) * 100, your hit ratio seems better, = 95.8%

Am I right to change the formula ? It seems to me it's adequate in OLTP
environment, not DSS.

Any additional thoughts ?

Thanks,

Eric
"PM-pm3iinc-nospam" <pm*****@sympat ico.ca> a écrit dans le message de
news:an******** **********@news 20.bellglobal.c om...
(BP physical reads / BP logical reads) is there to measure the relation
between
the physical io's (disk access) vs the logical ones (buffered pages/in
bufferpool).

There are logical and physical io's.
Physical io's can be split into sync (direct) and async io's (prefetch,
etc.).

logical
physical sync
physical async

PM

Nov 12 '05 #5
Eric-

A couple of us were going around about this formula today until we
took a closer look at the 7.1 Performance Tuning Guide (p. 242):

"Buffer Pool Data Logical Reads: Denotes the total number of read
data requests that went through the buffer pool.
Buffer Pool Data Physical Reads: Denotes the number of read requests
performed that required I/O to place data pages in the buffer pool."

So it seems that Logical Reads are the TOTAL requests for data from
the buffer pool, regardless of whether the pages were in the buffer
pool or not, in which case, the IBM formula is correct. I just double
checked the algebra :)

It's a bummer for me, because I have been using the formula Ian posted
for a while now, and my buffer pool hit ratios are now much lower than
I originally thought.

Hope this helps,
Todd

"eric" <no***********@ wanadoo.fr> wrote in message news:<bn******* ***@news-reader1.wanadoo .fr>...
Thanks Ian,

Your formula sounds more comprehensible to me.
BP hit ratio = 100 * logical / (physical + logical).

However, the formula BP hit ratio = (1 - (BP physical reads / BP logical
reads))*100 was taken from the DB2 UDB HTML documentation.
Can someone explain why this formula and not Ian's one ?

Thanks,

Eric

"Ian" <ia*****@mobile audio.com> a écrit dans le message de
news:3f******** **@corp.newsgro ups.com...
eric wrote:
Hi there,

BP hit ratio = 1 - (BP physical reads / BP logical reads).
>
If all the BP physical reads are asynchronous, it should mean that the pages are brought up to the bufferpool before the database manager needs them.
But in that case, the BP hit ratio will be 0% (BP physical reads = BP async. physical reads = BP logical reads).


Your formula is not correct, and I think that's what's causing
your confusion. The total number of reads in the database is
the sum of the logical and physical reads. Therefore,

BP hit ratio = 100 * logical / (physical + logical).
As you can see, if BP physical reads = 0, then the hit ratio is
100%.
Good luck,

-----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
-----== Over 100,000 Newsgroups - 19 Different Servers! =-----

Nov 12 '05 #6
"Todd McNeill" <to***@bluefire systems.com> wrote in message
news:d3******** *************** ***@posting.goo gle.com...
Eric-

A couple of us were going around about this formula today until we
took a closer look at the 7.1 Performance Tuning Guide (p. 242):

"Buffer Pool Data Logical Reads: Denotes the total number of read
data requests that went through the buffer pool.
Buffer Pool Data Physical Reads: Denotes the number of read requests
performed that required I/O to place data pages in the buffer pool."

So it seems that Logical Reads are the TOTAL requests for data from
the buffer pool, regardless of whether the pages were in the buffer
pool or not, in which case, the IBM formula is correct. I just double
checked the algebra :)

It's a bummer for me, because I have been using the formula Ian posted
for a while now, and my buffer pool hit ratios are now much lower than
I originally thought.

Hope this helps,
Todd

It only makes sense to measure the hit ratio once the buffer pool has been
primed. The cumulative buffer pool hit ratio from database start to stop can
never be 100%.
Nov 12 '05 #7
Ian
eric wrote:
Thanks Ian,

Your formula sounds more comprehensible to me.
BP hit ratio = 100 * logical / (physical + logical).

However, the formula BP hit ratio = (1 - (BP physical reads / BP logical
reads))*100 was taken from the DB2 UDB HTML documentation.
Can someone explain why this formula and not Ian's one ?


Oops, looks like _I've_ been using the wrong formula for a long
time! So I've been reading the doc... My mistake was thinking
that a read is either logical OR physical, when in reality the
logical read may require a physical read to be satisfied. Remember
that all data access goes through the bufferpool.

Back to your original question, IF you did have a situation
where physical reads = 0 (but the async bp reads was high),
then you would get a hit ratio of 100%. It would just be
indicative of the fact that your prefetching was VERY effective.
Thanks for helping me get a correct understanding of this...
Ian

-----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
-----== Over 100,000 Newsgroups - 19 Different Servers! =-----
Nov 12 '05 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
6862
by: Tron Thomas | last post by:
As part of applying for a programming position at a company, I recently I had submitted some code samples to one of the developers for review. This is the feedback I received: One of his concerns was frequent calls to new and delete, which can cause memory fragmentation over time. An example is the allocation and destruction
6
3989
by: Mark | last post by:
I understand the concept of catalog cache (memory allocated from the dbheap to allow catalog lookups without the need to access disk each time). But the DB2 catalog tablespace (SYSCATSPACE) is assigned a buffer pool, which seems to perform the same function as catalog cache. Is this simply a case of double buffering? Can anyone clear this up?
3
5418
by: Mark | last post by:
In a DB2 V8.1 performance tuning document from a 3rd party vendor, I found this statement. Can anyone verify this? "DB2 requires 100 bytes of memory for every buffer pool and extended storage page that is allocated to a database for use as a descriptor in the database heap, so the size of the DBHEAP configuration parameter should be considered before creating large buffer pools. For example, a 1 gigabyte buffer pool with a page size of 4...
2
1886
by: Kush | last post by:
Hi. I am kind of new to DB2 and to this newsgroup so please bear with me.. My question is: IBM installation creates 250 4k bufferpools by default. I want to increase this number to 1000, no problem, and I want to create another buffer pool and make it 1000 4k pages also. The documentation says that "once a buffer pool is created, table spaces can be assigned to it using create tablespace or the alter tablespace" commands.
1
2861
by: Marek Wierzbicki | last post by:
Hi I have trouble with MSSQL2000 SP4 (without any hotfixes). During last two weeks it start works anormally. After last optimalization (about few months ago) it works good (fast, without blocks). Its buffer cache hit ratio was about 99.7-99.8. Last day it starts work slow, there was many blocks and dedlocks. There are no any queries, jobs and applications was added. Now buffer cache hit ratio oscilate about 95-98. I try update statistics...
6
6620
by: xeqister | last post by:
Greetings, We are having a situation here whereby one of our staff created a very huge 32K buffer pool in a production database and caused the database to go down. When we try to reconnect to the database using "db2 connect to <dbname>", its giving the following error: SQL1224N A database agent could not be started to service a request, or was terminated as a result of a database system shutdown or a force command. SQLSTATE:55032
64
9762
by: Philip Potter | last post by:
Hello clc, I have a buffer in a program which I write to. The buffer has write-only, unsigned-char-at-a-time access, and the amount of space required isn't known a priori. Therefore I want the buffer to dynamically grow using realloc(). A comment by Richard Heathfield in a thread here suggested that a good algorithm for this is to use realloc() to double the size of the buffer, but if realloc() fails request smaller size increments...
6
2403
by: Angel Tsankov | last post by:
Hi, I remember reading in a book (or in an article) that the optmial buffer growth factor is about 1.6. Now I need to find this book but I can't remember its title. Can someone help me with this?
4
6024
by: Patrick Finnegan | last post by:
Is there a DB2 setting that will force a table to be cached in the buffer pool? We have four tables that we want to cache completely in the buffer pool to ensure that all the data is read from memory. The buffer pool ratio should be close to 100%. It's about 80% at the moment. Would a "select all" statement cache everything in the table?
0
9423
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10214
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10048
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9865
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7410
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6674
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5304
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5447
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
3
2815
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.