evaluating xhci usb controller performance

Everything about latency. Tips, testing methods, mouse lag, display lag, game engine lag, network lag, whole input lag chain, VSYNC OFF vs VSYNC ON, and more! Input Lag Articles on Blur Busters.
User avatar
kyube
Posts: 134
Joined: 29 Jan 2018, 12:03

evaluating xhci usb controller performance

Post by kyube » 20 Sep 2023, 13:35

Main goal of this thread is to evaluate polling stability, DPC/interrupt latency and interrupt count of modern USB controllers.
I'll list my previous findings from a different thread first
I've wanted to long since make a thread about external PCIE USB cards, but I guess I can post my answers here.
From what I've gathered, most non-Intel / non-Ryzen chipset solutions have been wonky at best.

I've got a card with the Renesas uPD720202 with vendor drivers (default MS drivers didn't provide the benefit mentioned below) installed and it is definitely not 1KHz mouse ready, let alone 8KHz. Only 500hz works flawlessly without drops. To be specific, every 256ms it drops a poll, which is basically IMOD.
However, LatencyMon results show a compeletely different picture. For things such as keyboards, USB audio (both input and output), this thing is a beast. No ISR stutters regardless of device I put on it. (Yes, I know LatencyMon isn't reliable to test interrupts and dpclat. A new FOSS solution is on the horizon and should be coming out in the coming months)

MouseTester graphs (yes, I know it's not reliable but it's the only thing we have rn):

uPD720202 w/ latest Renesas 3.0.23.0 drivers on a 8KHz mouse (happens regardless of system due to IMOD)
Image

stock Microsoft drivers
Image

These results have been replicated on 2 different cards (both the Startech USB card and my cheap aliexpress card), on tuned W10 systems with powersaving features disabled.

With IMOD disabled (@8kHz, performs the same as MS stock drivers basically):
Image

With IMOD disabled (@1kHz)
Image

My FL1100-based card arrived, here are the results:

Card name: ULS-UP3100
System: Win10 LTSC 22H2 (debloated, Bitsum highest performance power plan)
Driver: 3.8.35514.0 (taken from Winraid forums labeled as `Other "pure" Fresco Logic USB3 drivers`)
Driver has been manually installed through devmgmt, as per Winraid guide.

Mousetester graph:
(1kHz spinning in circles, both MS drivers and Fresco Logic drivers resulted in the same graphs)

Image


xperf results:
(spinning in circles, only mouse plugged in and set to 1kHz polling ratescript taken from https://github.com/amitxv/PC-Tuning/tre ... in/scripts labeled as "xperf-dpcisr.bat")

DPC Info:
Total = 5449 for module Wdf01000.sys
Elapsed Time, > 0 usecs AND <= 1 usecs, 243, or 4.46%
Elapsed Time, > 1 usecs AND <= 2 usecs, 75, or 1.38%
Elapsed Time, > 2 usecs AND <= 4 usecs, 3, or 0.06%
Elapsed Time, > 4 usecs AND <= 8 usecs, 0, or 0.00%
Elapsed Time, > 8 usecs AND <= 16 usecs, 3126, or 57.37%
Elapsed Time, > 16 usecs AND <= 32 usecs, 1997, or 36.65%
Elapsed Time, > 32 usecs AND <= 64 usecs, 5, or 0.09%
Total, 5449

Interrupt info:
Total = 5128 for module Wdf01000.sys
Elapsed Time, > 0 usecs AND <= 1 usecs, 5114, or 99.73%
Elapsed Time, > 1 usecs AND <= 2 usecs, 9, or 0.18%
Elapsed Time, > 2 usecs AND <= 4 usecs, 0, or 0.00%
Elapsed Time, > 4 usecs AND <= 8 usecs, 5, or 0.10%
Total, 5128


Sadly, the FL1100 doesn't seem to be using vendor drivers and instead relies upon the wdf0100.sys driver.


In comparison, my Conrad UB108 (startech renesas/nec card performs identical)

uPD720202 xperf results:
(mouse @ 1khz spinning in circles & usb mic plugged in)

DPC Info:
Total = 10286 for module rusb3xhc.sys
Elapsed Time, > 0 usecs AND <= 1 usecs, 0, or 0.00%
Elapsed Time, > 1 usecs AND <= 2 usecs, 4339, or 42.18%
Elapsed Time, > 2 usecs AND <= 4 usecs, 794, or 7.72%
Elapsed Time, > 4 usecs AND <= 8 usecs, 2403, or 23.36%
Elapsed Time, > 8 usecs AND <= 16 usecs, 2727, or 26.51%
Elapsed Time, > 16 usecs AND <= 32 usecs, 22, or 0.21%
Elapsed Time, > 32 usecs AND <= 64 usecs, 1, or 0.01%
Total, 10286

Total = 5143 for module rusb3xhc.sys
Elapsed Time, > 0 usecs AND <= 1 usecs, 5125, or 99.65%
Elapsed Time, > 1 usecs AND <= 2 usecs, 17, or 0.33%
Elapsed Time, > 2 usecs AND <= 4 usecs, 0, or 0.00%
Elapsed Time, > 4 usecs AND <= 8 usecs, 1, or 0.02%
Total, 5143
Found a friendly user that was willing to do some testing on the ASMedia ASM3142 controller, so I'll just make a separate thread for people to find it easier.

So far, I've tested the following controllers:
• Renesas uPD720202
• Fresco Logic FL1100
• VL805 (didn't test thoroughly, but it seemed lackluster, will update OP if I find something interesting)

Today, we're tackling the ASM3142.


Card name: On-board XHCI USB controller on Z690 Dark
System: Win10 Server 2022 (debloated)
Drivers: Tested Microsoft stock drivers & ASMedia (1.16.61.1, taken from here https://winraid.level1techs.com/t/outda ... 30871/2522
Driver has been manually installed through devmgmt, as per Winraid guide.
I have not messed with IMOD during the testing in this instance.
The ASMedia drivers have MSI-X capabilities.


Mousetester graphs:
(4kHz spinning in circles, only mouse plugged in)

MS Drivers
Image

ASMedia drivers
Image

(1kHz spinning in circles, ASMedia)
Image

NOTE:MouseTester graphs results depend on variables such as electrical noise & grounding, along with Windows version, BIOS settings etc. Do not assume your graphs will look like this. The graphs are just used for testing whether IMOD is applied at higher polling rates. (such as was the case with the Renesas controller >500hz)
Mousetester is not a 100% reliable way for measuring overall performance, it's just for quick testing.


ASM3142 xperf results:
(mouse @ 4kHz spinning in circles)

MS driver:
Image
(ISR's were also all over the place)


ASMedia driver:
DPC Info
Total = 20280 for module asmtxhci.sys
Elapsed Time, > 0 usecs AND <= 1 usecs, 20269, or 99.95%
Elapsed Time, > 1 usecs AND <= 2 usecs, 0, or 0.00%
Elapsed Time, > 2 usecs AND <= 4 usecs, 11, or 0.05%
Total, 20280


Interrupt Info
Total = 20281 for module asmtxhci.sys
Elapsed Time, > 0 usecs AND <= 1 usecs, 20272, or 99.96%
Elapsed Time, > 1 usecs AND <= 2 usecs, 0, or 0.00%
Elapsed Time, > 2 usecs AND <= 4 usecs, 9, or 0.04%
Total, 20281

Conclusion: i've never seen such a robust USB driver implementation. This ASMedia controller is extremely good.
The ASM3142 is definitely capable of supporting 8kHz mice with ease, while providing amazing DPC latency and consistent interrupts.
But, only with the ASMedia driver. The MS stock driver should be avoided.

A two scenarios, in which you could run onboard chipset solution and external controllers such as the ASM3142 (if getting 4 port card) are:

- Mouse on onboard, while keeping devices such as keyboards, USB Audio input or output on the ASM3142
- Keyboard on onboard, Mouse & USB Audio on ASM3142
- From further testing, putting every USB device (mouse, KB, audio) on ASMedia might not even be a bad idea either, especially considering that keyboards can cause nasty dpc & isr spikes too.

The Renesas uPD720202 can be used for non-mousing devices, as they're also a decent option.

As for which specific PCIe card I can recommend, if someone would like to add this controller to their motherboard. I cannot say.
There are loads of variants available, all of which have different electrical properties and schemas.

A few cards I've found:
http://ableconn.com/products_2.php?gid=160 (PCIe 3.0 x4, dual channel, 4 ports)

https://www.inateck.com/products/pcie-t ... ku5211-red (single channel, 5 ports - 2xUSB-C & 3xUSB-A, PCIe x4)
Uses VL822 bridge for adding more than 2 ports, I haven't explored the significance of bridges in polling stability
UPDATE (03/2024): USB hub controllers (bridges) worsen mouse polling rate and this specific card has issues sustaining 8khz, being in 2-4khz range (been tested & confirmed)

https://www.aliexpress.com/item/1005005197687501.html (seems to be the same as above)

https://www.aliexpress.com/item/4001082689434.html (single channel, 2 port - USB-C & USB-A, PCIe x1)
I cannot, however, vouch for any of the cards mentioned above personally as I've not used any of them so YMMV.

https://www.amazon.com/dp/B0797HL9Z3/re ... =UTF8&th=1 (dual channel, 4 port, HighPoint makes quality cards)

Other useful information
https://forums.macrumors.com/threads/us ... o.1501482/ (great thread on PCIe cards, disregard the MacOS parts)


Still on to-do list
- Test other host controllers such as: Thunderbolt (JHL7540, JHL8540, they require external TB hook tho), older ASMedia (1042,1142,2142), USB-C ports of GPUs (on some Turing and RDNA1&2 cards for instance), the new USB4 controllers such as the ASM4242.

Side-note: I don't think it's worth looking into older controllers (such as the uPD720200F or USB2.0 controllers) due to archaic drivers which are very likely missing MSI capabilities or some hard to get PCIe cards with xhci controllers from companies such as Texas Instruments, Etron, Zhaohin etc.
I might be completely in the wrong though.

- Figure out the significance of different bridge controllers, hub controllers in polling stability & DPC, ISR latency

- How much electrical noise and grounding impacts Mousetester graphs (a few anecdotal tests seem to suggest a big impact, nothing confirmed yet tho)
Last edited by kyube on 09 Mar 2024, 09:22, edited 13 times in total.

mago
Posts: 78
Joined: 05 Sep 2022, 11:28

Re: evaluating xhci usb controller performance

Post by mago » 20 Sep 2023, 15:55

mb win11 would be better to test with
in latest updates ms improve the stutters in high end mouses

viewtopic.php?f=10&t=12157

great analysis ty

edit:

i just installed ASMedia USB 3.1 eXtensible Host Controller - 1.10 (Microsoft)
and played few games cs2 valorant seems better
Last edited by mago on 16 Nov 2023, 02:30, edited 5 times in total.
Ⓢк𝕀lŁ เ𝓢 ᵗⒺм𝕡σr𝐀𝐑Ⓨ, lά𝔾 I𝐬 F𝔬ʳ𝔢𝓿ᗴ𝔯

User avatar
imprecise
Posts: 277
Joined: 16 Nov 2022, 13:47

Re: evaluating xhci usb controller performance

Post by imprecise » 20 Sep 2023, 17:40

Thank you for sharing this... Please keep going!

thizito
Posts: 13
Joined: 14 Mar 2014, 09:46

Re: evaluating xhci usb controller performance

Post by thizito » 21 Sep 2023, 22:41

awesome! lets all ******* looking at useless graphs from awful mousetester software
that is as bad as latencymon

User avatar
imprecise
Posts: 277
Joined: 16 Nov 2022, 13:47

Re: evaluating xhci usb controller performance

Post by imprecise » 22 Sep 2023, 03:20

thizito wrote:
21 Sep 2023, 22:41
[REDACTED] mousetester software that is as bad as latencymon
If the testing method remains the same, we can find useful data even if the software is providing inaccurate information. That being said, establishing a test method that remains the same can be quite difficult.

User avatar
kyube
Posts: 134
Joined: 29 Jan 2018, 12:03

Re: evaluating xhci usb controller performance

Post by kyube » 22 Sep 2023, 08:03

thizito wrote:
21 Sep 2023, 22:41
awesome! lets all ******* looking at useless graphs from awful mousetester software
that is as bad as latencymon
This is why I've included a note in the the thread itself.
NOTE:MouseTester graphs results depend on variables such as electrical noise & grounding, along with Windows version, BIOS settings etc. Do not assume your graphs will look like this. The graphs are just used for testing whether IMOD is applied at higher polling rates. (such as was the case with the Renesas controller >500hz)
Mousetester is not a 100% reliable way for measuring overall performance, it's just for quick testing.
You're free to provide a better alternative for testing how polling rate behaves.

thizito
Posts: 13
Joined: 14 Mar 2014, 09:46

Re: evaluating xhci usb controller performance

Post by thizito » 23 Sep 2023, 01:45

depth of knowledge requires money
:roll:
unless someone enlights and surprises me, its an useless topic

mp$
Posts: 2
Joined: 14 Aug 2023, 08:03

Re: evaluating xhci usb controller performance

Post by mp$ » 23 Sep 2023, 03:21

thanks for sharing.
Currently using Z390 dark (which has two USB controllers - one intel and one ASMedia), and my results pretty much cover your post. Im using the intel for kb+audio and the ASMedia for the mouse (RVMSE), polling is amazingly stable even on 8khz and win 10 1809.

Slender
Posts: 612
Joined: 25 Jan 2020, 17:55

Re: evaluating xhci usb controller performance

Post by Slender » 23 Sep 2023, 13:20

thanks for this thread!
im test some controllers (and im order pci 1x asm controller).
Im write my conclusions about it:

1) MCS9990 - usb 2.0 controller with 4 usb 1.1 hubs, and 4 usb 2.0 hubs. This controller use old line-based interrupts and it good to use with mouse only. DPC / ISR is worse then default intel / amd usb, but moustester stability is same.
Im prefer use that controller only for usb 1.1 mouse (1000hz), because i have instant dpc / isr spikes with usb 2.0 mode (idk, maybe it only with my msi z790). For simple is good controller for old motherboards like z390/z490. It work good with my old asus z690, but worse with my new msi z790. Bad for sound (a lot of dpc / isr).

2) NEC v1/v2 -
nec v1 is good for mouse, but you have 996hz-1004hz jitter on mouse (default wdf), and 1000-500-1000-500 drops with renesans driver.
(500hz work perfect with driver), 495-505 with def wdf.
nec v2 - bad for mouse (high jitter), 970-1030, same with driver. This controller is good for audio devices, but intel controller have little less dpc vs nec (v1/v2). Basically use MSI-X and work on all cores on your pc (you can use interrupt affinity to lock driver to 1 core).

3) VIA - this is like nec, but for my test it have jitter 1000-500-1000-500 (with / without driver)
maybe good for audio, but im dont test it.

Best way for now - use Internal GL usb 2.0 chip for mouse and use usb intel chipset for audio / keyboard.

im review asm soon.

I also want to say that there are usb controllers that connect via the m2 line, in theory you can use this on intel motherboards instead of nvme (to bypass the chipset), but all I found was VIA and NEC v2, which do not work well with the mouse. We need a usb m2 controller on an ASM chip, but I can't find it.
Last edited by Slender on 23 Sep 2023, 13:37, edited 2 times in total.

Slender
Posts: 612
Joined: 25 Jan 2020, 17:55

Re: evaluating xhci usb controller performance

Post by Slender » 23 Sep 2023, 13:23

thizito wrote:
21 Sep 2023, 22:41
awesome! lets all ******* looking at useless graphs from awful mousetester software
that is as bad as latencymon
I really appreciate people who contribute to the community, and I hate people like you who have contributed literally nothing, but are among the first to express their unnecessary opinions.

Post Reply