On 9/18/2004 8:38 AM, Michael Paesold wrote:
Tom Lane wrote:

There is some debug output available from the ARC code,
but I dunno if its output is actually useful ;-).  Try


http://developer.postgresql.org/docs/postgres/runtime-config.html#GUC-DEBUG-SHARED-BUFFERS

"debug_shared_buffers (integer)

Number of seconds between ARC reports. If set greater than zero, emit ARC
statistics to the log every so many seconds. Zero (the default) disables
reporting."

It seems it doesn't really do, what it says. Output is only sent during
query execution, no output is sent when no query is active, so it's really
hard to say what happens to buffers during idle time.

Right, it only emits those log lines when there is actually query activity because the output is generated by a backend and not by the background writer itself. Maybe we should change that.



Aside from that I don't believe that the output can answer questions about the efficiency of bgwriter...

DEBUG:  ARC T1target=  194 B1len=  779 T1len=  180 T2len=  820 B2len=  208
DEBUG:  ARC total   =  99% B1hit=  18% T1hit=   6% T2hit=  75% B2hit=   0%
DEBUG:  ARC clean buffers at LRU       T1=     180 T2=     820

Look at the last line about clean buffers at LRU. This shows that you currently don't have ANY dirty buffers, as the number of clean buffers in T1 and T2 is identical to the two queue lengths.


The bgwriter always flushes the oldest dirty buffers, and every buffer touched (hit or faulted in). The output above doesn't tell you how many buffers are really dirty. But if the system is under load, that is pretty much the same as the distance between those numbers.


Anyone?

Regarding current default settings - at this page:
http://developer.postgresql.org/~wieck/vacuum_cost/

Jan, you used different settings for tests here. Can you explain your point
of view?

bgwriter_delay = 50     (now default 200)
bgwriter_percent = 2    (now default 1)
bgwriter_maxpages = 200 (now default 100)

Just what I was having the best TPC-C results with.


Jan

--
#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me.                                  #
#================================================== [EMAIL PROTECTED] #

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

Reply via email to