Re: Process balancing on smp db server/apache web server

Поиск
Список
Период
Сортировка
От Doug McNaught
Тема Re: Process balancing on smp db server/apache web server
Дата
Msg-id m37klu7uzm.fsf@varsoon.wireboard.com
обсуждение исходный текст
Ответ на Process balancing on smp db server/apache web server  ("Peter Darley" <pdarley@kinesis-cem.com>)
Список pgsql-general
"Peter Darley" <pdarley@kinesis-cem.com> writes:

> Friends,
>     I have been thinking about my smp db server and how it interacts with my
> web server.  I'm using mod_perl on Apache, which uses Apache::DBI to connect
> to the db server via a private network segment.  It occurs to me that since
> the web server is connecting early (on startup), when there is probably no
> load on the db server, the cpu that each backend is assigned to will be
> largely random, or, if there is a large syslogd operation or something right
> at that time, it might even put the majority of backends on the same
> processor.

Ummm....  All Unices that I know of do dynamic migration of tasks
between processors as needed.  When a process (or thread) is ready to
run, the OS will try to pick a free CPU for it.  So this shouldn't be
an issue.  You have to do something special to lock processes to one
processor--commercial systems like Solaris and Irix have APIs to do
this, and there are patches for Linux I believe.  But if you just want
to use the CPUs most efficiently, the default schedulaer behavior is
usually what you want.

Ultimately, most databases loads are I/O bound anyway, so it'd be more
worth your while to worry about your disk subsystem.  ;)

-Doug

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

Предыдущее
От: Ed Loehr
Дата:
Сообщение: "smart-fast" shutdown?
Следующее
От: Tom Lane
Дата:
Сообщение: Re: problems with pg_dump... with postmaster really