Re: [HACKERS] VACUUM and spoiling the buffer manager cache
On Thu, 2007-03-01 at 11:00 +0900, ITAGAKI Takahiro wrote: > "Simon Riggs" <[EMAIL PROTECTED]> wrote: > > > > > VACUUM's current behaviour is to take blocks it has touched and place > > > > them on the head of the freelist, allowing them to be reused. > > > > > > No, it puts them at the tail of the freelist. > > > > That's a minor point because the freelist is mostly empty, so head == > > tail in 99.9% of cases. > > That's correct. Also, even if a VACUUM process collects some unused buffers > into the freelist, other backends comsume all of them in a moment. AFAICS the patch is useful and valid. Please could we have some additional testers, so that we have a range of opinion, rather than just my/EDB tests. I'll submit further detailed tests after feature freeze, since right now I have other things to do, but I'll return to this point again. -- Simon Riggs EnterpriseDB http://www.enterprisedb.com ---(end of broadcast)--- TIP 7: You can help support the PostgreSQL project by donating at http://www.postgresql.org/about/donate
Re: [HACKERS] VACUUM and spoiling the buffer manager cache
"Simon Riggs" <[EMAIL PROTECTED]> wrote: > > > VACUUM's current behaviour is to take blocks it has touched and place > > > them on the head of the freelist, allowing them to be reused. > > > > No, it puts them at the tail of the freelist. > > That's a minor point because the freelist is mostly empty, so head == > tail in 99.9% of cases. That's correct. Also, even if a VACUUM process collects some unused buffers into the freelist, other backends comsume all of them in a moment. Regards, --- ITAGAKI Takahiro NTT Open Source Software Center ---(end of broadcast)--- TIP 7: You can help support the PostgreSQL project by donating at http://www.postgresql.org/about/donate
Re: [HACKERS] VACUUM and spoiling the buffer manager cache
On Wed, 2007-02-28 at 11:09 -0500, Tom Lane wrote: > "Simon Riggs" <[EMAIL PROTECTED]> writes: > > VACUUM's current behaviour is to take blocks it has touched and place > > them on the head of the freelist, allowing them to be reused. > > No, it puts them at the tail of the freelist. That's a minor point because the freelist is mostly empty, so head == tail in 99.9% of cases. The freelist does start full, but we only *put* things on the freelist when we call InvalidateBuffer() after a DROP TABLE etc, or when we finish with a VACUUM buffer. So after the first few minutes of server operation we hardly ever use the freelist and so will be empty when we start dropping VACUUM'd buffers on it, head or tail. The negative effect on response times and overall performance is clearly noticeable in tests. -- Simon Riggs EnterpriseDB http://www.enterprisedb.com ---(end of broadcast)--- TIP 1: if posting/reading through Usenet, please send an appropriate subscribe-nomail command to [EMAIL PROTECTED] so that your message can get through to the mailing list cleanly
Re: [HACKERS] VACUUM and spoiling the buffer manager cache
"Simon Riggs" <[EMAIL PROTECTED]> writes: > VACUUM's current behaviour is to take blocks it has touched and place > them on the head of the freelist, allowing them to be reused. No, it puts them at the tail of the freelist. So I am unconvinced by the rest of your argument. regards, tom lane ---(end of broadcast)--- TIP 7: You can help support the PostgreSQL project by donating at http://www.postgresql.org/about/donate