[squid-users] irregular traffic when using proxy, not if NATed

Amos Jeffries squid3 at treenet.co.nz
Wed Feb 1 14:15:47 UTC 2017


On 31/01/2017 6:10 a.m., le dahut wrote:
> Hello.
> 
> On certain upload websites, the traffic monitor shows an irregular
> traffic when uploading through squid, while uploading NATed (not using
> squid) gives a regular traffic.
> 
<snip>
> 
> 
> Can you help me find out why ?
> 

The first thing that comes to my mind is that this type of bunching in
the traffic graph is a sign of buffer bloat. Simply by using Squid you
are adding two buffers in each direction for the traffic as the client
and server connections are buffered separately. Bloat related problems
show up worst for CONNECT tunnels and uploads in Squid.

Your config shows the Squid buffers to be the default 16-64KB each
though so not exactly overly bloated on a transfer of 1 MB/s for ~30sec
straight. Could be compounding an underlying problem though.

The other thing that comes to mind is a bug in mem_node handling for
large objects. Any transfer that can fill a 1MB/s pipe for ~30sec is in
the range of objects which will start to see effects of Squid searching
memory for the next block of data to send or memory to read into.


To track down the actual reason you will need to figure out what Squid
is doing during the transfer. You do that with debug_options.

Some info on profiling Squid is mentioned at:
 <http://wiki.squid-cache.org/SquidFaq/SquidProfiling>

If you can replicate the problem on a machine that is not under a lot of
traffic load at the time you could use debug_options directive to raise
the debug level - "debug_options rotate=1 ALL,6" should give a lot of
info about whats happening.


I recommend that if you can please upgrade to the later 3.5.23 package
that is available for Ubuntu in 16.04 Xenial or later. There are quite a
few performance related issues that have been resolved in the .12
release. Not having to figure it out at all would be nice if possible.

HTH
Amos



More information about the squid-users mailing list