Hacker News new | past | comments | ask | show | jobs | submit

My monitor was cutting my download speed by 75%

https://blog.tymscar.com/posts/studiodisplayethernet/
This reminds me of a (completely different, but felt equally) bizzare problem with ghostty (the terminal emulator) on Linux and Steam, specifically Baldur's Gate 3.

At the start of the game after an update, BG3 compiles the (Vulkan) shaders. To avoid hammering the computer, it checks the load, including I/O pressure, and then throttles itself. It turns out that Ghostty uses io_uring, and even if it's not doing anything this somehow counts as pressure. This was made worse by the fact that I usually have a dozen or so Ghostty windows.

End result, BG3 compiles shaders using 1 core, throttled, instead of all available 20 cores. Instead of a minute or so, it'd take several hours.

(For closure: I configured ghostty to use epoll instead. Probably not optimal but works around the problem.)

loading story #50590071
loading story #50589442
Meta:

> Somehow I am one of those few very lucky people to have the opportunity of owning a 2.5 gig symmetrical line for my internet.

I'm not going to complain against more bandwidth (as a GenXer I stared my online journey at (IIRC) 9600bps (maybe lower): much celebration with V.32/V.90), but I'm curious to know how many residential use-cases can take advantage of that much bandwidth. Linux ISOs?

How many services allow that much speed on a single stream / (TCP) session? Maybe you could have five at 500 Mbps?

Certainly downloading security updates or games may be quicker, but I would think that above 500Mbps (and certainly 1 Gbps) there would be major diminishing returns. Is anyone regularly getting close to that utilization in their daily work / hobbies (and not just a momentary spike on patch Tuesday)?

Torrents, and things like downloading games from Steam feel really good if you have a very strong connection. A lot of games can be downloaded in the time it takes to go grab a drink from the fridge. It adds some nice quality of life, there isn't as much need to keep a large downloaded set - just download when you need it, and it'll be there quickly.

I think going from something like 100 Mb download to 1 Gb is slightly overrated. You hit heavy diminishing returns. Symmetric Upload, for me, is what really changes your quality of life a lot. Uploading a youtube video suddenly isn't an event, it takes a few seconds. Want to upload an image in any chat? Done before you consciously see it uploading. Heavy commits are instant, even with a bunch of resources. It changed my behavior. I started uploading more stuff to remote servers because the cost in time got so much lower.

loading story #50589819
loading story #50593216
loading story #50589795
loading story #50592136
loading story #50590266
loading story #50592705
loading story #50592063
loading story #50590666
loading story #50589613
loading story #50591235
loading story #50591857
loading story #50591502
loading story #50589744
loading story #50592057
loading story #50589971
loading story #50589741
loading story #50593092
loading story #50591652
loading story #50589751
loading story #50589632
loading story #50589978
loading story #50592814
loading story #50591101
loading story #50589607
loading story #50590572
I have nothing useful to add other than I feel so validated reading this. Ive been struggling with this issue on and off for over a year. With the release of Astra, it was able to finally unstick me to the point of enabling flow control which has been good enough.

I experienced this problem with a macbook and a thunderbolt dock. I had tried multiple different brands of docks and ethernet adapters, and various macbooks. One interesting thing I discovered is if I plugged a non-thunderbolt cable between the dock and the laptop, I would achieve full speed with no packet loss, so interestingly the issue doesn't occur over pure USB but only over thunderbolt.

This has got to be a bug on Apple's side right? Would be nice if they fixed it.

loading story #50591364
loading story #50590712
loading story #50592887
loading story #50591357
loading story #50591966
loading story #50592303
loading story #50592070
loading story #50593153
loading story #50590219
Nice post. Unsatisfying conclusion - did you ever figure out why the original adapter was throttled when plugged into the monitor, and not when plugged into the computer?
The additional latency from going through the monitor made the bandwidth-delay product exceed the amount of data the adapter was able to send before receiving an ack. I thought that was fairly clear from the explanation, but now I notice that he didn't mention the latency without the monitor.
That doesn't seem to be described by the article at all.

The latency added in the monitor is described as around 8 us, completely negligible compared to any Internet connection's latency.

So the latency without the monitor should be completely irrelevant.

loading story #50591715
The article answers this

"if the speed of the drain from my adapter to my Mac is half a gig slower than the speed of the input, then you can imagine the buffer getting filled more and more until it overflows. Those are dropped packets, which result in a hard backoff when the router resends them, so you drop loads in speed. And that’s the reason for all of this."

With diagram https://blog.tymscar.com/studio-display-ethernet/bottleneck....

The monitor decides to send the adapter's packets on at only 2 Gbit/s, which leads to buffer overflow, thus packet loss, thus e.g. TCP congestion-control backoff.

The only thing we don't know is _why_ the monitor chooses to limit the bandwidth to those 2.07 Gbit/s (computed as the 41 KiB blocks per (7.6+8.2) µs). If it sent e.g. 81 KiB blocks, doubling the bandwidth, the problem wouldn't happen.

That'd be between Apple and the monitor.

I’m guessing it’s a USB bandwidth issue. I learned about these kind of limitations when I tried to have 3 kinects running at the same time on the same USB bus.
> I’m guessing it’s a USB bandwidth issue

It's explicitly not a bandwidth issue (that would also affect the SSD). It's a latency issue - the chip doesn't have a big enough buffer to keep sufficient packets in flight at once.

> It's explicitly not a bandwidth issue

That's explicitly the opposite of what the author says.

"the speed of packets coming into the adapter is 2.5 Gbps. That’s what the router pushes in. The speed going out is around 2 Gbps."

Of course latency is always on the denominator side in the "bandwidth = data / time" equation, but it seems wrong to claim it's latency when it could also be improved by fixing the numerator; it's the entire fraction that's insufficient, thus bandwidth. As written:

"The reason is that if you add up the average time it takes to get the go-ahead through my monitor’s hub, which is around 7.6 µs, to the average time it takes to send 4 KB, around 8.2 µs, you can find what the maximum speed is"

And later, increasing the numerator is exactly what fixes it with the other hardware: "I can see that instead of sending 4 1 KB packets per burst, it would send 8!"

> the chip doesn't have a big enough buffer to keep sufficient packets in flight at once

How does this make sense? Even if his buffer was 100x larger, if the fill bandwidth exceeds the drain bandwidth, it'll eventually fill up. The article says that explicitly:

"Well, if the speed of the drain from my adapter to my Mac is half a gig slower than the speed of the input, then you can imagine the buffer getting filled more and more until it overflows."

> Even if his buffer was 100x larger

"buffer" was perhaps a poor choice of words on my part, because "buffer" is ambiguous. In this case I am referring to the "transmit buffer", which is 4 in the non-working case and raised to 8 in the working adapter.

> Even if his buffer was 100x larger

"buffer" was perhaps a poor choice of words on my part, because "buffer" is ambiguous. In this case I am referring to the notional "transmit buffer", which is 4 in the non-working case and raised to 8 in the working adapter.

> "I can see that instead of sending 4 1 KB packets per burst, it would send 8!"

Increasing the number of packets in flight does not change the bandwidth, it only improves latency sensitivity (i.e. you can fire more data before requiring an ACK).

> it seems wrong to claim it's latency when it could also be improved by fixing the numerator.

Increasing the bandwidth without increasing the transmit buffer would not fix this issue. The adapter he ends up buying does both (allow 2x the packets in flight, and 2x the bandwidth).

The bottom line here is that the original adapter handles full duplex 2.5g when plugged into the laptop directly, and the SSD gets full duplex bandwidth in excess of 2.5g through the same intermediate link (i.e. the display), so both the adapter and the display have sufficient bandwidth. The added hop of latency however makes the short transmit buffer insufficient to cover the latency.

This primer on latency and bandwidth is 13 years old but still worth sharing (for the sake of all readers)

https://hpbn.co/primer-on-latency-and-bandwidth/

He states that high speed SSDs through the monitor are fine though.
Uploads were fine.
loading story #50592004
loading story #50589763
loading story #50592694
loading story #50592276
loading story #50591584
loading story #50590999
loading story #50589525
Could this be some kind of https://en.wikipedia.org/wiki/Bufferbloat problem?

Sure we are talking about a different level in the networking stack and very different protocols. But with every component you add things get less synchronous. Well, no buffering needs to involved by the middleman, the mechanism for the throttling could also be different. What do I know...

loading story #50590069
loading story #50593289
What a click-bait headline. The conclusion was that it was due to having a more bottlenecked USB-to-Ethernet adapter path. Would the same result have held with a discrete Thunderbolt 5 hub, either with a built-in 2.5 Gbps or faster Ethernet port or with the original USB-to-Ethernet adapter? Would it have held with another USB hub? Who knows -- just blame it on the expensive monitor!
loading story #50588977
loading story #50588936
loading story #50591943
loading story #50590848
loading story #50592185
I've encountered a similar problem, the wifi on a MacBook Air was dying once connected to a Dell monitor over USB-C. The wifi signal was going from full to nearly no signal. Connecting to the same monitor with a dongle and HDMI didn't have the same outcome. Never had a time to find the culprit. Probably EMI or bad grounding.
loading story #50589216
loading story #50590009
> So I thought I would do what any ~~human~~ apple user would do, and I spent more money on a new adapter.
loading story #50589170
loading story #50590719
loading story #50591145
loading story #50590099
loading story #50589292
loading story #50589254
loading story #50589166
loading story #50590148
loading story #50589595
loading story #50589400
loading story #50591299
loading story #50591187
loading story #50589303