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

Поиск
Список
Период
Сортировка
От Richard Huxton
Тема Re: Is there a way to limit CPU usage per user
Дата
Msg-id 43E9B93F.7080502@archonet.com
обсуждение исходный текст
Ответ на Is there a way to limit CPU usage per user  (Luki Rustianto <lukirus@gmail.com>)
Список 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

В списке pgsql-general по дате отправления:

Предыдущее
От: Joachim Wieland
Дата:
Сообщение: Re: Sequences/defaults and pg_dump
Следующее
От: Martijn van Oosterhout
Дата:
Сообщение: Re: futex lockup?