Re: [GENERAL] Autovacuum Improvements

From: Kenneth Marshall <ktm(at)it(dot)is(dot)rice(dot)edu>
To: "Jim C(dot) Nasby" <jim(at)nasby(dot)net>
Cc: Ron Mayer <rm_pg(at)cheapcomplexdevices(dot)com>, Gregory Stark <stark(at)enterprisedb(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: [GENERAL] Autovacuum Improvements
Date: 2007-01-23 00:53:31
Message-ID: 20070123005331.GL29026@it.is.rice.edu
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers

On Mon, Jan 22, 2007 at 05:11:03PM -0600, Jim C. Nasby wrote:
> On Mon, Jan 22, 2007 at 12:17:39PM -0800, Ron Mayer wrote:
> > Gregory Stark wrote:
> > >
> > > Actually no. A while back I did experiments to see how fast reading a file
> > > sequentially was compared to reading the same file sequentially but skipping
> > > x% of the blocks randomly. The results were surprising (to me) and depressing.
> > > The breakeven point was about 7%. [...]
> > >
> > > The theory online was that as long as you're reading one page from each disk
> > > track you're going to pay the same seek overhead as reading the entire track.
> >
> > Could one take advantage of this observation in designing the DSM?
> >
> > Instead of a separate bit representing every page, having each bit
> > represent 20 or so pages might be a more useful unit. It sounds
> > like the time spent reading would be similar; while the bitmap
> > would be significantly smaller.
>
> If we extended relations by more than one page at a time we'd probably
> have a better shot at the blocks on disk being contiguous and all read
> at the same time by the OS.
> --
> Jim Nasby jim(at)nasby(dot)net
> EnterpriseDB http://enterprisedb.com 512.569.9461 (cell)
>
Yes, most OS have some read-ahead when reading a file from disk. Any
increment over 1 would be an improvement. If you used a counter with
a time-based decrement function, you could increase the amount that
the relation is extended based on temporal proximity. If you have
extended it several times recently, increase the size of the new
extension to reduce the overhead even further. The default should
be approximately the OS standard read-ahead amount.

Ken

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Ron Johnson 2007-01-23 01:02:13 Re: Installing Postegres side-by-side with M$ SQL
Previous Message Adam Gordon 2007-01-23 00:32:23 New US DST Rules & PostgreSQL

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2007-01-23 01:46:44 Re: [HACKERS] Win32 WEXITSTATUS too
Previous Message ITAGAKI Takahiro 2007-01-23 00:36:21 Re: Strange file in snapshot tarball