1

There are several questions asking if disabling hyperthreading will improve performance (e.g. like this). The answer (as it is to all performance questions) is of course "profile it on your workload".

As running experiments in a production environment is a poor idea (who wants to see reduced performance from an experiment in production!) and it isn't always feasible to set up a realistic development environment, I was wondering what measurements are available to determine if hyperthreading might be hurting performance (such that we only run an experiment that is likely to succeed!).

Notes:

  1. This isn't an SQL specific question, I'm not looking for SQL statistics but rather performance counters from the operating system
  2. The source code isn't available so no changes can be made there to monitor performance.
dave
  • 111
  • 2

2 Answers2

3

I can't tell if you're too academic in approach, but for most workloads on modern CPUs, people recommend leaving hypertheading on.

Now, given that you haven't provided details like the application requirements, OS version/flavor/distribution or hardware specifications/platform/CPU model, it's difficult to give any real insight.

  • What metrics are important to your business or your users?
  • Do you have historical monitoring?
  • Are you looking at built-in tools like perf?
  • Are you having a performance problem today?
  • Look at your systems with a tool like Netdata to actually see what's happening on the system.

But if you're using system hardware with Intel Nehalem or newer CPUs, I'd leave hyperthreading enabled unless you have a compelling reason not to. If you have a deterministic workload or something that hinges on single-threaded performance, then maybe... But there's often other low-hanging fruit like power performance profiles, disabling C-states, BIOS configuration, OS-level tuning.

ewwhite
  • 194,921
  • 91
  • 434
  • 799
  • I didn't want to go in to specifics because I wanted a general answer like this. Netdata looks interesting! I've seen people suggesting hyperthreading off even with recent CPUs (HPC, EDA vendors) for specific work flows. – dave Feb 13 '17 at 01:38
  • [Netdata](https://my-netdata.io/) is excellent and will help you get 1-second granularity and a view of a variety of system metrics. – ewwhite Feb 13 '17 at 02:45
1

As running experiments in a production environment is a poor idea

No it's not. Creating a realistic simulation of your live environment will cost you about as much as your total expenditure on your IT - its not just the cost of replucating the server infrastructure, this is tiny compared to the cost of creating a representative but simulated demand. There are lots of products which claim to do this - but I've yet to see any which come close.

Not even the companies with astronomical IT budgets consider anything to be of proven value until it has been tested in production.

Man up.

As to what you could measure to determine if your system is improved or worsened by a change in config, since you've told us nothing about the service or components we can't answer the question.

symcbean
  • 19,931
  • 1
  • 29
  • 49
  • The contrast between this answer and the comments "get data for testing" is quite stark. I agree that testing in production is the only true test, I was just looking for some metrics to see whether it is likely to be a worthwhile test before trying it (to avoid a degrading production performance!). – dave Feb 13 '17 at 02:53