Re: Parallel queries for a web-application |performance testing

От: Pierre C
Тема: Re: Parallel queries for a web-application |performance testing
Дата: ,
Msg-id: op.vefyqwfweorkce@apollo13
(см: обсуждение, исходный текст)
Ответ на: Re: Parallel queries for a web-application |performance testing  (Matthew Wakeling)
Ответы: Re: Parallel queries for a web-application |performance testing  (Dimitri Fontaine)
Список: pgsql-performance

Скрыть дерево обсуждения

Parallel queries for a web-application |performance testing  (Balkrishna Sharma, )
 Re: Parallel queries for a web-application |performance testing  ("Kevin Grittner", )
 Re: Parallel queries for a web-application |performance testing  (Dimitri Fontaine, )
 Re: Parallel queries for a web-application |performance testing  (Matthew Wakeling, )
  Re: Parallel queries for a web-application |performance testing  ("Pierre C", )
   Re: Parallel queries for a web-application |performance testing  (Dimitri Fontaine, )

> When you set up a server that has high throughput requirements, the last
> thing you want to do is use it in a manner that cripples its throughput.
> Don't try and have 1000 parallel Postgres backends - it will process
> those queries slower than the optimal setup. You should aim to have
> approximately ((2 * cpu core count) + effective spindle count) number of
> backends, as that is the point at which throughput is the greatest. You
> can use pgbouncer to achieve this.

The same is true of a web server : 1000 active php interpreters (each
eating several megabytes or more) are not ideal for performance !

For php, I like lighttpd with php-fastcgi : the webserver proxies requests
to a small pool of php processes, which are only busy while generating the
page. Once the page is generated the webserver handles all (slow) IO to
the client.

An interesting side effect is that the number of database connections is
limited to the number of PHP processes in the pool, so you don't even need
a postgres connection pooler (unless you have lots of php boxes)...


В списке pgsql-performance по дате сообщения:

От: "Kaufhold, Christian (LFD)"
Дата:
Сообщение: Re: Query slow after analyse on postgresql 8.2
От: Josh Berkus
Дата:
Сообщение: Re: PostgreSQL as a local in-memory cache