Skip site navigation (1) Skip section navigation (2)

Re: renice on an I/O bound box

From: Arjen van der Meijden <acmmailing(at)tweakers(dot)net>
To: pgsql-performance(at)postgresql(dot)org
Subject: Re: renice on an I/O bound box
Date: 2010-01-19 20:16:09
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-performance
On 19-1-2010 13:59 Willy-Bas Loos wrote:
> Hi,
> I have a query that runs for about 16 hours, it should run at least weekly.
> There are also clients connecting via a website, we don't want to keep
> them waiting because of long DSS queries.
> We use Debian Lenny.
> I've noticed that renicing the process really lowers the load (in
> "top"), though i think we are I/O bound. Does that make any sense?

Renicing a postgresql-process can be a very bad thing for the 
throughput. As it may also possess some locks, which are required by the 
processes that you think should have a higher priority. Those higher 
priority processes will be locked by the lower priority one.

Then again, renicing postgresql as a whole can be useful. And if your 
absolutely certain you want to renice a process, renicing a process 
shouldn't break anything. But it may have some unexpected side effects.

Another command to look at, if you're I/O-bound, is the 'ionice' 
command, which is similar to nice, but obviously intended for I/O.
For some I/O-bound background job, one of the 'idle' classes can be a 
nice level. But for a (single) postgres-process, I'd be careful again 
for the same reasons as with process-nice.

To see which commands do some I/O, looking at 'iotop' may be useful, 
apart from just examining the output of 'iostat' and similar commands.

Best regards,


In response to


pgsql-performance by date

Next:From: PG User 2010Date: 2010-01-19 20:19:10
Subject: performance question on VACUUM FULL (Postgres 8.4.2)
Previous:From: Willy-Bas LoosDate: 2010-01-19 17:07:10
Subject: Re: renice on an I/O bound box

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group