From: Edoardo Ceccarelli <eddy@axa.it>
To: pgsql-performance@postgresql.org
Subject: Re: autovacuum on a -mostly- r/o table
Date: Thu, 28 Sep 2006 10:44:05 +0200
Message-ID: <451B8B55.4010207@axa.it> (raw)
In-Reply-To: <20060927162756.0a9df264.wmoran@collaborativefusion.com>
References: <451AA1FE.9050704@axa.it>
<1159374712.46586.47.camel@home>
<20060927162756.0a9df264.wmoran@collaborativefusion.com>
>> 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-performance@postgresql.org
Cc: eddy@axa.it
Subject: Re: autovacuum on a -mostly- r/o table
In-Reply-To: <451B8B55.4010207@axa.it>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox