Re: PostgreSQL on Linux and Solaris comparison

Поиск
Список
Период
Сортировка
От scott.marlowe
Тема Re: PostgreSQL on Linux and Solaris comparison
Дата
Msg-id Pine.LNX.4.33.0211071336250.4170-100000@css120.ihs.com
обсуждение исходный текст
Ответ на Re: PostgreSQL on Linux and Solaris comparison  (Bruce Momjian <pgman@candle.pha.pa.us>)
Ответы Re: PostgreSQL on Linux and Solaris comparison  (Neil Conway <neilc@samurai.com>)
Список pgsql-general
On Thu, 7 Nov 2002, Bruce Momjian wrote:

> scott.marlowe wrote:
> > On 31 Oct 2002, Chris wrote:
> >
> > > Hi,
> > >
> > > I am using PostgresSQL 7.1.3 on both Linux and Solaris envrionment.
> > > Development is using the Linux and production is using Solaris. I
> > > experienced that the perfomrance on Solaris is much worse than Linux.
> > > For example, the same query executed 9 seconds on Solaris and only 1
> > > seconds on Linux.
> > >
> > > Is there any help upgrading the 7.1.3 to 7.2.3? Or how can I do some
> > > performance tunning on Solaris?
> >
> > There are several issues at play here, some of which you can fix, some of
> > which you can't.
> >
> > One is that older flavors of Solaris had a broken sort() command built
> > into them that was VERY slow when sorting a list with lots of non-unique
> > keys.
>
> Right, in fact, I have seen no evidence that newer Solaris versions have
> this fixed, so the problem may still exist, though there is a workaround
> in 7.3beta.

I thought I had seen somewhere that Sun had a patch out to fix that.  I'll
have to check again.

> > Another is that fact that Solaris has a "heavy process, light thread"
> > scheduler design.  This means that Solaris favors a few processes with
> > many threads for good performance, while Postgresql is programmed on the
> > many processes, what the heck is a thread design.
>
> I didn't mention that because he was saying 1 vs. 9 seconds, so I
> assumed process startup time was not an issue.

Agreed, but the performance issue on Solaris versus Linux for postgresql
seems to be more than just process startup time.  It's like almost
everything is about 50% to 100% faster in Linux than on sparc than in
Solaris on Sparc as regards postgresql (I tested 7.2.x last time, haven't
played with 7.3 on linux / sparc).

Note that this same performance issue seems to rear its head with things
like apache 1.3.x, and samba.  We've built samba servers here on Sun 4200s
that couldn't keep up with old Pentium Pro - 200 boxes running Linux, and
nothing we could tweak would get the Solaris box up to speed in
comparison to Linux.

It might be something to do with better shared memory performance or disk
access is faster, or a conglomeration of things.

I think part of it is that Solaris is so heavily optimized to scale to
umpteen processors that the number of spinlocks (rumored to be around
4,000 at last count) in the kernel just make solaris not all that fast on
one or two processors.

My guess is that just going to 7.2.3 would make a big difference, it could
be something as simple as the older query planner in 7.1 making really bad
decisions on the solaris box as well.  While the 7.2 planner isn't
perfect, it seems miles ahead of the one in 7.1.x.

7.3 is still too early in beta for deployment to production, but it's a
good time now to start testing it.


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: UNION and ORDER BY
Следующее
От: Jean-Luc Lachance
Дата:
Сообщение: request new feature: auto recompile of function when oid not found