--On June 16, 2006 10:43:04 AM +0300 Ben Hathaway <ben.hathaway@xxxxxxxxxxxxx> wrote:
Dear All, I have recently set up a Squid cache using WCCP and a cisco router. I am getting very impressive performance for my cache hits, but my cache misses sometimes take as long as 4 seconds! We are at the end of a high bandwidth, high latency satellite link with a normal latency (for example: to google.com) of around 600ms round-trip. So why the 4 second delay? Sometimes it comes down to 1.3sec but even that is a lot slower than I would expect when my cache hits are being pumped out in 0.017s Any ideas?
Everything sounds fine to me...it can easily take 4*RTT to start getting data across a link. 3*RTT to establish the TCP/IP connection, then about one more RTT to send your HTTP request upstream.
What you might want to do is try tuning your squid servers TCP window sizes to be quite a bit larger. I don't know what OS you're using but a little bit of google searching will find you an answer. You'll have two or more sysctl's or /etc/sysctl.conf entries or similar in order to adjust the window sizes.
At the latency you're seeing it's possible TCP has more data in-flight than it will normally allow, so it's stopping and waiting on the in-flight data, possibly even re-transmitting because it thinks data has been lost.