5 ms·
> Networking takes by far the longest time to get ready. The main reason is that Ethernet auto-negotiation takes a significant amount of time, about 1 to 3 seco
by WatchDog 6y ago
> Networking takes by far the longest time to get ready. The main reason is that Ethernet auto-negotiation takes a significant amount of time, about 1 to 3 seconds.
Is this a fundamental limitation of how auto-negotiation works?
Is there a way to speed it up?
- mschuster91 6y agoSet fixed values for the speed (i.e. force 1 Gbit/s if you know there will be a capable cable). I'm not sure on if the feature that detects crossover cables can be switched off in userspace. As for the timing, as long as you don't specify speed / crossover detection you will always have some sort of physical link training and negotiation...
- derefr 6y ago> Physical link training and negotiation That still shouldn't take that long, though, should it? 3s sounds like some O(N^2) process is happening. Keep in mind that this stuff is happening close to the metal, on a nowadays-unshared medium (no Ethernet hubs around any more), with negligible speed-of-light delays because the nearest switch is probably ~100ft away at most. If some high-level protocol like Steam Link can have no perceivable latency, then certainly PHY negotiation shouldn't. My naive guess would be that the medium is speed-tested in order, first seeing if it works at 1Mbps, then 10Mbps, then 100Mbps, and finally 1Gbps; and alternating in the crossover-cable versions of those tests; satisficing with the last-achieved line rate when the next up-clocking fails. If that's the case, then I have a feeling that modern hardware could get a bit of an advantage just from doing things in the opposite order: 1. optimistically assuming everything is set up for 1Gbps, and then, if not, ratcheting down the link-speed until the link starts working; and 2. only doing the crossover-cable tests after all the non-crossover tests fail. You'd still have the same worst-case performance (3s) as before, but now that worst-case would be for old 1Mbps crossover cables: not a common case!
- icedchai 6y ago1 Megabit ethernet was never a thing.
- MertsA 6y agoPedantic but... 802.3e
- icedchai 6y agoOh, you are right! Do any modern network cards support this?
- MertsA 6y agoNot a chance. The claim that ethernet starts at 10Mbit is basically correct. It's not like StarLAN got the kind of adoption that thicknet or thinnet got. It came out after those two standards but was 1/10th the speed and AT&T put out StarLAN 10 just a year later.
- drcross 6y agoYou're forgetting delays on the switch side like spanning tree checks, arp table population, DHCP. But yeah, there's no reason it shouldnt be improved.
- AceJohnny2 6y agoNone of which are required for link-level autonegotiation, however. Those are later steps.
- deleted 6y ago[deleted]
- PinguTS 6y agoThere is a thing called: compatibility. Even when you don't have a hub anymore and Ethernet is not shared anymore, it is just a "anymore", which means it needs to respect those old things and need to test for it. BTW, even that Ethernet is not a shared medium anymore is wrong. In Industrial and Automotive Ethernet we are back at SPE (Single Pair Ethernet) and working shared medium, because switched Ethernet is way to expansive.
- T3OU-736 6y agoAt 1Gb/s and higher link speeds, there really is no such thing as disabling auto-negotiation. What you are setting are the _advertised_ speeds, but auto-negotiation still happens.
- rkagerer 6y agoCould it not start before the filesystem is available?