Managing VM threads priority

Discussions related to using VirtualBox on Linux hosts.
Post Reply
Lapsio
Posts: 13
Joined: 24. Jun 2017, 17:15

Managing VM threads priority

Post by Lapsio »

Virtualbox uses handful of threads for each VM. When using renice you can renice all of them or only certain chosen ones. Some of those threads have by default higher than average nice level (below 0).

If I want to decrease priority of VM rinning computational tasks on 100% CPU which threads should I renice in order to not "break" completely VM performance? I'm aware of CPU cap but even when machine is running on 3 out of 4 cores (so 75%) host is not really that responsive and load is noticeable. Significantly more than running process hogging 100% CPU on bare host with high nice level.

I have follwong threads:

Code: Select all

 8428  8428 ?        00:00:51 VirtualBox
 8428  8432 ?        00:00:03 nspr-1
 8428  8433 ?        00:00:23 nspr-2
 8428  8434 ?        00:00:00 VBoxSVCWatcher
 8428  8436 ?        00:00:00 TimerLR
 8428  8461 ?        00:00:00 MainHGCMthread
 8428  8462 ?        01:03:42 EMT-0
 8428  8463 ?        01:25:47 EMT-1
 8428  8464 ?        01:24:30 EMT-2
 8428  8465 ?        01:12:06 EMT-3
 8428  8466 ?        00:00:00 ShClipboard
 8428  8467 ?        00:00:00 DragAndDropSvc
 8428  8468 ?        00:00:00 GuestPropSvc
 8428  8469 ?        00:00:00 GSTPROPNTFY
 8428  8470 ?        00:00:00 GuestControlSvc
 8428  8473 ?        00:00:09 Timer
 8428  8474 ?        00:00:00 PDMNsTx
 8428  8475 ?        00:00:00 ShFolders
 8428  8483 ?        00:00:00 AioMgr0-F
 8428  8484 ?        00:00:02 AioMgr1-N
 8428  8486 ?        00:00:01 Port0
 8428  8487 ?        00:00:00 ATA-0
 8428  8488 ?        00:00:00 ATA-1
 8428  8489 ?        00:00:05 INTNET-RECV
 8428  8490 ?        00:00:00 INTNET-XMIT
 8428  8491 ?        00:00:00 ACPI Poller
 8428  9212 ?        00:00:22 nspr-3
 8428  9237 ?        00:00:00 SHCLIP
 8428 16658 ?        00:00:21 nspr-4
socratis
Site Moderator
Posts: 27330
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: Managing VM threads priority

Post by socratis »

I wouldn't touch the threads, I'd go with the execution cap. This is at least something that they've tried and support.
Lapsio wrote:even when machine is running on 3 out of 4 cores
Are you sure you have 4 cores? Not threads, cores. Look at a VBox.log from a VM run, search for "Full Name". That's going to give you the CPU full name. Look up its specs.

You can also look at the cores/threads, search for "Physical host cores" in the same VBox.log file and its previous line. Cross-reference that with your CPU.
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
Post Reply