Puget Systems print logo

https://www.pugetsystems.com

Read this article at https://www.pugetsystems.com/guides/1588
Article Thumbnail

Hyperthreading & SMT causing low performance in Lightroom Classic

Written on October 10, 2019 by Matt Bach
Share:

Summary of issue

Recently, we have noticed and investigated an issue where exporting and generating smart previews in Adobe Lightroom Classic is significantly slower when Intel Hyperthreading (HT) or AMD Simultaneous Multithreading (SMT) is enabled with certain processors. The issue is present in the latest build of Lightroom Classic (8.4.1), but we have confirmed it in versions as old as 7.5.

The level of performance gain that can be seen by disabling HT/SMT varies based on the specific CPU model and type of images being processed, but in some cases we recorded a 90% performance increase with HT/SMT disabled. At the moment, we have confirmed the issue with the following processors:

Heavily affected (up to 50%+ performance gain with HT/SMT disabled)

  • Intel Core i9 9980XE
  • Intel Core i9 9900K
  • AMD Threadripper 2990WX
  • AMD Threadripper 2970WX

Moderately affected (up to 25-50% performance gain with HT/SMT disabled)

  • Intel Core i9 9960X
  • Intel Core i9 9940X
  • AMD Threadripper 2950X

Lightly affected (less than 25% performance gain with HT/SMT disabled)

  • Intel Core i9 9920X
  • Intel Core i7 8700K
  • AMD Threadripper 2920X
  • AMD Ryzen 9 3900X

The issue has been confirmed with multiple brands of motherboard including Gigabyte, MSI, and Asus. At the moment, we do not have a permanent solution, but if you think you may be experiencing this issue there are a number of workarounds that may help.

Workaround #1: Disable HT/SMT in the BIOS

While disabling Hyperthreading or Simultaneous Multithreading in your motherboard's BIOS should resolve the issue, this may adversely affect other applications that benefit from HT/SMT. However, this is the most sure-fire way to get the full performance in Lightroom Classic if your systems is affected by this issue.

Note that every motherboard brand and model has this setting in slightly different locations. If you have a Puget Systems workstation, we highly recommend contacting our support department for assistance. Otherwise, the manual for your specific motherboard should have guidance on exactly where this setting is located.

BIOS - Disable Hyperthreading

Workaround #2: Set Lightroom Classic processor affinity

If you don't want to disable Hyperthreading or SMT on your entire system, you can tell Windows to only run Lightroom Classic on the "main" CPU threads through a setting called processor affinity. This is not quite as effective as simply disabling HT/SMT, but it will not affect any other applications.

There are many guides online for how to set processor affinity including this guide for doing it through Task Manager (note that this method needs to be done manually each time you run Lightroom) or this guide for creating a custom shortcut that launched Lightroom Classic with the appropriate affinity. If you follow either of these guides, you will want to set Lightroom.exe to use alternating cores starting with Core 0. I.e. Core 0, Core 2, Core 4, etc.

Alternatively, we put together a little utility that detects whether your CPU supports Hyperthreadring/SMT, and if it does, it launches Lightroom Classic (if it isn't already running) and properly configures the CPU affinity to mitigate this issue.

Be aware that this utility does not permanently change the processor affinity settings for Lightroom Classic. If you close Lightroom Classic and relaunch it through a normal shortcut or Creative Cloud, it will run with the affinity set to all cores.

Need help with your Puget Systems PC?

If something is wrong with your Puget Systems PC. We are readily accessible, and our support team comes from a wide range of technological backgrounds to better assist you!

Contact Puget Systems Support

Looking for more support guides?

If you are looking for a solution to a problem you are having with your PC, we also have a number of other support guides that may be able to assist you with other issues.

Puget Systems Online Help Guides

Tags: performance, Lightroom, Hyperthreading, Simultaneous Multithreading
HÃ¥kon Broder Lund

Really interesting. Didn't expect this. Thank you for finding this! Are there any other apps that shares this behavior?

Posted on 2019-10-12 02:03:04

Nothing that I know of - at least not to the same degree. There are some programs where disabling HT/SMT gives a small boost, but often times it is minor and depends on a lot of factors. This is the only time I've seen an issue this pronounced.

Posted on 2019-10-12 02:05:09

Most mainstream applications we've tested don't have big problems with HT / SMT, but it does come up as an issue more often when you move to high performance computing. Dr Kinghorn wrote an article on this topic a few years ago, and back when I was doing testing on OpticStudio I remember HT causing performance slowdowns in some types of simulations.

https://www.pugetsystems.co...

Posted on 2019-10-14 16:37:19
kingmouf

This is not something that is not to be expected. The principle behind HT/SMT is that of resource sharing or latency hiding. It actually depends on the implementation (and Intel's HT is the worse among the others). Some kinds of SMT try to use resource sharing on wide cores (if you have for example multiple execution units, yet a program is unable to use them all, then share them with other threads to maximize resource usage). Other kinds try to "hide" the gap between fast processing cores and slower memory and thus try to schedule multiple threads at idle cycles when one thread needs to wait for the memory to respond. Other schemes lie in between and try to make the most of all situations. The thing in all cases is that we have resource sharing between threads. When program threads would benefit if they had access to all resources, using the HT/SMT is going to cause a decline in performance compared to not having HT/SMT enabled. While hardware and OS schedulers will try to do their best, sometimes it is simply better to have HT/SMT off.

If I remember correctly, when the first multicores appeared that had HT, the initial OS schedulers in Windows XP (if I remember correctly) were unable to distinguish between physical and virtual processor cores. This caused significant performance degradation because they tended to use the cores sequencially and scheduled processes on the same physical core that caused a bottleneck while other physical cores remained inactive. It was soon mitigated through patches and service packs, but it provides an insight.

All in all, HT/SMT is better suited for throughput and better responsiveness, but can sacrifice absolute performance in certain scenarios. It appears that Lightroom falls in that category.

Posted on 2019-10-15 08:28:20
Dragon

Thanks for the utility. That is an easy fix that doesn't mess with rendering performance of the system until Adobe solves their problem. I did have to kick Norton in the shins to keep it from deleting the file, though :-).

Posted on 2019-10-17 17:47:26