QUESTION :
I recently discovered that latency increases when a download or upload is in progress on my DSL line, sometimes quite drastically. Initially I thought there was a fault on the line but discovered the same thing happening on several other connections. On some connections the latency would increase from 10ms to an average of 100ms while downloading and 800ms while uploading, whereas other lines increased by a smaller margin.
Why does consistent traffic seem to increase latency?
NOTE: I realise that an increase from 10ms to 800ms is an indication of there being something wrong with the line but I’m wondering why I noticed similar behavior on other lines, even when the variance wasn’t so high.
ANSWER :
This increase in latency is likely due to bufferbloat. Wikipedia describes it as:
… a phenomenon in packet-switched networks, in which excess buffering of packets causes high latency and jitter, as well as reducing the overall network throughput.
You can use the ICSI Netalyzr to check if your network is suffering from bufferbloat.
Why does consistent traffic seem to increase latency?
Why does it take longer to drive across town when the traffic is heavy? Same reason. For a packet to cross a connection, it has to wait its turn.
Latency will increase no matter what, because by the very nature of download or upload, you are trying to use up as much of the available bandwidth as possible. Therefore, your request/response times will be slower as data packets start choking up the pipeline and potentially stalling whatever latency packet requests you are sending.
It may be that you have a bad line, but if the download/upload speed is not entirely affected, the best you can hope for is to change you ADSL profile if you have one to a lower latency setting via your ISP.
Otherwise, you may be hunting gremlins along your phone line which is always fun 🙂