Re: [PERFORM] A Better External Sort?

From: Martijn van Oosterhout <kleptog(at)svana(dot)org>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Re: [PERFORM] A Better External Sort?
Date: 2005-10-05 10:49:17
Message-ID: 20051005104916.GC12206@svana.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-performance

On Wed, Oct 05, 2005 at 05:41:25AM -0400, Michael Stone wrote:
> On Sat, Oct 01, 2005 at 06:19:41PM +0200, Martijn van Oosterhout wrote:
> >COPY TO /dev/null WITH binary
> >13MB/s 55% user 45% system (ergo, CPU bound)
> [snip]
> >the most expensive. But it does point out that the whole process is
> >probably CPU bound more than anything else.
>
> Note that 45% of that cpu usage is system--which is where IO overhead
> would end up being counted. Until you profile where you system time is
> going it's premature to say it isn't an IO problem.

It's a dual CPU system, so 50% is the limit for a single process. Since
system usage < user, PostgreSQL is the limiter. Sure, the system is
taking a lot of time, but PostgreSQL is still the limiting factor.

Anyway, the later measurements using gprof exclude system time
altogether and it still shows CPU being the limiting factor. Fact is,
extracting tuples from pages is expensive.
--
Martijn van Oosterhout <kleptog(at)svana(dot)org> http://svana.org/kleptog/
> Patent. n. Genius is 5% inspiration and 95% perspiration. A patent is a
> tool for doing 5% of the work and then sitting around waiting for someone
> else to do the other 95% so you can sue them.

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2005-10-05 12:16:44 Re: [HACKERS] Found small issue with OUT params
Previous Message Hannu Krosing 2005-10-05 10:32:52 Re: [PERFORM] A Better External Sort?

Browse pgsql-performance by date

  From Date Subject
Next Message Douglas J. Trainor 2005-10-05 11:00:32 Re: Is There Any Way ....
Previous Message Hannu Krosing 2005-10-05 10:32:52 Re: [PERFORM] A Better External Sort?