dbTalk Databases Forums  

[BUGS] inpricise checkpoint stats

mailing.database.pgsql-bugs mailing.database.pgsql-bugs


Discuss [BUGS] inpricise checkpoint stats in the mailing.database.pgsql-bugs forum.



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

Default [BUGS] inpricise checkpoint stats - 03-22-2006 , 10:17 PM






test=# set log_statement_stats = on;
SET
test=# checkpoint;
LOG: QUERY STATISTICS
DETAIL: ! system usage stats:
! 0.100725 elapsed 0.000000 user 0.000000 system sec
! [0.000000 user 0.001999 sys total]
! 0/0 [0/0] filesystem blocks in/out
! 0/0 [0/319] page faults/reclaims, 0 [0] swaps
! 0 [0] signals rcvd, 0/0 [0/0] messages rcvd/sent
! 1/1 [8/6] voluntary/involuntary context switches
! buffer usage stats:
! Shared blocks: 0 read, 0 written, buffer
hit rate = 0.00%
! Local blocks: 0 read, 0 written, buffer
hit rate = 0.00%
! Direct blocks: 0 read, 0 written
CHECKPOINT

The problematic line is "0 written" -- this is because we bgwriter is
actually the command exeuctor. So in our process, we got nothing. But maybe
not deserved a fix ...

Regards,
Qingqing



---------------------------(end of broadcast)---------------------------
TIP 4: Have you searched our list archives?

http://archives.postgresql.org

Reply With Quote
  #2  
Old   
Tom Lane
 
Posts: n/a

Default Re: [BUGS] inpricise checkpoint stats - 03-22-2006 , 10:51 PM






"Qingqing Zhou" <zhouqq (AT) cs (DOT) toronto.edu> writes:
Quote:
The problematic line is "0 written" --
What's your point? Those stats are correct for the current process (or
if not, better take it up with your kernel vendor) and we've never
stated that they are anything else than process-local stats. In every
version of Postgres it's been possible that pages dirtied by one process
are actually written by some other process --- the bgwriter isn't doing
anything except altering the probabilities a bit.

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 1: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to majordomo (AT) postgresql (DOT) org so that your
message can get through to the mailing list cleanly


Reply With Quote
  #3  
Old   
Qingqing Zhou
 
Posts: n/a

Default Re: [BUGS] inpricise checkpoint stats - 03-22-2006 , 11:42 PM




"Tom Lane" <tgl (AT) sss (DOT) pgh.pa.us> wrote
Quote:
"Qingqing Zhou" <zhouqq (AT) cs (DOT) toronto.edu> writes:
The problematic line is "0 written" --

What's your point? Those stats are correct for the current process (or
if not, better take it up with your kernel vendor) and we've never
stated that they are anything else than process-local stats. In every
version of Postgres it's been possible that pages dirtied by one process
are actually written by some other process --- the bgwriter isn't doing
anything except altering the probabilities a bit.

I mean for other commands, the stats are real for it -- no matter it writes
out its own dirty pages or others. Because the process itself is the *only*
exeuctor. From those numbers, I can roughly figure out why it tooks that
time to finish. But for CHECKPOINT, the process actually is not the
executor.

I raise this problem because (1) I want to add a stat number for xlog
write/sync; (2) Considering we may have a background xlog writer (discussed
long time before), the stats may become pointless for local process.

Regards,
Qingqing



---------------------------(end of broadcast)---------------------------
TIP 2: Don't 'kill -9' the postmaster


Reply With Quote
  #4  
Old   
Tom Lane
 
Posts: n/a

Default Re: [BUGS] inpricise checkpoint stats - 03-22-2006 , 11:54 PM



"Qingqing Zhou" <zhouqq (AT) cs (DOT) toronto.edu> writes:
Quote:
I raise this problem because (1) I want to add a stat number for xlog
write/sync; (2) Considering we may have a background xlog writer (discussed
long time before), the stats may become pointless for local process.
The bgwriter is already capable of pushing xlog data to disk --- it must
do so to guarantee the invariant that xlog hits disk before data-file
change. I think it could do with some tweaking to make it more probable
that the bgwriter issues such writes rather than a regular backend, but
it can happen now. And even without the bgwriter, xlog data your
process created could be forced to disk by some other backend if the
other backend wants to commit before you do.

I'm not entirely sure that the getrusage stats ever meant a lot for
Postgres; they're certainly a pretty incomplete view of what's going
on now.

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 6: explain analyze is your friend


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.