USB Latency reducing on Windows guest from Windows host

Discussions related to using VirtualBox on Windows hosts.
Post Reply
Fox007
Posts: 5
Joined: 19. Jan 2024, 14:53

USB Latency reducing on Windows guest from Windows host

Post by Fox007 »

Hello the VM experts !

I need your help !
Is there a way to give all the host USB performances to a guest machine ? (Even if I have to dedicate this USB port to the guest, preventing host to be able to use it).

For car diagnosis reasons (OBD2 tools) I need to use tools that requires no latency from USB port.
I must admit that using a VM is not the best condition, but it's a no choice at this level (OS/rights limitations).

I already switched to USB 3 thanks to a tutorial I found on the internet which improved a lot (from unusable to usable) but I still get some connection losses whatever the tool I use (due to latencies I guess as these tools don't require too much bandwith to work).
I tried to give more cores/ram, with no better success

I'm using a Windows XP SP3 guest VM (allocated 2 cores/4GB Ram/VT ext. enabled/USB3) on a host with Windows 11 (i5 12 cores/16GB Ram/256GB SSD/USB3).

Any help will be welcomed !
scottgus1
Site Moderator
Posts: 20945
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: USB Latency reducing on Windows guest from Windows host

Post by scottgus1 »

Real-time latency with the physical world is pretty nigh impossible in a VM, according to the forum gurus. If you require host-style USB speeds, then you need to do the activity on the host. Virtualbox has no "tuning" mechanisms for USB that I have ever seen or read about in the manual. It's just on or off. USB 3 is reported to be better than USB 2.

There should be older computers that can still run XP available, or an OBD2 app that works on modern OS's.
Fox007
Posts: 5
Joined: 19. Jan 2024, 14:53

Re: USB Latency reducing on Windows guest from Windows host

Post by Fox007 »

I feared this answer :/
My concern is more about latency than speed.
These latencies induce timeouts.
If only I could set something to "realtime"...
jorgensen
Posts: 583
Joined: 20. Oct 2009, 01:22
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, LinuxMint

Re: USB Latency reducing on Windows guest from Windows host

Post by jorgensen »

Fox007
Posts: 5
Joined: 19. Jan 2024, 14:53

Re: USB Latency reducing on Windows guest from Windows host

Post by Fox007 »

Thanks, but as mentioned in my first post I already used this option.
Indeed with USB2 it was impossible to use.
With USB3 it's usable, but I still get timeouts.

I'm fearing that I already reached the max I could with virtualization & realtime usb... :cry:
thijsee
Posts: 8
Joined: 3. Jun 2019, 15:15

Re: USB Latency reducing on Windows guest from Windows host

Post by thijsee »

About time outs (TO): try to REDUCE the speed of the guest instead of giving it more cores etc.
These TO time-settings are probably related to the processor speed and turn out to be to short for even the USB3 speed.
Vbox settings you can try to reduce: System > Processor > Processors + Execution Cap
Fox007
Posts: 5
Joined: 19. Jan 2024, 14:53

Re: USB Latency reducing on Windows guest from Windows host

Post by Fox007 »

I need some explanations .. :roll:
If I understood well, your idea is to slow down the VM so that it's the USB that is waiting instead of the VM waiting the port.
Did I understand well ?
thijsee
Posts: 8
Joined: 3. Jun 2019, 15:15

Re: USB Latency reducing on Windows guest from Windows host

Post by thijsee »

Yes. It's a little counterintuitive but if the time-out value in your legacy program is related to the CPU cycle, slowing down the CPU cycle should help. I don't know if it is possible to slow down the CPU cycle with the given VM parameters but trying it is free.
For your legacy program running on a modern machine/computer it's like driving a F1 car for Fred Flintstone, so missing a sign along the road is likely for Fred.
Fox007
Posts: 5
Joined: 19. Jan 2024, 14:53

Re: USB Latency reducing on Windows guest from Windows host

Post by Fox007 »

I gave it a try, but with no better results. :cry:

I started with very low values : 40% of 1 core and 384mb of RAM. Windows XP still runs almost smoothly (the old time where low ressources were enough to run a Windows :D )
=> The OBD2 apps doesn't work very well, I got blank screens etc, and I still keep usb timeouts when I succeed to reach a screen

I then increased core / ram but I quickly left blank screens, and I still continue to have the issues with USB communication errors.

:cry:
Post Reply