Re: Re : Solaris Performance - Profiling (Solved)

From: Justin Clift <justin(at)postgresql(dot)org>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Mark kirkwood <markir(at)slingshot(dot)co(dot)nz>, pgsql-general(at)postgresql(dot)org, PostgreSQL Hackers Mailing List <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Re : Solaris Performance - Profiling (Solved)
Date: 2002-04-03 07:59:14
Message-ID: 3CAAB652.87290A84@postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers

Hi Tom,

How about we include this and have configure somehow ensure the Solaris
users get it automatically?

There are a *bunch* of Solaris users out there.

:-)

Regards and best wishes,

Justin Clift

Mark kirkwood wrote:
>
> On Wed, 2002-04-03 at 04:02, Tom Lane wrote:
> >
> > Hmm. Where exactly did you get those numbers from? I see 4118.54 sec
> > as the total CPU accounted for in the profile.
> >
> odd ...the call graph has 4047.53 and the flat graph has 4118.54
> >
> > Hmm. Assuming that the profile data is trustworthy and the queries are
> > indeed the same (did you compare EXPLAIN output?), it seems that
> > Solaris' problem is a spectacularly bad qsort() implementation.
> >
> A bit surfing finds heaps of unhappy Solaris qsort users... apparently
> it cannot sort lists with many repeated items... so our GROUP BY will be
> causing it grief here
> >
> > It might be entertaining to snarf a qsort off the net (from glibc,
> > perhaps) and link it into Postgres to see if you get better results.
> >
> > regards, tom lane
> >
> Indeed it is - obtained qsort.c from Freebsd CVS and rebuilt Postgresql :
> The query now takes 6 seconds instead of 1 hour ! Thanks for an
> excellent suggestion.
>
> For those in need to a quick fix :
>
> I did a cheap and dirty mod to src/backend/utils/sort/Makefile
>
> changed OBJS = logtape.o -> OBJS = qsort.o logtape.o
>
> and copied qsort.c into this directory
>
> (had to comment out a couple of lines to compile under Solaris :
>
> /*#include <sys/cdefs.h>
> __FBSDID("$FreeBSD: src/lib/libc/stdlib/qsort.c,v 1.11 2002/03/22
> 21:53:10 obrien Exp $");
> */
>
> )
>
> What do you think about providing something like this for the Solaris
> port ? (since its clearly quicker...)
>
> regards
>
> Mark
>
>
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 6: Have you searched our list archives?
>
> http://archives.postgresql.org

--
"My grandfather once told me that there are two kinds of people: those
who work and those who take the credit. He told me to try to be in the
first group; there was less competition there."
- Indira Gandhi

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Jon Lapham 2002-04-03 13:16:04 NaN with STDDEV() with mixed ::float4 ::float8 values
Previous Message Mark kirkwood 2002-04-03 07:00:06 Re: Re : Solaris Performance - Profiling (Solved)

Browse pgsql-hackers by date

  From Date Subject
Next Message Hannu Krosing 2002-04-03 07:59:16 Re: ANALYZE after restore
Previous Message Dave Page 2002-04-03 07:24:09 Re: SHOW ALL as a query result