[squid-users] peek and splice and splice()

Amos Jeffries squid3 at treenet.co.nz
Fri Oct 17 09:39:54 UTC 2014


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 17/10/2014 9:47 p.m., James Harper wrote:
> Just reading up on this, the Feature page 
> http://wiki.squid-cache.org/Features/SslPeekAndSplice says:
> 
> "... with Squid shoveling TCP bytes back and forth without any 
> decryption"
> 
> I can't see that squid actually uses the splice() system call, so 
> that would mean squid would actually read the data into userspace 
> then write it out again, is that right? I assume once this happens 
> it's the same code as a CONNECT.
> 
> What if there was a way to actually splice the two TCP connections
> at the kernel level so that Squid didn't actually need to be
> involved anymore, except when the connection closes to do the
> accounting? There appear to be a few historic attempts to implement
> this in the Linux kernel but I suspect they haven't been
> maintained.
> 
> And would this be a worthwhile optimisation anyway or is shunting 
> data not a significant part of squid load?

There is sendfile() IIUIC. Probably worthwhile, but to do it we have
to first drop the delay_pools feature which relies on each byte being
accounted as it is delivered.

For now I am working on it from a publicity standpoint, encouraging
people to go to the more efficient QoS controls outside of Squid. So
the popularity of delay pools drops down to a level we can start to
seriously consider alternatives to the current tunnel code.

Amos
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.22 (MingW32)

iQEcBAEBAgAGBQJUQOPpAAoJELJo5wb/XPRjJPwIAKALSISJLkEdfXA9njDMzjsC
WETJ7mDdBcRuJERk+rSGz3hYDou2Um/dAOsS9prZ/YFjTbh49XEwFflmvNh6yoOd
NjLoyNSt3S0Wh99//O0LjWBOiR7VNFVA8abIp3fFeM2jpOUx6VzJMez1XtShffoc
QkarUEZMzFdTkueh7vMpaiywmc3gN6jQvSEwuoDuvSExsW2fsj8HVSkahETfPsSl
5jgY8L4ztC7FY+/bh7oz3y3C3H925VxHkubHv1hHEd/GWqmspFN5l3qO3nBF0uuE
dRITLT/+Jg5VwLnRomUdXxu770tVzA8c8LY861KoDP3akxCWHhquu8UqAuUdBqE=
=UoPz
-----END PGP SIGNATURE-----


More information about the squid-users mailing list