Re: autovacuum on a -mostly- r/o table

From: Edoardo Ceccarelli <eddy(at)axa(dot)it>
To: pgsql-performance(at)postgresql(dot)org
Subject: Re: autovacuum on a -mostly- r/o table
Date: 2006-09-28 08:44:05
Message-ID: 451B8B55.4010207@axa.it
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin pgsql-performance


>> True,
>> but autovacuum could check load -before- and -during- it's execution and
>> it could adjust himself automatically to perform more or less
>> aggressively depending on the difference between those two values.
>> Maybe with a parameter like: maximum-autovacuum-load=0.2
>> that would mean: "never load the machine more than 20% for the autovacuum"
>>
>
> This is pretty non-trivial. How do you define 20% load? 20% of the
> CPU? Does that mean that it's OK for autovac to use 3% cpu and 100% of
> your IO? Ok, so we need to calculate an average of IO and CPU -- which
> disks? If your WAL logs are on one disk, and you've used tablespaces
> to spread the rest of your DB across different partitions, it can
> be pretty difficult to determine which IO parameters you want to take
> into consideration.
>
>
As I said before, it could be done, the main requirement is to find a
way for pg to check for a value of the system load; of course it has to
be an average value between disk and cpu, of course the daemon would
have to collect sample of this values continuously, and of course
everything would be better if the server it's only running Postgres
Still I think you are right, it wouldn't suit exactly every situations
but it could be an "emergency" feature:
What happened to me was very clear:
server running pg8 under heavy load, cpu's were 90% idle as usual.
At some point the vacuum started, the server reached 50 of overall load
and cpu's were 1% idle
I think any test can detect such a situation, regardles if load it's
more I/O based or CPU based

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Chan Michael 2006-09-28 14:16:19 How can I restore from WAL log? [PG 7.3]
Previous Message Bill Moran 2006-09-27 20:27:56 Re: autovacuum on a -mostly- r/o table

Browse pgsql-performance by date

  From Date Subject
Next Message Csaba Nagy 2006-09-28 08:45:35 Re: slow queue-like empty table
Previous Message Tobias Brox 2006-09-28 07:36:36 Re: slow queue-like empty table