From: Stuart Henderson Subject: faq entry for SMT? To: tech Date: Fri, 22 Mar 2024 12:46:09 +0000 I'm not sure why, but this question seems to come up a lot in various places (certainly more "frequently asked" than S/Key or NIS) so it seems worth adding something about it to the faq. does the wording make sense? any other comments? Index: faq10.html =================================================================== RCS file: /cvs/www/faq/faq10.html,v diff -u -p -r1.300 faq10.html --- faq10.html 10 Apr 2023 02:55:09 -0000 1.300 +++ faq10.html 22 Mar 2024 11:45:32 -0000 @@ -30,6 +30,7 @@ FAQ - System Management
  • Clock Syncing
  • Time Zones
  • Character Sets and Localization +
  • Symmetric Multithreading, or "Why are only half of my CPUs used?"
  • Using S/Key
  • Directory Services
      @@ -349,6 +350,27 @@ Some ports may respect other LC_*< but using them or setting LC_CTYPE to any value other than C, POSIX or en_US.UTF-8 is not recommended. + +

      Symmetric Multithreading, or "Why are only half of my CPUs used?"

      + +Some CPUs use Symmetric Multithreading (SMT, or "hyperthreading" as +named by Intel). +In this case, "virtual" CPU cores are shown in various system tools +which do not have full CPU resources but are there to allow sharing part +of a single core's resources with more than one concurrent process. +This feature can improve performance for some workloads but reduce it +for others. + +

      +SMT has been involved in various CPU vulnerabilities, in particular +relating to speculative execution. This can result in processes learning +information about other processes which they should not have access to. +To mitigate this, OpenBSD disables running code on detected SMT "virtual" +cores by default. + +

      +They can be reenabled by setting the sysctl hw.smt to +1, however doing so is generally not recommended.

      Using S/Key