Jump to content
jbartlett

Enable AMD Hyperthreading support in VM GUI

14 posts in this topic Last Reply

Recommended Posts

Posted (edited)

@bonienl

The VM GUI editor is hard coded to set the thread count to 1 if it detects an AMD processor in libvirt.php

// detect if the processor is AMD, and if so, force single threaded
$strCPUInfo = file_get_contents('/proc/cpuinfo');
if (strpos($strCPUInfo, 'AuthenticAMD') !== false) {
	$intCPUThreadsPerCore = 1;
}

This was due to AMD reporting no support for hyperthreadding in a VM. With UNRAID 6.8.1 RC1, hyperthreadding is supported with CPU passthrough as is (and CPU cache) if the CPU feature topoext is enabled. Previously, the CPU had to be forced to report as an EPYC to get it to support hyperthreadding.

<cpu mode='host-passthrough' check='none'>
  <topology sockets='1' cores='6' threads='2'/>
  <cache mode='passthrough'/>
  <feature policy='require' name='topoext'/>
</cpu>

Microsoft's CoreInfo returns

Coreinfo v3.31 - Dump information on system CPU and memory topology
Copyright (C) 2008-2014 Mark Russinovich
Sysinternals - www.sysinternals.com

Logical to Physical Processor Map:
**----------  Physical Processor 0 (Hyperthreaded)
--**--------  Physical Processor 1 (Hyperthreaded)
----**------  Physical Processor 2 (Hyperthreaded)
------**----  Physical Processor 3 (Hyperthreaded)
--------**--  Physical Processor 4 (Hyperthreaded)
----------**  Physical Processor 5 (Hyperthreaded)

Note that changes to the CPU layout may not be detected in the VM until the VM is rebooted from inside the VM itself (for example: Start > Power > Restart)

 

Prior to 6.8.1 RC1, I could not get CPU-Z to run, it would always hang at the 10%/Processors on load. It still takes a bit but does return now.

image.png.9d9dafd2462551b46371e3d12e3b2f15.png

Edited by jbartlett

Share this post


Link to post

+1

Currently working on my Ryzen 3000 Unraid server (Just finished building it, now I need to buy a license and set it up :) )

Share this post


Link to post

This is under consideration, expect a change in future release.

  • Like 1
  • Thanks 1

Share this post


Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.