From: Dan Harris <fbsd@drivefaster.net>
To: pgsql-performance@postgresql.org
Subject: Re: Background vacuum
Date: Wed, 09 May 2007 23:05:21 -0600
Message-ID: <4642A811.9010703@drivefaster.net> (raw)
In-Reply-To: <4642A1B3.6030009@swissembedded.com>
References: <4642A1B3.6030009@swissembedded.com>
Daniel Haensse wrote:
> Dear list,
>
> I'm running postgres on a tomcat server. The vacuum is run every hour
> (cronjob) which leads to a performance drop of the tomcat applications.
> I played around with renice command and I think it is possible to reduce
> this effect which a renice. The problem is how can I figure out the PID
> of the postmaster performing the vacuum(automated)? Has anybody a nice
> solution to change process priority? A shell script, maybe even for java?
>
While this may technically work, I think it lacks a key point. 'nice' ( at
least the versions I'm familiar with ) do not adjust I/O priority. VACUUM is
bogging things down because of the extra strain on I/O. CPU usage shouldn't
really be much of a factor.
Instead, I would recommend looking at vacuum_cost_delay and the related settings
to make vacuum lower priority than the queries you care about. This should be a
cleaner solution for you.
-Dan
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: fbsd@drivefaster.net
Subject: Re: Background vacuum
In-Reply-To: <4642A811.9010703@drivefaster.net>
* 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