Thread: Bgwriter--- BufferSync() and StrategyStatsDump()
wht StrategyStatsDump prints is ARC clean buffers at LRU of T1 and T2.... now lets say i have a dirty buffer at position 31st from LRU and the next one is at 3500th... in cases like this... t1_clean and t2_clean are of no use.... a better option would be to have a function like StrategyDirtyBufferList() which will scan till it finds max_buffers dirty buffers or end of the list... but a function like this would have a high overhead.... so a even better method is to print the no. of total buffers it had to scan each time bgwriter wrote... something like.. to find 100 dirty buffers it had to scan 15000 buffers.... this would greatly help ppl in determining the appropriate value of bgwriter parameters.... it would require a simple patch to written which will add two else statements in StrategyDirtyBufferList() and returning a struct instead of int... also a line in function BufferSync()=> elog(DEBUG1,...... i would really love to see something like this to be added to postgres... as then we wont have to spend one whole day trying to determine bgwriter values and finding in the end there is nothing much.... if there is one... plz tell...(i have already used iowait time... but its results are not really encouraging)... Regards Himanshu __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com
Himanshu Baweja <himanshubaweja@yahoo.com> writes: > this would greatly help ppl in determining the > appropriate value of bgwriter parameters.... it would > require a simple patch to written which will add two > else statements in StrategyDirtyBufferList() and > returning a struct instead of int... > also a line in function BufferSync()=> > elog(DEBUG1,...... That whole algorithm is gone in CVS tip, so there's no point in creating such a patch ... regards, tom lane