3 ms·
Guys, this is not traffic shaping by his ISP. I think it's just a poor calculation job by scp; I see this mis-estimation all the time when I copy a movie from
by jrockway 16y ago
Guys, this is not traffic shaping by his ISP. I think it's just a poor calculation job by scp; I see this mis-estimation all the time when I copy a movie from my desktop in my bedroom to my TV in my living room over 20 feet of Cat 6 cable. scp starts at about something 200MB/s and then eventually converges to the real speed of 30MB/s. There is no traffic shaping, but there is one write at the beginning that fills the kernel buffer without blocking. (Why does this get "bigger and bigger every year"? Because people are setting it bigger. By default, the tcp write buffer is something like 4k. I have mine set to ~512k.)
If you want to accurately measure your bandwidth, try iperf. Between my server on Slicehost and my desktop at home, I get about 6Mbps. And I pay for 6Mbps DSL. So there is not some conspiracy here, people are just measuring wrong. scp is not a benchmark.
- soult 16y agoThis is not scp's fault, it really is buffer bloat. It is noticeable in DSL connections, but it is worst with 3G connections. When I run some (down/up)loads via my UMTS dongle, I easily fill the buffer in my modem, the buffers at my ISP. I can still ping remote hosts, with a latency of up to 60 seconds. The problem is, TCP doesn't understand what happens, because the packets get acknowledged after all. Only eventually my TCP connections throttle themselves, and it reaches a somewhat stable balance where the buffer still introduces about 10 to 20 seconds of lag. The solution for me was to shape my own traffic on the edge of my "network" and to never let the buffer be filled in the first place. This leads to a much better ping (< 1 second) and a higher bandwidth utilization (when looking at the big picture).
- jrockway 16y agoDon't you think the slow part is the link between your modem and the ISP? My guess is that the buffer you are filling is your TCP write buffer. If I make mine tiny, then scp reports what my bandwidth actually is. I blame scp because it chooses a moving-average algorithm instead of an instantaneous rate-of-change measurement. I don't have this problem with my UMTS dongle; ping times are about half a second, but TCP works fine at this latency. You need a big buffer to keep the data flowing, though.