Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

Usb hubs, extension cables and latency

So I’m working on some cable management on my desk and I plan on getting a cheap usb hub for a few things that I often use and maybe even my mouse, but I feel like that might add latency for when I am in game. Or I was thinking about using a usb extension cable but I worry it might have the same possible issue with latency, or am I just wrong for thinking that (I would be happy to be wrong)

Link to post
Share on other sites

I have not seen any extra latency, but it's milliseconds. It's not a problem for work, but hub will not help with cable management. You will have an extra point of failure, mouse or hub itself could disconnect while you are doing something time sensitive.

Wireless mice have come a long way, LTT reviews them all the time.

I don't play shooters, nothing wrong with games that only require keyboard.

Link to post
Share on other sites
7 minutes ago, RageTester said:

It's not a problem for work, but hub will not help with cable management.

Sure it will/can. You can bundle up things in a much neater way when you only need to run one cable to your computer instead of, say three.

 

But it's true that the increased latency is irrelevant when talking about keyboards and mice and the likes. The bandwidth they use is really minimal in the first place.

Link to post
Share on other sites

The added latency wont be an issue. Theoretically it will increase latency but you will need lab equipment to measure it.

 

What I would recommend is getting a USB hub with a separate power adapter. Mother board USB power can be unstable and if you plug too much stuff into one hub it can become funky.

Link to post
Share on other sites

The default mouse and keyboard polling rate is 125 Hz.... that means the operating system receives updates from the mouse every 1000ms / 125 =  8ms. Unless they changed things in the latest usb standards, the maximum polling rate is 1000 Hz , or 1 update every ms. 

 

So it may take up to 8ms for the game or application to be notified mouse did something, then let's say it may take up to 1-2 ms or so for the application/game to actually do something with the input... in worst case scenario it may take as long as the game renders a frame (if your game runs at 60 fps, that would be around 16ms)

 

The hub controller polls the mouse 125 times a second (or more, if the mouse requests a higher polling rate) and queues the events with the events from the other ports on the hub, giving priority to the events from devices that have higher priorities (ex a usb capture card may get a higher priority, low latency mode etc)

 

Then, the events queued in the usb hub controller chip wait until the computer polls the usb hub and requests the packets, so that can also take up to 8 ms.

So best case scenario, if your computer polls the hub at 125 Hz, your mouse movement reaches the usb hub chip just before the computer polls the hub controller chip, and then your latency is near 0  ( 0 from mouse to hub , near 0 from hub to pc). Worst case scenario, your mouse event is right after hub chip polls it, so it would take 8ms for the hub chip to ask mouse again, and then it could also take up to 8ms for hub chip to be polled by the computer - but such scenario is extremely unlikely.

 

Now, I personally didn't do any tests and I don't know, but I'd be comfortable saying that probably 90% of the time or more, a hub won't add more than 1-2 ms of latency, which again, based on 125 hz default polling rate, it wouldn't really be a big deal.

 

A hub may interfere with the polling rate, if the mouse wants to set the polling rate to 1000 hz but other devices on your usb hub can only do 125 Hz, then the usb hub may refuse and stick to 125 Hz.

Or the usb hub chip may be simply hardcoded to 125 hz, so the mouse will only send its changes every 8ms to the pc.

 

Most USB ports on the back of the PC can do around 2A of current - usually there's pairs of 2 ports behind a protection "fuse" configured to something a bit above 2A.  So basically any of the two ports can do up to 2A, but both can't exceed 2A in total. The default for regular USB 3 is 0.9A per port.

 

However, the problem is not the current, it's the voltage drop on the wires to the hub due to the resistance of the wires. If the cable has thin wires, the higher the current amount, the more voltage drop you're gonna have.

For example, let's say there's 1 meter of cable between the usb hub which uses standard AWG24 wires that have approximately 0.07 ohm per meter of resistance.

Knowing this, if the hub needs 1A of current,  you know there's 2 meters of wire between the hub and the pc (because electricity comes through the positive wire and goes back through negative wire) so you can calculate the voltage drop with the formula :

 

Voltage loss = Current x Resistance   which is equal to  1A of current x 2 meters x 0.07 ohm = 0.14v

 

So, if the computer outputs 5v, the hub already gets only 4.86v when the devices connected to the hub consume 1A in total.

If there's another 1 meter cable from the usb hub to the device consuming 1A of current, there's another 0.14v loss in the cable, so that device only "sees"  4.72v which I believe is below the minimum allowed.

Solution is either using usb cables with thicker wires that have lower resistance, or to use separate power supply into the usb hub. 

 

Keep in mind though that cheap usb hubs with separate power supplies will usually have really poor quality power supplies, that's where they usually try to save money.

A lot of those noname usb hubs will actually have power supplies that are made using recycled 5v phone charger circuit boards, put in new plastic cases, with poor power quality, noisy, which can in extreme cases damage devices connected to usb hub.

 

Link to post
Share on other sites
1 hour ago, mariushm said:

The default mouse and keyboard polling rate is 125 Hz.... that means the operating system receives updates from the mouse every 1000ms / 125 =  8ms. Unless they changed things in the latest usb standards, the maximum polling rate is 1000 Hz , or 1 update every ms. 

 

So it may take up to 8ms for the game or application to be notified mouse did something, then let's say it may take up to 1-2 ms or so for the application/game to actually do something with the input... in worst case scenario it may take as long as the game renders a frame (if your game runs at 60 fps, that would be around 16ms)

 

The hub controller polls the mouse 125 times a second (or more, if the mouse requests a higher polling rate) and queues the events with the events from the other ports on the hub, giving priority to the events from devices that have higher priorities (ex a usb capture card may get a higher priority, low latency mode etc)

 

Then, the events queued in the usb hub controller chip wait until the computer polls the usb hub and requests the packets, so that can also take up to 8 ms.

So best case scenario, if your computer polls the hub at 125 Hz, your mouse movement reaches the usb hub chip just before the computer polls the hub controller chip, and then your latency is near 0  ( 0 from mouse to hub , near 0 from hub to pc). Worst case scenario, your mouse event is right after hub chip polls it, so it would take 8ms for the hub chip to ask mouse again, and then it could also take up to 8ms for hub chip to be polled by the computer - but such scenario is extremely unlikely.

 

Now, I personally didn't do any tests and I don't know, but I'd be comfortable saying that probably 90% of the time or more, a hub won't add more than 1-2 ms of latency, which again, based on 125 hz default polling rate, it wouldn't really be a big deal.

 

A hub may interfere with the polling rate, if the mouse wants to set the polling rate to 1000 hz but other devices on your usb hub can only do 125 Hz, then the usb hub may refuse and stick to 125 Hz.

Or the usb hub chip may be simply hardcoded to 125 hz, so the mouse will only send its changes every 8ms to the pc.

 

Most USB ports on the back of the PC can do around 2A of current - usually there's pairs of 2 ports behind a protection "fuse" configured to something a bit above 2A.  So basically any of the two ports can do up to 2A, but both can't exceed 2A in total. The default for regular USB 3 is 0.9A per port.

 

However, the problem is not the current, it's the voltage drop on the wires to the hub due to the resistance of the wires. If the cable has thin wires, the higher the current amount, the more voltage drop you're gonna have.

For example, let's say there's 1 meter of cable between the usb hub which uses standard AWG24 wires that have approximately 0.07 ohm per meter of resistance.

Knowing this, if the hub needs 1A of current,  you know there's 2 meters of wire between the hub and the pc (because electricity comes through the positive wire and goes back through negative wire) so you can calculate the voltage drop with the formula :

 

Voltage loss = Current x Resistance   which is equal to  1A of current x 2 meters x 0.07 ohm = 0.14v

 

So, if the computer outputs 5v, the hub already gets only 4.86v when the devices connected to the hub consume 1A in total.

If there's another 1 meter cable from the usb hub to the device consuming 1A of current, there's another 0.14v loss in the cable, so that device only "sees"  4.72v which I believe is below the minimum allowed.

Solution is either using usb cables with thicker wires that have lower resistance, or to use separate power supply into the usb hub. 

 

Keep in mind though that cheap usb hubs with separate power supplies will usually have really poor quality power supplies, that's where they usually try to save money.

A lot of those noname usb hubs will actually have power supplies that are made using recycled 5v phone charger circuit boards, put in new plastic cases, with poor power quality, noisy, which can in extreme cases damage devices connected to usb hub.

 

 

Out of curiosity how cheap of a USB hub are we talking here?

Never had a USB hub kill a device before.

I did manage to kill a couple of USB ports on my motherboard with too long wires or something.

 

I typically use ANKER now for my USB needs as I like their fast charging but recently got one of these:

https://www.amazon.de/-/en/Splitter-Notebook-Netbook-Ultrabook-MacBook/dp/B01K7RR3W8/ref=sr_1_5?dchild=1&keywords=primewire+usb+hub&qid=1608984851&s=ce-de&sr=1-5

CSL Active USB 3.0 Hub with Power Supply

Any way to tell if the power delivery is garbage?

Have not set it up yet but you got me thinking. I recently got an expensive mechanical keyboard and was planning to plug it in now I am kind of dubious :D

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×