Re: [PERFORM] Turn off Hyperthreading! WAS: 60 core performance with 9.3

2014-08-26 Thread Mark Kirkwood

On 26/08/14 10:13, Josh Berkus wrote:

On 08/22/2014 07:02 AM, Andres Freund wrote:

On 2014-08-21 14:02:26 -0700, Josh Berkus wrote:

On 08/20/2014 07:40 PM, Bruce Momjian wrote:

Not sure how you can make such a blanket statement when so many people
have tested and shown the benefits of hyper-threading.


Actually, I don't know that anyone has posted the benefits of HT.
Link?


There's definitely cases where it can help. But it's highly workload
*and* hardware dependent.


The only cases I've seen where HT can be beneficial is when you have
large numbers of idle connections.  Then the idle connections can be
parked on the HT virtual cores.  However, even in this case I haven't
seen a head-to-head performance comparison.



I've just had a pair of Crucial m550's arrive, so a bit of benchmarking 
is in order. The results (below) seem to suggest that HT enabled is 
certainly not inhibiting scaling performance for single socket i7's. I 
performed several runs (typical results shown below).


Intel i7-4770 3.4 Ghz, 16G
2x Crucial m550
Ubuntu 14.04
Postgres 9.4 beta2

logging_collector = on
max_connections = 600
shared_buffers = 1GB
wal_buffers = 32MB
checkpoint_segments = 128
effective_cache_size = 10GB

pgbench scale = 300
test duration (each) = 600s

db on 1x m550
xlog on 1x m550

clients |  tps (HT)|  tps (no HT)
+--+-
4   |  517 |  520
8   | 1013 |  999
16  | 1938 | 1913
32  | 3574 | 3560
64  | 5873 | 5412
128 | 8351 | 7450
256 | 9426 | 7840
512 | 9357 | 7288


Regards

Mark


--
Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-performance


Re: [PERFORM] Turn off Hyperthreading! WAS: 60 core performance with 9.3

2014-08-25 Thread Josh Berkus
On 08/22/2014 07:02 AM, Andres Freund wrote:
 On 2014-08-21 14:02:26 -0700, Josh Berkus wrote:
 On 08/20/2014 07:40 PM, Bruce Momjian wrote:
 Not sure how you can make such a blanket statement when so many people
 have tested and shown the benefits of hyper-threading.  

 Actually, I don't know that anyone has posted the benefits of HT.
 Link?
 
 There's definitely cases where it can help. But it's highly workload
 *and* hardware dependent.

The only cases I've seen where HT can be beneficial is when you have
large numbers of idle connections.  Then the idle connections can be
parked on the HT virtual cores.  However, even in this case I haven't
seen a head-to-head performance comparison.

-- 
Josh Berkus
PostgreSQL Experts Inc.
http://pgexperts.com


-- 
Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-performance


Re: [PERFORM] Turn off Hyperthreading! WAS: 60 core performance with 9.3

2014-08-25 Thread Mark Kirkwood

On 26/08/14 10:13, Josh Berkus wrote:

On 08/22/2014 07:02 AM, Andres Freund wrote:

On 2014-08-21 14:02:26 -0700, Josh Berkus wrote:

On 08/20/2014 07:40 PM, Bruce Momjian wrote:

Not sure how you can make such a blanket statement when so many people
have tested and shown the benefits of hyper-threading.


Actually, I don't know that anyone has posted the benefits of HT.
Link?


There's definitely cases where it can help. But it's highly workload
*and* hardware dependent.


The only cases I've seen where HT can be beneficial is when you have
large numbers of idle connections.  Then the idle connections can be
parked on the HT virtual cores.  However, even in this case I haven't
seen a head-to-head performance comparison.



I recall HT beneficial on a single socket (i3 or i7), using pgbench as 
the measuring tool. However I didn't save the results at the time. I've 
just got some new ssd's to play with so might run some pgbench tests on 
my home machine (Haswell i7) with HT on and off.


Regards

Mark


--
Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-performance


Re: [PERFORM] Turn off Hyperthreading! WAS: 60 core performance with 9.3

2014-08-22 Thread Scott Marlowe
On Thu, Aug 21, 2014 at 5:29 PM, Josh Berkus j...@agliodbs.com wrote:
 On 08/21/2014 04:08 PM, Steve Crawford wrote:
 On 08/21/2014 03:51 PM, Josh Berkus wrote:
 On 08/21/2014 02:26 PM, Scott Marlowe wrote:
 I'm running almost the exact same setup in production as a spare. It
 has 4 of those CPUs, 256G RAM, and is currently set to use HT. Since
 it's a spare node I might be able to do some testing on it as well.
 It's running a 3.2 kernel right now. I could probably get a later
 model kernel on it even.
 You know about the IO performance issues with 3.2, yes?

 Were those 3.2 only and since fixed or are there issues persisting in
 3.2+? The 12.04 LTS release of Ubuntu Server was 3.2 but the 14.04 is 3.13.

 The issues I know of were fixed in 3.9.

I thought they were fixed in 3.8.something? We're running 3.8 on our
production servers but IO is not an issue for us.


-- 
Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-performance


Re: [PERFORM] Turn off Hyperthreading! WAS: 60 core performance with 9.3

2014-08-22 Thread Shaun Thomas

On 08/22/2014 01:37 AM, Scott Marlowe wrote:


I thought they were fixed in 3.8.something? We're running 3.8 on our
production servers but IO is not an issue for us.


Yeah. 3.8 fixed a ton of issues that were plaguing us. There were still 
a couple patches I wanted that didn't get in until 3.11+, but the worst 
of the behavior was solved before that.


Bugs in kernel cache page aging algorithms are bad, m'kay?

--
Shaun Thomas
OptionsHouse, LLC | 141 W. Jackson Blvd. | Suite 800 | Chicago IL, 60604
312-676-8870
stho...@optionshouse.com

__

See http://www.peak6.com/email_disclaimer/ for terms and conditions related to 
this email


--
Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-performance


Re: [PERFORM] Turn off Hyperthreading! WAS: 60 core performance with 9.3

2014-08-22 Thread Andres Freund
On 2014-08-21 14:02:26 -0700, Josh Berkus wrote:
 On 08/20/2014 07:40 PM, Bruce Momjian wrote:
  Not sure how you can make such a blanket statement when so many people
  have tested and shown the benefits of hyper-threading.  
 
 Actually, I don't know that anyone has posted the benefits of HT.
 Link?

There's definitely cases where it can help. But it's highly workload
*and* hardware dependent.

 OS is RHEL with 2.6.32-431.3.1.el6.x86_64.
 
 I've emailed a kernel hacker who works at Intel for comment; for one
 thing, I'm wondering if the older kernel version is a problem for a
 system like this.

I'm not sure if it has been backported by redhat, but there
definitely have been significant improvement in SMT aware scheduling
after vanilla 2.6.32.

Greetings,

Andres Freund

-- 
 Andres Freund http://www.2ndQuadrant.com/
 PostgreSQL Development, 24x7 Support, Training  Services


-- 
Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-performance


Re: [PERFORM] Turn off Hyperthreading! WAS: 60 core performance with 9.3

2014-08-21 Thread Mark Kirkwood

On 21/08/14 11:14, Mark Kirkwood wrote:


You didn't mention what
cpu this is for (or how many sockets etc), would be useful to know.



Just to clarify - while you mentioned that the production system was 40 
cores, it wasn't immediately obvious that the same system was the source 
of the measurements you posted...sorry if I'm being a mixture of 
pedantic and dense - just trying to make sure it is clear what 
systems/cpus etc we are talking about (with this in mind it never hurts 
to quote cpu and mobo model numbers)!


Cheers

Mark




--
Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-performance


Re: [PERFORM] Turn off Hyperthreading! WAS: 60 core performance with 9.3

2014-08-21 Thread Shaun Thomas

On 08/20/2014 06:14 PM, Mark Kirkwood wrote:


Notwithstanding the above results, my workmate Matt made an interesting
observation: the scaling graph for (our) 60 core box (HT off), looks
just like the one for our 32 core box with HT *on*.


Hmm. I know this sounds stupid and unlikely, but has anyone actually 
tested PostgreSQL on a system with more than 64 legitimate cores? The 
work Robert Haas did to fix the CPU locking way back when showed 
significant improvements up to 64, but so far as I know, nobody really 
tested beyond that.


I seem to remember similar choking effects when pre-9.2 systems 
encountered high CPU counts. I somehow doubt Intel would allow their HT 
architecture to regress so badly from Nehalem, which is almost 
3-generations old at this point. This smells like something in the 
software stack, up to and including the Linux kernel.


--
Shaun Thomas
OptionsHouse, LLC | 141 W. Jackson Blvd. | Suite 800 | Chicago IL, 60604
312-676-8870
stho...@optionshouse.com

__

See http://www.peak6.com/email_disclaimer/ for terms and conditions related to 
this email


--
Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-performance


Re: [PERFORM] Turn off Hyperthreading! WAS: 60 core performance with 9.3

2014-08-21 Thread Josh Berkus
On 08/20/2014 07:40 PM, Bruce Momjian wrote:
 On Wed, Aug 20, 2014 at 12:13:50PM -0700, Josh Berkus wrote:
 On a read-write test, it's 10% faster with HT off as well.

 Further, from their production machine we've seen that having HT on
 causes the machine to slow down by 5X whenever you get more than 40
 cores (as in 100% of real cores or 50% of HT cores) worth of activity.

 So we're definitely back to If you're using PostgreSQL, turn off
 Hyperthreading.
 
 Not sure how you can make such a blanket statement when so many people
 have tested and shown the benefits of hyper-threading.  

Actually, I don't know that anyone has posted the benefits of HT.  Link?
 I want to compare results so that we can figure out what's different
between my case and theirs.  Also, it makes a big difference if there is
an advantage to turning HT on for some workloads.

 I am also
 unclear exactly what you tested, as I didn't see it mentioned in the
 email --- CPU type, CPU count, and operating system would be the minimal
 information required.

Ooops!  I thought I'd posted that earlier, but I didn't.

The processors in question is the Intel(R) Xeon(R) CPU E7- 4850, with 4
of them for a total of 40 cores or 80 HT cores.

OS is RHEL with 2.6.32-431.3.1.el6.x86_64.

I've emailed a kernel hacker who works at Intel for comment; for one
thing, I'm wondering if the older kernel version is a problem for a
system like this.

-- 
Josh Berkus
PostgreSQL Experts Inc.
http://pgexperts.com


-- 
Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-performance


Re: [PERFORM] Turn off Hyperthreading! WAS: 60 core performance with 9.3

2014-08-21 Thread Bruce Momjian
On Thu, Aug 21, 2014 at 02:02:26PM -0700, Josh Berkus wrote:
 On 08/20/2014 07:40 PM, Bruce Momjian wrote:
  On Wed, Aug 20, 2014 at 12:13:50PM -0700, Josh Berkus wrote:
  On a read-write test, it's 10% faster with HT off as well.
 
  Further, from their production machine we've seen that having HT on
  causes the machine to slow down by 5X whenever you get more than 40
  cores (as in 100% of real cores or 50% of HT cores) worth of activity.
 
  So we're definitely back to If you're using PostgreSQL, turn off
  Hyperthreading.
  
  Not sure how you can make such a blanket statement when so many people
  have tested and shown the benefits of hyper-threading.  
 
 Actually, I don't know that anyone has posted the benefits of HT.  Link?
  I want to compare results so that we can figure out what's different
 between my case and theirs.  Also, it makes a big difference if there is
 an advantage to turning HT on for some workloads.

I had Greg Smith test my system when it was installed, tested it, and
recommended hyper-threading.  The system is Debian Squeeze
(2.6.32-5-amd64), CPUs are dual Xeon E5620, 8 cores, 16 virtual cores.

-- 
  Bruce Momjian  br...@momjian.ushttp://momjian.us
  EnterpriseDB http://enterprisedb.com

  + Everyone has their own god. +


-- 
Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-performance


Re: [PERFORM] Turn off Hyperthreading! WAS: 60 core performance with 9.3

2014-08-21 Thread Josh Berkus
On 08/21/2014 02:11 PM, Bruce Momjian wrote:
 On Thu, Aug 21, 2014 at 02:02:26PM -0700, Josh Berkus wrote:
 On 08/20/2014 07:40 PM, Bruce Momjian wrote:
 On Wed, Aug 20, 2014 at 12:13:50PM -0700, Josh Berkus wrote:
 On a read-write test, it's 10% faster with HT off as well.

 Further, from their production machine we've seen that having HT on
 causes the machine to slow down by 5X whenever you get more than 40
 cores (as in 100% of real cores or 50% of HT cores) worth of activity.

 So we're definitely back to If you're using PostgreSQL, turn off
 Hyperthreading.

 Not sure how you can make such a blanket statement when so many people
 have tested and shown the benefits of hyper-threading.  

 Actually, I don't know that anyone has posted the benefits of HT.  Link?
  I want to compare results so that we can figure out what's different
 between my case and theirs.  Also, it makes a big difference if there is
 an advantage to turning HT on for some workloads.
 
 I had Greg Smith test my system when it was installed, tested it, and
 recommended hyper-threading.  The system is Debian Squeeze
 (2.6.32-5-amd64), CPUs are dual Xeon E5620, 8 cores, 16 virtual cores.

Can you post some numerical results?

I'm serious.  It's obviously easier for our users if we can blanket
recommend turning HT off; that's a LOT easier for them than you might
want to turn HT off if these conditions   So I want to establish
that HT is a benefit sometimes if it is.

I personally have never seen HT be a benefit.  I've seen it be harmless
(most of the time) but never beneficial.

-- 
Josh Berkus
PostgreSQL Experts Inc.
http://pgexperts.com


-- 
Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-performance


Re: [PERFORM] Turn off Hyperthreading! WAS: 60 core performance with 9.3

2014-08-21 Thread Bruce Momjian
On Thu, Aug 21, 2014 at 02:17:13PM -0700, Josh Berkus wrote:
  Actually, I don't know that anyone has posted the benefits of HT.  Link?
   I want to compare results so that we can figure out what's different
  between my case and theirs.  Also, it makes a big difference if there is
  an advantage to turning HT on for some workloads.
  
  I had Greg Smith test my system when it was installed, tested it, and
  recommended hyper-threading.  The system is Debian Squeeze
  (2.6.32-5-amd64), CPUs are dual Xeon E5620, 8 cores, 16 virtual cores.
 
 Can you post some numerical results?
 
 I'm serious.  It's obviously easier for our users if we can blanket
 recommend turning HT off; that's a LOT easier for them than you might
 want to turn HT off if these conditions   So I want to establish
 that HT is a benefit sometimes if it is.
 
 I personally have never seen HT be a benefit.  I've seen it be harmless
 (most of the time) but never beneficial.

I know that when hyperthreading was introduced that it was mostly a
negative, but then this was improved, and it might have gotten bad
again.  I am afraid results are based on the type of CPU, so I am not
sure we can know a general answer.

I know I asked Greg Smith, and I assume he would know.

-- 
  Bruce Momjian  br...@momjian.ushttp://momjian.us
  EnterpriseDB http://enterprisedb.com

  + Everyone has their own god. +


-- 
Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-performance


Re: [PERFORM] Turn off Hyperthreading! WAS: 60 core performance with 9.3

2014-08-21 Thread Scott Marlowe
On Thu, Aug 21, 2014 at 3:02 PM, Josh Berkus j...@agliodbs.com wrote:
 On 08/20/2014 07:40 PM, Bruce Momjian wrote:

 I am also
 unclear exactly what you tested, as I didn't see it mentioned in the
 email --- CPU type, CPU count, and operating system would be the minimal
 information required.

 Ooops!  I thought I'd posted that earlier, but I didn't.

 The processors in question is the Intel(R) Xeon(R) CPU E7- 4850, with 4
 of them for a total of 40 cores or 80 HT cores.

 OS is RHEL with 2.6.32-431.3.1.el6.x86_64.

I'm running almost the exact same setup in production as a spare. It
has 4 of those CPUs, 256G RAM, and is currently set to use HT. Since
it's a spare node I might be able to do some testing on it as well.
It's running a 3.2 kernel right now. I could probably get a later
model kernel on it even.

-- 
To understand recursion, one must first understand recursion.


-- 
Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-performance


Re: [PERFORM] Turn off Hyperthreading! WAS: 60 core performance with 9.3

2014-08-21 Thread Scott Marlowe
On Thu, Aug 21, 2014 at 3:26 PM, Scott Marlowe scott.marl...@gmail.com wrote:
 On Thu, Aug 21, 2014 at 3:02 PM, Josh Berkus j...@agliodbs.com wrote:
 On 08/20/2014 07:40 PM, Bruce Momjian wrote:

 I am also
 unclear exactly what you tested, as I didn't see it mentioned in the
 email --- CPU type, CPU count, and operating system would be the minimal
 information required.

 Ooops!  I thought I'd posted that earlier, but I didn't.

 The processors in question is the Intel(R) Xeon(R) CPU E7- 4850, with 4
 of them for a total of 40 cores or 80 HT cores.

 OS is RHEL with 2.6.32-431.3.1.el6.x86_64.

 I'm running almost the exact same setup in production as a spare. It
 has 4 of those CPUs, 256G RAM, and is currently set to use HT. Since
 it's a spare node I might be able to do some testing on it as well.
 It's running a 3.2 kernel right now. I could probably get a later
 model kernel on it even.

 --
 To understand recursion, one must first understand recursion.

To update this last post, the machine I have is running ubuntu 12.04.1
right now, and I have kernels 3.2, 3.5, 3.8, 3.11, and 3.13 available
to put on it. We're looking at removing it from our current production
cluster so I could likely do all kinds of crazy tests on it.


-- 
Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-performance


Re: [PERFORM] Turn off Hyperthreading! WAS: 60 core performance with 9.3

2014-08-21 Thread Graeme B. Bell
 HT off is common knowledge for better benchmarking result

It's wise to use the qualifer 'for better benchmarking results'. 

It's worth keeping in mind here that a benchmark is not the same as normal 
production use. 

For example, where I work we do lots of long-running queries in parallel over a 
big range of datasets rather than many short-term transactions as fast as 
possible. Our biggest DB server is also used for GDAL work and R at the same 
time*. Pretty far from pgbench; not everyone is constrained by locks.

I suppose that if your code is basically N copies of the same function, 
hyper-threading isn't likely to help much because it was introduced to allow 
different parts of the processor to be used in parallel when you're running 
hetarogenous code. 

But if you're hammering just one part of the CPU... well, adding another layer 
of logical complexity for your CPU to manage probably isn't going to do much 
good.

Should HT be on or off when you're running 64 very mixed types of long-term 
queries which involve variously either heavy use of real number calculations or 
e.g. logic/string handling, and different data sets? It's a much more complex 
question than simply maxing out your pgbench scores. 

I don't have the data now unfortunately, but I remember seeing a benefit for HT 
on our 4 core e3 when running GDAL/Postgis work in parallel last year. It's not 
surprising though; the GDAL calls are almost certainly using different 
functions of the processor compared to postgres and there should be very little 
lock contention. In light of this interesting data I'm now leaning towards 
proposing HT off for our mapservers (which receive short, similar requests over 
and over), but for the hetaragenous servers, I think I'll keep it on for now.

Graeme. 



* unrelated. There's also huge advantages for us in keeping these different 
programs running on the same machine since we found we can get much better 
transfer rates through unix sockets than with TCP over the network.

-- 
Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-performance


Re: [PERFORM] Turn off Hyperthreading! WAS: 60 core performance with 9.3

2014-08-21 Thread Josh Berkus
On 08/21/2014 02:26 PM, Scott Marlowe wrote:
 I'm running almost the exact same setup in production as a spare. It
 has 4 of those CPUs, 256G RAM, and is currently set to use HT. Since
 it's a spare node I might be able to do some testing on it as well.
 It's running a 3.2 kernel right now. I could probably get a later
 model kernel on it even.

You know about the IO performance issues with 3.2, yes?

-- 
Josh Berkus
PostgreSQL Experts Inc.
http://pgexperts.com


-- 
Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-performance


Re: [PERFORM] Turn off Hyperthreading! WAS: 60 core performance with 9.3

2014-08-21 Thread Steve Crawford

On 08/21/2014 03:51 PM, Josh Berkus wrote:

On 08/21/2014 02:26 PM, Scott Marlowe wrote:

I'm running almost the exact same setup in production as a spare. It
has 4 of those CPUs, 256G RAM, and is currently set to use HT. Since
it's a spare node I might be able to do some testing on it as well.
It's running a 3.2 kernel right now. I could probably get a later
model kernel on it even.

You know about the IO performance issues with 3.2, yes?

Were those 3.2 only and since fixed or are there issues persisting in 
3.2+? The 12.04 LTS release of Ubuntu Server was 3.2 but the 14.04 is 3.13.


Cheers,
Steve



--
Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-performance


Re: [PERFORM] Turn off Hyperthreading! WAS: 60 core performance with 9.3

2014-08-21 Thread Josh Berkus
On 08/21/2014 04:08 PM, Steve Crawford wrote:
 On 08/21/2014 03:51 PM, Josh Berkus wrote:
 On 08/21/2014 02:26 PM, Scott Marlowe wrote:
 I'm running almost the exact same setup in production as a spare. It
 has 4 of those CPUs, 256G RAM, and is currently set to use HT. Since
 it's a spare node I might be able to do some testing on it as well.
 It's running a 3.2 kernel right now. I could probably get a later
 model kernel on it even.
 You know about the IO performance issues with 3.2, yes?

 Were those 3.2 only and since fixed or are there issues persisting in
 3.2+? The 12.04 LTS release of Ubuntu Server was 3.2 but the 14.04 is 3.13.

The issues I know of were fixed in 3.9.

-- 
Josh Berkus
PostgreSQL Experts Inc.
http://pgexperts.com


-- 
Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-performance


Re: [PERFORM] Turn off Hyperthreading! WAS: 60 core performance with 9.3

2014-08-21 Thread Mark Kirkwood

On 22/08/14 11:29, Josh Berkus wrote:

On 08/21/2014 04:08 PM, Steve Crawford wrote:

On 08/21/2014 03:51 PM, Josh Berkus wrote:

On 08/21/2014 02:26 PM, Scott Marlowe wrote:

I'm running almost the exact same setup in production as a spare. It
has 4 of those CPUs, 256G RAM, and is currently set to use HT. Since
it's a spare node I might be able to do some testing on it as well.
It's running a 3.2 kernel right now. I could probably get a later
model kernel on it even.

You know about the IO performance issues with 3.2, yes?


Were those 3.2 only and since fixed or are there issues persisting in
3.2+? The 12.04 LTS release of Ubuntu Server was 3.2 but the 14.04 is 3.13.


The issues I know of were fixed in 3.9.



There is a 3.11 kernel series for Ubuntu 12.04 Precise.

Regards

Mark


--
Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-performance


Re: [PERFORM] Turn off Hyperthreading! WAS: 60 core performance with 9.3

2014-08-21 Thread Joshua D. Drake


On 08/21/2014 04:29 PM, Josh Berkus wrote:


On 08/21/2014 04:08 PM, Steve Crawford wrote:

On 08/21/2014 03:51 PM, Josh Berkus wrote:

On 08/21/2014 02:26 PM, Scott Marlowe wrote:

I'm running almost the exact same setup in production as a spare. It
has 4 of those CPUs, 256G RAM, and is currently set to use HT. Since
it's a spare node I might be able to do some testing on it as well.
It's running a 3.2 kernel right now. I could probably get a later
model kernel on it even.

You know about the IO performance issues with 3.2, yes?


Were those 3.2 only and since fixed or are there issues persisting in
3.2+? The 12.04 LTS release of Ubuntu Server was 3.2 but the 14.04 is 3.13.


The issues I know of were fixed in 3.9.



Correct. If you run trusty backports you are good to go.

JD

--
Command Prompt, Inc. - http://www.commandprompt.com/  503-667-4564
PostgreSQL Support, Training, Professional Services and Development
High Availability, Oracle Conversion, @cmdpromptinc
If we send our children to Caesar for their education, we should
 not be surprised when they come back as Romans.


--
Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-performance


Re: [PERFORM] Turn off Hyperthreading! WAS: 60 core performance with 9.3

2014-08-20 Thread Josh Berkus
Mark, all:

So, this is pretty damming:

Read-only test with HT ON:

[pgtest@db ~]$ pgbench -c 20 -j 4 -T 600 -S bench
starting vacuum...end.
transaction type: SELECT only
scaling factor: 30
query mode: simple
number of clients: 20
number of threads: 4
duration: 600 s
number of transactions actually processed: 47167533
tps = 78612.471802 (including connections establishing)
tps = 78614.604352 (excluding connections establishing)

Read-only test with HT Off:

[pgtest@db ~]$ pgbench -c 20 -j 4 -T 600 -S bench
starting vacuum...end.
transaction type: SELECT only
scaling factor: 30
query mode: simple
number of clients: 20
number of threads: 4
duration: 600 s
number of transactions actually processed: 82457739
tps = 137429.508196 (including connections establishing)
tps = 137432.893796 (excluding connections establishing)


On a read-write test, it's 10% faster with HT off as well.

Further, from their production machine we've seen that having HT on
causes the machine to slow down by 5X whenever you get more than 40
cores (as in 100% of real cores or 50% of HT cores) worth of activity.

So we're definitely back to If you're using PostgreSQL, turn off
Hyperthreading.

-- 
Josh Berkus
PostgreSQL Experts Inc.
http://pgexperts.com


-- 
Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-performance


Re: [PERFORM] Turn off Hyperthreading! WAS: 60 core performance with 9.3

2014-08-20 Thread Shaun Thomas

On 08/20/2014 02:13 PM, Josh Berkus wrote:


So we're definitely back to If you're using PostgreSQL, turn off
Hyperthreading.


That's so strange. Back when I did my Nehalem tests, we got a very 
strong 30%+ increase by enabling HT. We only got a hit when we turned 
off turbo, or forgot to disable power saving features.


--
Shaun Thomas
OptionsHouse, LLC | 141 W. Jackson Blvd. | Suite 800 | Chicago IL, 60604
312-676-8870
stho...@optionshouse.com

__

See http://www.peak6.com/email_disclaimer/ for terms and conditions related to 
this email


--
Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-performance


Re: [PERFORM] Turn off Hyperthreading! WAS: 60 core performance with 9.3

2014-08-20 Thread Mark Kirkwood

On 21/08/14 07:13, Josh Berkus wrote:

Mark, all:

So, this is pretty damming:

Read-only test with HT ON:

[pgtest@db ~]$ pgbench -c 20 -j 4 -T 600 -S bench
starting vacuum...end.
transaction type: SELECT only
scaling factor: 30
query mode: simple
number of clients: 20
number of threads: 4
duration: 600 s
number of transactions actually processed: 47167533
tps = 78612.471802 (including connections establishing)
tps = 78614.604352 (excluding connections establishing)

Read-only test with HT Off:

[pgtest@db ~]$ pgbench -c 20 -j 4 -T 600 -S bench
starting vacuum...end.
transaction type: SELECT only
scaling factor: 30
query mode: simple
number of clients: 20
number of threads: 4
duration: 600 s
number of transactions actually processed: 82457739
tps = 137429.508196 (including connections establishing)
tps = 137432.893796 (excluding connections establishing)


On a read-write test, it's 10% faster with HT off as well.

Further, from their production machine we've seen that having HT on
causes the machine to slow down by 5X whenever you get more than 40
cores (as in 100% of real cores or 50% of HT cores) worth of activity.

So we're definitely back to If you're using PostgreSQL, turn off
Hyperthreading.




Hmm - that is interesting - I don't think we compared read only scaling 
for hyperthreading on and off (only read write). You didn't mention what 
cpu this is for (or how many sockets etc), would be useful to know.


Notwithstanding the above results, my workmate Matt made an interesting 
observation: the scaling graph for (our) 60 core box (HT off), looks 
just like the one for our 32 core box with HT *on*.


We are wondering if a lot of the previous analysis of HT performance 
regressions should actually be reevaluated in the light of ...err is it 
just that we have a lot more cores...? [1]


Regards

Mark

[1] Particularly as in *some* cases (single socket i7 for instance) HT 
on seems to scale fine.



--
Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-performance


Re: [PERFORM] Turn off Hyperthreading! WAS: 60 core performance with 9.3

2014-08-20 Thread Peter Geoghegan
On Wed, Aug 20, 2014 at 1:36 PM, Shaun Thomas stho...@optionshouse.com wrote:
 That's so strange. Back when I did my Nehalem tests, we got a very strong
 30%+ increase by enabling HT. We only got a hit when we turned off turbo, or
 forgot to disable power saving features.

In my experience, it is crucially important to consider power saving
features in most benchmarks these days, where that might not have been
true a few years ago. The CPU scaling governor can alter the outcome
of many benchmarks quite significantly.

-- 
Regards,
Peter Geoghegan


-- 
Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-performance


Re: [PERFORM] Turn off Hyperthreading! WAS: 60 core performance with 9.3

2014-08-20 Thread Bruce Momjian
On Wed, Aug 20, 2014 at 12:13:50PM -0700, Josh Berkus wrote:
 On a read-write test, it's 10% faster with HT off as well.
 
 Further, from their production machine we've seen that having HT on
 causes the machine to slow down by 5X whenever you get more than 40
 cores (as in 100% of real cores or 50% of HT cores) worth of activity.
 
 So we're definitely back to If you're using PostgreSQL, turn off
 Hyperthreading.

Not sure how you can make such a blanket statement when so many people
have tested and shown the benefits of hyper-threading.  I am also
unclear exactly what you tested, as I didn't see it mentioned in the
email --- CPU type, CPU count, and operating system would be the minimal
information required.

-- 
  Bruce Momjian  br...@momjian.ushttp://momjian.us
  EnterpriseDB http://enterprisedb.com

  + Everyone has their own god. +


-- 
Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-performance


Re: [PERFORM] Turn off Hyperthreading! WAS: 60 core performance with 9.3

2014-08-20 Thread Tatsuo Ishii
 On Wed, Aug 20, 2014 at 12:13:50PM -0700, Josh Berkus wrote:
 On a read-write test, it's 10% faster with HT off as well.
 
 Further, from their production machine we've seen that having HT on
 causes the machine to slow down by 5X whenever you get more than 40
 cores (as in 100% of real cores or 50% of HT cores) worth of activity.
 
 So we're definitely back to If you're using PostgreSQL, turn off
 Hyperthreading.
 
 Not sure how you can make such a blanket statement when so many people
 have tested and shown the benefits of hyper-threading.  I am also
 unclear exactly what you tested, as I didn't see it mentioned in the
 email --- CPU type, CPU count, and operating system would be the minimal
 information required.

HT off is common knowledge for better benchmarking result, at least
for me. I've never seen better result with HT on, except POWER.

Best regards,
--
Tatsuo Ishii
SRA OSS, Inc. Japan
English: http://www.sraoss.co.jp/index_en.php
Japanese:http://www.sraoss.co.jp


-- 
Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-performance