Re: Move unused buffers to freelist - Mailing list pgsql-hackers

From Amit kapila
Subject Re: Move unused buffers to freelist
Date
Msg-id 6C0B27F7206C9E4CA54AE035729E9C38421B24BF@szxeml558-mbs.china.huawei.com
Whole thread Raw
In response to Re: Move unused buffers to freelist  (Jim Nasby <jim@nasby.net>)
List pgsql-hackers
On Friday, May 24, 2013 8:22 PM Jim Nasby wrote:
On 5/14/13 8:42 AM, Amit Kapila wrote:
>> In the attached patch, bgwriter/checkpointer moves unused (usage_count =0 && refcount = 0) buffer’s to end of
freelist.I have implemented a new API StrategyMoveBufferToFreeListEnd() to 
>>
>> move buffer’s to end of freelist.
>>

> Instead of a separate function, would it be better to add an argument to StrategyFreeBuffer?
 Yes, it could be done with a parameter which will decide whether to put buffer at head or tail in freelist. However
currentlythe main focus is to check in which cases this optimization can give benefit. Robert had ran tests for quite a
numberof cases where it doesn't show any significant gain. I am also trying with various configurations to see if it
givesany benefit. Robert has given some suggestions to change the way currently new function is getting called,  I will
tryit and update the results of same. 
 I am not very sure that default pgbench is a good test scenario to test this optimization. If you have any suggestions
fortests where it can show benefit, that would be a great input. 

> ISTM this is similar to the other strategy stuff in the buffer manager, so perhaps it should mirror that...

With Regards,
Amit Kapila.


pgsql-hackers by date:

Previous
From: Hannu Krosing
Date:
Subject: Re: getting rid of freezing
Next
From: Amit kapila
Date:
Subject: Re: pg_rewind, a tool for resynchronizing an old master after failover