mirror of
https://github.com/unraid/webgui.git
synced 2026-03-13 14:30:29 -05:00
Dont force single threaded VMs for AMD
This commit is contained in:
@@ -33,12 +33,8 @@ case 'vm':
|
||||
// initial cores/threads assignment
|
||||
$cores = $vcpus;
|
||||
$threads = 1;
|
||||
$vendor = exec("grep -Pom1 '^vendor_id\\s+: \\K\\S+' /proc/cpuinfo");
|
||||
if ($vendor == 'AuthenticAMD') {
|
||||
$ht = 1; // force single threaded for AMD
|
||||
} else {
|
||||
$ht = exec("lscpu|grep -Po '^Thread\\(s\\) per core:\\s+\\K\\d+'") ?: 1; // fetch hyperthreading
|
||||
}
|
||||
$ht = exec("lscpu|grep -Po '^Thread\\(s\\) per core:\\s+\\K\\d+'") ?: 1; // fetch hyperthreading
|
||||
|
||||
// adjust for hyperthreading
|
||||
if ($vcpus > $ht && $vcpus%$ht===0) {
|
||||
$cores /= $ht;
|
||||
|
||||
Reference in New Issue
Block a user