Skip site navigation (1) Skip section navigation (2)

Re: understanding pg_stat* numbers

From: Oleg Bartunov <oleg(at)sai(dot)msu(dot)su>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Pgsql Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: understanding pg_stat* numbers
Date: 2005-03-26 21:35:36
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers
On Sat, 26 Mar 2005, Tom Lane wrote:

> Oleg Bartunov <oleg(at)sai(dot)msu(dot)su> writes:
>> I'm looking for blocks *actually* read from disk, since IO is the most
>> important factor.
> Well, you won't find that out from Postgres, since it has no idea
> whether a read() request was satisfied from kernel disk cache or had
> to actually go to disk.

so, what's the usefulness of pg_stat* ?

From my experiments I feel heap_blks_read is the table blocks read from disk, 
well, sort of, and heap_blks_hit - from buffer. At least, I observed when I 
repeat the same query several times (heap_blks_read+heap_blks_hit) doesn't 
changed while more blocks come from heap_blks_hit.

> You could turn on log_statement_stats to get some possibly-more-reliable
> numbers from the kernel via getrusage(), but this will only tell you
> about totals across the whole backend process, not per-relation ...

Hmm, it's impossible to do researching :( We have so many parameters and
almost no reliable stats. How do you believe you did a good choice ?
It's common in db worlds to have IO statistics (timings are not important)
to research algorithms and implementation.

> 			regards, tom lane

Oleg Bartunov, sci.researcher, hostmaster of AstroNet,
Sternberg Astronomical Institute, Moscow University (Russia)
Internet: oleg(at)sai(dot)msu(dot)su,
phone: +007(095)939-16-83, +007(095)939-23-83

In response to


pgsql-hackers by date

Next:From: lsunleyDate: 2005-03-26 21:49:50
Subject: Re: Bug 1500
Previous:From: Tom LaneDate: 2005-03-26 21:05:04
Subject: Re: understanding pg_stat* numbers

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group