Skip site navigation (1) Skip section navigation (2)

Re: VACUUM and spoiling the buffer manager cache

From: "Simon Riggs" <simon(at)2ndquadrant(dot)com>
To: "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: VACUUM and spoiling the buffer manager cache
Date: 2007-02-28 16:30:02
Message-ID: 1172680202.3760.1009.camel@silverbirch.site (view raw or flat)
Thread:
Lists: pgsql-hackers
On Wed, 2007-02-28 at 11:09 -0500, Tom Lane wrote:
> "Simon Riggs" <simon(at)2ndquadrant(dot)com> 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



In response to

Responses

pgsql-hackers by date

Next:From: Tom LaneDate: 2007-02-28 16:32:29
Subject: Re: Compilation errors
Previous:From: Sergey E. KoposovDate: 2007-02-28 16:26:53
Subject: SOC & user quotas

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group