Skip to content
View in the app

A better way to browse. Learn more.

Unraid

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Allow configurable CPU placement for KVM helper threads

Featured Replies

My Windows 10 VM on Unraid 7.3.4 felt very slow despite having 28 vCPUs assigned. I found that one logical CPU repeatedly reached 100% while many others were lightly loaded. That was CPU 7 on the Unraid host, which maps to vCPU 2 in the Windows VM.

The kvm-nx-lpage-re helper thread shared CPU 7 with the vCPU thread. Together they used nearly 100% of one logical CPU. After I moved the helper outside the VM’s pinned CPU set, I measured average about 150% combined across two logical CPUs during a recovery burst. Windows felt much faster and more responsive in everyday use.

Could Unraid add a per-VM setting to choose where KVM helper threads run? I’d like to select either the last logical CPUs in the VM’s pinned set or a separate set of host CPUs outside that allocation.

I currently rely on a script to find the helper thread and move it again after every VM restart. A setting in the Unraid UI would help less technical users make better use of their hardware without having to diagnose CPU contention or maintain a custom script.

and here are statistics berofore and after

Unraid 7.3.4 | Windows 10 VM | Intel Xeon Gold 6148 | 28 vCPUs

BEFORE: KVM worker and guest vCPU 2 shared host logical CPU 7

Affinity checks:

pid 2303839's current affinity list: 7

pid 2303645's current affinity list: 7

Worker cgroup: vcpu2

Effective cpuset: 7

Selected top samples (COMMAND and %CPU transcribed from the original output):

Time kvm-nx-lpage-re CPU 2/KVM Combined

15:36:15 55.3% 41.9% 97.2%

15:36:17 56.8% 40.9% 97.7%

15:36:19 56.3% 41.3% 97.6%

15:36:21 55.4% 41.9% 97.3%

100% represents one host logical CPU. Both threads competed for the same CPU.

Unraid 7.3.4 | Windows 10 VM | Intel Xeon Gold 6148 | 28 vCPUs

AFTER: only the KVM worker was moved to the VM's emulator cgroup

Affinity change:

pid 2303839's current affinity list: 7

pid 2303839's new affinity list: 4,5,24,25

Guest vCPU 2 remained pinned to host logical CPU 7.

Selected top samples (thread CPU and CPU 7 idle transcribed from the original output):

Time kvm-nx-lpage-re CPU 2/KVM Combined Host CPU 7 idle

15:44:39 79.3% 60.3% 139.6% not sampled

15:48:51 98.8% 59.9% 158.7% 40.6%

15:48:53 99.2% 64.3% 163.5% 35.5%

15:48:59 99.2% 68.3% 167.5% 31.3%

15:49:03 84.7% 70.2% 154.9% 29.8%

Combined values are sums of the two thread readings. Values over 100%

show concurrent execution on separate logical CPUs. CPU 7 idle is

reported independently by top. Windows felt noticeably more responsive

in everyday use after the change. No frame-time benchmark was recorded.

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...

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.