Re: postgresql and smp linux kernel

Поиск
Список
Период
Сортировка
От Scott Marlowe
Тема Re: postgresql and smp linux kernel
Дата
Msg-id 1092056003.27166.309.camel@localhost.localdomain
обсуждение исходный текст
Ответ на postgresql and smp linux kernel  (zhicheng wang <wang_zc@yahoo.co.uk>)
Список pgsql-general
On Mon, 2004-08-09 at 04:10, zhicheng wang wrote:
> Dear all
>
> i have a dedicated server mainly running postgresql,
> currently rh-posgtresql-7.3.6.7 (and samba, ypbind
> etc). The server is a dual processor machine and the
> OS is RHEL AS 3.
>
> I am currently running kernel-smp-2.4.21-15.0.4.EL.
>
> My question is: do i need to run smp kernel for
> postgresql? What is benefit of it? If I run UP kernel,
> what do I lose from the point view of PG?

Let's be clear here, PostgreSQL isn't responsible for exploiting your
second CPU, the OS is.  The face that PostgreSQL spawns a new backend
process for each connection means that it can use about as many
processors as it has connections, plus maybe one for the OS.

However, the OS will not schedule anything to run at all on the second
CPU if you run a UP kernel.

Generally, the linux and bsd kernels both tend to get a scaling factor
of near unity for the second CPU with enough things to do in parallel.
There's almost no loss for single processes hogging one CPU, and even
these tasks are often sped up by the OS having a CPU to run on while
your one big process is hogging the other one.

Considering you're running samba, which is also process based, it would
be wise to enable the second CPU in the kernel, otherwise pull it, put
in the terminator, and save it in case of future CPU failure.  It won't
be doing you any good.


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

Предыдущее
От: Bill Moran
Дата:
Сообщение: Re: postgresql and smp linux kernel
Следующее
От: Jeff Davis
Дата:
Сообщение: Re: Embedded Database