Re: Is there a way to limit CPU usage per user

From: Richard Huxton <dev(at)archonet(dot)com>
To: Luki Rustianto <lukirus(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Is there a way to limit CPU usage per user
Date: 2006-02-08 09:26:23
Message-ID: 43E9B93F.7080502@archonet.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Luki Rustianto wrote:
> Hi All,
>
> Is there a way to limit user's CPU resource specially on "SELECT" query ?
>
> I hava a table with a lot of rows inside, if one sloopy DB users do a
> "SELECT * FROM bigtable"
> then CPU resource will go near 99% and this action will surely affect
> the other database performance ...

Not really - this is something for the operating-system, but most don't
provide sophisticated ways of managing processes running under one user
(postgres in this case).

If there are 5 queries going on, each should end up getting about 20% of
the resources anyway, if your OS is balancing things properly.

If a query needs a lot of CPU and you restrict it, then that query will
presumably run for longer and so affect more queries from other users.

--
Richard Huxton
Archonet Ltd

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Martijn van Oosterhout 2006-02-08 09:28:17 Re: futex lockup?
Previous Message Joachim Wieland 2006-02-08 08:35:59 Re: Sequences/defaults and pg_dump