An empty IPv4 packet is 20 bytes, and an empty IPv6 packet is 40 bytes. An empty TCP header is 20 bytes. Therefore, if you want to send a single byte over TCP, you need 41 bytes over TCP/IPv4, or 61 bytes over TCP/IPv6.
Let's call that 64 bytes/packet for a small packet.
For comparison, a copper-wire non-broadband modem in the early '90s ran at 33.6kbps (kilobits/sec) which worked out at 4.1KiB/s. So a packet every 20ms wouldn't even saturate 30-year old modem tech. And believe me, that was slooooooow!
I went from 2400 to 14.4; 9600 was the limit before trellis modulation, but IIRC it jumped from 14.4 to 33.6 rather quickly.
[edit]
After some quick googling, 33.6 wasn't standardized until 1996 (compare to 14.4 in 1991), but the manufacturers released modems ahead of the V.34 standard with DSPs so that they could be upgraded to the standard when it was available.
14.4 did catch on almost overnight in the early 90s though as the modems were no more expensive (and sometimes cheaper) than slower modems.
But slow forced people to use their brains. Around 2002 I did WFH using some 30 kbit/s practical speed. My X11 desktop was shared pixel-accurate with decent response times over VNC.
20 years later if someone shares their code over Google Meet I see some blurred stuff. And red font takes 3 seconds to become clear.
I didn't read the code, but as I understood it, it was more like a frame rule ("imagine a bus stop..."), where your keystrokes will be delayed/buffered for a few milliseconds and then sent in regular 20ms interval bursts
TCP has an overhead of 20 bytes. I'm not sure how much openssh adds, but if it's just a keystroke I can't imagine it'd be over 64 bytes. Add those together and multiply by 50 packets per second (20ms between each packet), and it works out to a whopping 4.2kB/s.
An empty IPv4 packet is 20 bytes, and an empty IPv6 packet is 40 bytes. An empty TCP header is 20 bytes. Therefore, if you want to send a single byte over TCP, you need 41 bytes over TCP/IPv4, or 61 bytes over TCP/IPv6.
Let's call that 64 bytes/packet for a small packet.
20ms/packet = 50 packets/sec = 3200 bytes/sec = 3.125KiB/s.
For comparison, a copper-wire non-broadband modem in the early '90s ran at 33.6kbps (kilobits/sec) which worked out at 4.1KiB/s. So a packet every 20ms wouldn't even saturate 30-year old modem tech. And believe me, that was slooooooow!
In the early 90's I was still using 2400 baud, maybe 9600
I went from 2400 to 14.4; 9600 was the limit before trellis modulation, but IIRC it jumped from 14.4 to 33.6 rather quickly.
[edit]
After some quick googling, 33.6 wasn't standardized until 1996 (compare to 14.4 in 1991), but the manufacturers released modems ahead of the V.34 standard with DSPs so that they could be upgraded to the standard when it was available.
14.4 did catch on almost overnight in the early 90s though as the modems were no more expensive (and sometimes cheaper) than slower modems.
You kids and your high-speed 2400 baud modems. When I was dialing up, we had 300 baud AppleCats and we liked it.
1 reply →
I remember 56k (V90!) in the late 90s. I can't remember when 36k came in, though.
1 reply →
But slow forced people to use their brains. Around 2002 I did WFH using some 30 kbit/s practical speed. My X11 desktop was shared pixel-accurate with decent response times over VNC.
20 years later if someone shares their code over Google Meet I see some blurred stuff. And red font takes 3 seconds to become clear.
The US hasn't really improved infrastructure since the 90s though. So yeah, it's slow, but it's also still that slow for many people.
yeah, keeping the total bandwidth used to be less than a dialup modem connection was an explicit goal when choosing the 20ms default interval.
Only while you are typing and for a random time period after you stop. 50 packets per second, while I'm typing, doesn't seem like too many packets.
OK, it wasn't very clear if this was all the time or what.
I didn't read the code, but as I understood it, it was more like a frame rule ("imagine a bus stop..."), where your keystrokes will be delayed/buffered for a few milliseconds and then sent in regular 20ms interval bursts
Fortge chaff packets, sure. But aggregating keystrokes for 20 ms into one packet may save data.
I can type pretty fast (100+ WPM) but I'm sure as hell not getting multiple keystrokes into a 20ms window
Guess that'd depend on how big the packet ends up being.
TCP has an overhead of 20 bytes. I'm not sure how much openssh adds, but if it's just a keystroke I can't imagine it'd be over 64 bytes. Add those together and multiply by 50 packets per second (20ms between each packet), and it works out to a whopping 4.2kB/s.