Re: Limit I/O bandwidth of a certain backend

Lists: pgsql-performance
From: Vlad Arkhipov <arhipov(at)dc(dot)baikal(dot)ru>
To: pgsql-performance(at)postgresql(dot)org
Subject: Limit I/O bandwidth of a certain backend
Date: 2009-05-05 07:31:24
Message-ID: 49FFEB4C.2000205@dc.baikal.ru
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-performance

Is there a way to limit I/O bandwidth/CPU usage of a certain backend? It
seems that ionice/renice makes no sense because of bgwriter/WAL writer
processes are not a part of a backend. I have a periodic query (every
hour) that make huge I/O load and should run in background. When this
query runs all other fast queries slow down dramatically.


From: Bryan Murphy <bmurphy1976(at)gmail(dot)com>
To: Vlad Arkhipov <arhipov(at)dc(dot)baikal(dot)ru>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: Limit I/O bandwidth of a certain backend
Date: 2009-05-06 00:54:00
Message-ID: 7fd310d10905051754k61e602e1i354285e31391c03c@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-performance

On Tue, May 5, 2009 at 2:31 AM, Vlad Arkhipov <arhipov(at)dc(dot)baikal(dot)ru> wrote:
> Is there a way to limit I/O bandwidth/CPU usage of a certain backend? It
> seems that ionice/renice makes no sense because of bgwriter/WAL writer
> processes are not a part of a backend. I have a periodic query (every
> hour) that make huge I/O load and should run in background. When this
> query runs all other fast queries slow down dramatically.

Could you use something like slony to replicate the needed data to a
secondary database and run the query there?

Bryan


From: Greg Smith <gsmith(at)gregsmith(dot)com>
To: Vlad Arkhipov <arhipov(at)dc(dot)baikal(dot)ru>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: Limit I/O bandwidth of a certain backend
Date: 2009-05-06 05:10:53
Message-ID: alpine.GSO.2.01.0905060101120.7946@westnet.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-performance

On Tue, 5 May 2009, Vlad Arkhipov wrote:

> Is there a way to limit I/O bandwidth/CPU usage of a certain backend? It
> seems that ionice/renice makes no sense because of bgwriter/WAL writer
> processes are not a part of a backend.

The background writer and WAL writer are pretty low users of CPU and I/O
relative to how much an expensive query uses in most cases. You should
try out one of the nice approaches and see if it works for you rather than
presuming the background processes will thwart you here. There isn't
anything better available in the database yet, so it's the closest things
to a good solution available right now anyway.

--
* Greg Smith gsmith(at)gregsmith(dot)com http://www.gregsmith.com Baltimore, MD