DiskReads vs. PageReads and Read Ahead
Posted in 1999
Topics: General Discussion
Hi,
I have a few questions about diskreads and pagereads. It's my
understanding that in onstat -p output, diskreads are the number of
disk read requests and pagereads are the number of pages read from
disk. Is there a one to one relationship between diskreads and
pagereads? I tested this on our lab box and it appears that there is a
one to one relationship. However, on a production box, I have a ratio
of 3 to 1 diskreads to pagereads. What causes diskreads to be so much
higher than pagereads? If I have read ahead turned on, should
pagereads be higher than diskreads? On another production box, I have
a ratio of 2 to 1 pagereads to diskreads with a read ahead setting of
32,28. On the box that has more diskreads than pagereads, the read
ahead is set to 8,6.
Again, just trying to understand the relationship of diskreads to
pagereads and read ahead.
thanks in advance,
--
Melvin Mariney
e-mail: melvin.mariney2@bridge.bellsouth.com
The pagreads should always be >= dskreads as Informix reads at least one
page per I/O. During sequential scans the readahead code triggers what
are called BIGREADS of 8 pages each. The combination of random, SMALL,
reads and sequential, BIG, reads is what creates the ratio of pagreads
to dskreads which is dependent on your query mix. In addition the
engine also tries to coalesce reads and writes when it can which adds
more multi-page reads.
I have no idea why you are seeing dskreads > pagreads unless the server
has been up a LONG time without zeroing stats so that one or the other
has wrapped negative and then positive again.
Art S. Kagel
Melvin Mariney wrote:
>
> Hi,
>
> I have a few questions about diskreads and pagereads. It's my
> understanding that in onstat -p output, diskreads are the number of
> disk read requests and pagereads are the number of pages read from
> disk. Is there a one to one relationship between diskreads and
> pagereads? I tested this on our lab box and it appears that there is a
> one to one relationship. However, on a production box, I have a ratio
> of 3 to 1 diskreads to pagereads. What causes diskreads to be so much
> higher than pagereads? If I have read ahead turned on, should
> pagereads be higher than diskreads? On another production box, I have
> a ratio of 2 to 1 pagereads to diskreads with a read ahead setting of
> 32,28. On the box that has more diskreads than pagereads, the read
> ahead is set to 8,6.
>
> Again, just trying to understand the relationship of diskreads to
> pagereads and read ahead.
>
> thanks in advance,
>
> --
>
> Melvin Mariney
> e-mail: melvin.mariney2@bridge.bellsouth.com