Академический Документы
Профессиональный Документы
Культура Документы
Ratio
It is sometimes believed that a database is fast if the number of blocks that are
read from memory is maximized. The term that is related to that idea is Hit
Ratio and is measured in percents. Ideally, the Hit Ratio is 100% (which would
mean that all data ever accessed from the database resides in memory).
However, this believ is usually wrong.
Although the hit ration should not be used for tuning, here's the formula for Hit
Ratio is for completness' sake: 100% * (total blocks read from memory) / (total
blocks read). This is the same as 100% * (1 - (blocks read from harddisk)/(total
blocks read))
Oracle uses the term physical reads for blocks read from harddisk. total blocks
read is made of two components: db blocks gets and consistent gets. So, the
formula becomes:100% * (1-(physical reads/(db block gets + consistent gets))).
A hit is a request to a web server for a file (web page, image, JavaScript,
Cascading Style Sheet, etc.). When a web page is uploaded from a server the
number of "hits" or "page hits" is equal to the number of files requested. ...
Hit (Internet)
From Wikipedia, the free encyclopedia
(Redirected from Hit ratio)
A hit is a request to a web server for a file (web page, image, JavaScript, Cascading Style Sheet, etc.).
When a web page is uploaded from a server the number of "hits" or "page hits" is equal to the number of
files requested. Therefore, one page load does not always equal one hit because often pages are made
up of other images and other files which stack up the number of hits counted. Because one page load
does not equal one hit it is an inaccurate measure of a website's popularity or web traffic. A more
accurate measure of web traffic is how many page views a web site has. Hits are useful when
evaluating the requirements of your server, depending on the number and size of files which need to be
transferred for one request. Servers should be tested to make sure they meet throughput targets (i.e.
What is a TLB??
TLB stands for Translation Lookaside Buffer. In Virtual memory systems, the cpu generates virtual
memory addresses. But, the data is stored in actual physical memory i.e. we need to place a
physical memory address on the memory bus to fetch the data from the memory circuitry. So, a
special table is maintained by the operating system called the Page table. This table contains a
mapping between the virtual addresses and physical addresses. So, everytime a cpu generates a
virtual address, the operating system page table has to be looked up to find the corresponding
physical address. To speed this up, there is hardware support called the TLB. The TLB is a high
speed cache of the page table i.e. contains recently accessed virtual to physical translations.
TLB hit ratio is nothing but the ratio of TLB hits/Total no of queries into TLB. For example, if I
asked the TLB 10 times for virtual-to-physical mappings, and found the mapping 4 times, then my
hit ratio is 4/10 i.e. 40%.
In your example, 984506475 is the logical/virtual address sequence. Assuming an infinite size TLB,
how many tlb hits will we have?? 9, 4, 5 are accessed more than once. So, hit ration is 3/9 =
33%.
But, the question also mentions that the TLB is a FIFO i.e. this means that the TLB size is limited.
So, there is missing info in the question. Lets assume that the TLB size is 4. So, here is what
happens when each new address is accessed:
9
89
489
5489
0548
6054
4605
7460
5746
If you notice, the above is a FIFO simulation. So, how many hits will we have?? None. So, hit ratio
is 0%.