Обсуждение: Load balancing lots of simultaneous clients or queries?

Поиск
Список
Период
Сортировка

Load balancing lots of simultaneous clients or queries?

От
Dirk Lutzebaeck
Дата:
Hi,

suppose a lot of clients are using the database server with different
complex queries simultaneously. I understand that all clients are
equal so clients with large tasks would hamper clients with small
tasks.

It would be nice if a client could say: hey I know I have a large task
/ query please set me to a low priority. So the server would withdraw some
cpu and io cycles from this task.

On a per process basis one would do this with 'nice' but how could
that be applied to the postmaster/postgres mechanism?

Or in a more complex mod_perl scenario where httpd processes don't
open/close connections for new requests (by Apache::DBI).

Something like SET PRIORITY...

Any comments?

Dirk



Re: Load balancing lots of simultaneous clients or queries?

От
"Richard Huxton"
Дата:
From: "Dirk Lutzebaeck" <lutzeb@aeccom.com>

> It would be nice if a client could say: hey I know I have a large task
> / query please set me to a low priority. So the server would withdraw some
> cpu and io cycles from this task.
>
> On a per process basis one would do this with 'nice' but how could
> that be applied to the postmaster/postgres mechanism?

> Something like SET PRIORITY...
>
> Any comments?

Problem I can see is when you have interdependent transactions. If task A
takes longer to commit it could hold up everyone waiting on it.

On the other hand - I can see where you're coming from for large selects
(weekly summary reports - that sort of thing).

- Richard Huxton