From: | "Scott Marlowe" <smarlowe(at)qwest(dot)net> |
---|---|
To: | wang_zc(at)yahoo(dot)co(dot)uk |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: postgresql and smp linux kernel |
Date: | 2004-08-09 12:53:23 |
Message-ID: | 1092056003.27166.309.camel@localhost.localdomain |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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.
From | Date | Subject | |
---|---|---|---|
Next Message | Jeff Davis | 2004-08-09 12:57:17 | Re: Embedded Database |
Previous Message | Bill Moran | 2004-08-09 12:38:56 | Re: postgresql and smp linux kernel |