Re: Some thoughts about i/o priorities and throttling vacuum - Mailing list pgsql-hackers

From Greg Stark
Subject Re: Some thoughts about i/o priorities and throttling vacuum
Date
Msg-id 87k7759bw5.fsf@stark.dyndns.tv
Whole thread Raw
In response to Re: Some thoughts about i/o priorities and throttling vacuum  (Bruce Momjian <pgman@candle.pha.pa.us>)
Responses Re: Some thoughts about i/o priorities and throttling vacuum
List pgsql-hackers
Bruce Momjian <pgman@candle.pha.pa.us> writes:

> Of course, this makes VACUUM run longer, and if you are waiting for it
> to finish, it would be worse, like if you are running it at night or
> something.

My plan was that the time delay would be a parameter and pg_autovacuum would
set it based on the observed rate at which free space is accumulating.

Someone could manually specify a delay, but by default it would run with no
delay when run on the command line.

> I think the delay has to take into account the number of active
> transactions or something.

That's a possibility. That's actually what the linux-kernel folk suggested.
Someone there suggested using aio to do carefully schedule i/o only when no
i/o was pending from transactions.

But vacuum has no way to judge whether those transactions are really doing
much disk i/o or only reading cached blocks, or even whether the disk i/o
they're doing is on the same disk. They could also be waiting on the client or
on locks from other transactions.

-- 
greg



pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: Still a few flaws in configure's default CFLAGS selection
Next
From: Josh Berkus
Date:
Subject: Bison 1.875 for SuSE Linux 8.1?