Re: Sorting Improvements for 8.4

From: Martijn van Oosterhout <kleptog(at)svana(dot)org>
To: Ron Mayer <rm_pg(at)cheapcomplexdevices(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Sorting Improvements for 8.4
Date: 2007-12-20 10:31:20
Message-ID: 20071220103120.GB16113@svana.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Dec 19, 2007 at 07:17:21PM -0800, Ron Mayer wrote:
> > but it doesn't follow that you will get
> > 10X improvement with 10 threads, or even 4X with 4.
>
> Yeah - unless those 10 cores have additional I/O to the
> memories compared to a 1 core system (which I'd hope
> would be the case or else I'd expect many apps would be
> run into memory bottlenecks on such systems, no?).

I don't suppose you saw the document from Ulrich Drepper "What Every
Programmer Should Know About Memory". It's a fact that most machines
with multiple cores have less L2 cache/core than a single core
machines. And having multiple conduits to main memory isn't that common
at all. So having more threads sometimes *decreases* performance
because you cut the L2 cache and memory bandwidth in half.

The document is very useful for getting tips about how to work out
optimal thread/memory/datasize ratios.

The way around this is a NUMA architecture, but that's a whole
other ball of wax.

Have a nice day,
--
Martijn van Oosterhout <kleptog(at)svana(dot)org> http://svana.org/kleptog/
> Those who make peaceful revolution impossible will make violent revolution inevitable.
> -- John F Kennedy

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Trevor Talbot 2007-12-20 12:39:55 Re: pgwin32_open returning EINVAL
Previous Message Martijn van Oosterhout 2007-12-20 10:19:29 Re: pgwin32_open returning EINVAL