Re: Linux: more cores = less concurrency.

From: Arjen van der Meijden <acmmailing(at)tweakers(dot)net>
To: pgsql-performance(at)postgresql(dot)org
Subject: Re: Linux: more cores = less concurrency.
Date: 2011-04-12 07:31:20
Message-ID: 4DA3FFC8.206@tweakers.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance


On 11-4-2011 22:04 david(at)lang(dot)hm wrote:
> in your case, try your new servers without hyperthreading. you will end
> up with a 4x4 core system, which should handily outperform the 2x4 core
> system you are replacing.
>
> the limit isn't 8 cores, it's that the hyperthreaded cores don't work
> well with the postgres access patterns.

It would be really weird if disabling HT would turn these 8-core cpu's
in 4-core cpu's ;) They have 8 physical cores and 16 threads each. So he
basically has a 32-core machine with 64 threads in total (if HT were
enabled). Still, HT may or may not improve things, back when we had time
to benchmark new systems we had one of the first HT-Xeon's (a dual 5080,
with two cores + HT each) available:
http://ic.tweakimg.net/ext/i/1155958729.png

The blue lines are all slightly above the orange/red lines. So back then
HT slightly improved our read-mostly Postgresql benchmark score.

We also did benchmarks with Sun's UltraSparc T2 back then:
http://ic.tweakimg.net/ext/i/1214930814.png

Adding full cores (including threads) made things much better, but we
also tested full cores with more threads each:
http://ic.tweakimg.net/ext/i/1214930816.png

As you can see, with that benchmark, it was better to have 4 cores with
8 threads each, than 8 cores with 2 threads each.

The T2-threads where much heavier duty than the HT-threads back then,
but afaik Intel has improved its technology with this re-introduction of
them quite a bit.

So I wouldn't dismiss hyper threading for a read-mostly Postgresql
workload too easily.

Then again, keeping 32 cores busy, without them contending for every
resource will already be quite hard. So adding 32 additional "threads"
may indeed make matters much worse.

Best regards,

Arjen

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Claudio Freire 2011-04-12 07:33:50 Re: Slow query postgres 8.3
Previous Message Scott Marlowe 2011-04-12 05:55:03 Re: Linux: more cores = less concurrency.