From: | Doug McNaught <doug(at)wireboard(dot)com> |
---|---|
To: | "Peter Darley" <pdarley(at)kinesis-cem(dot)com> |
Cc: | "Pgsql-General" <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: Process balancing on smp db server/apache web server |
Date: | 2002-05-23 15:18:53 |
Message-ID: | m37klu7uzm.fsf@varsoon.wireboard.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
"Peter Darley" <pdarley(at)kinesis-cem(dot)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
From | Date | Subject | |
---|---|---|---|
Next Message | Wm. G. Urquhart | 2002-05-23 15:19:25 | Re: Violation of NOT NULL |
Previous Message | Ed Loehr | 2002-05-23 15:18:07 | "smart-fast" shutdown? |