On Wed, Nov 20, 2013 at 05:36:00PM -0500, Chris Burroughs wrote:
> Using 1.4.24 without USE_LINUX_SPLICE=1 results in an error when setting 
> 'defaults option splice-auto', and maxpipes is reported as zero.  This 
> makes sense.
> 
> With USE_LINUX_SPLICE=1 I get maxpipes == maxconn/4 as the docs say. 
> However, "current pipes" is always listed as 0/0, even under load.  Does 
> that mean that splice is not working (or not being used)?  Is there a 
> way to confirm splice it is working besides that metric?

That means that no pipes were allocated because not needed. It does not
mean it's not working because in order to detect that splice is not
working, you need at least one pipe. Thus it would be more suspicious
if you had "0/1" :-)

Splice-auto attempts to switch to splicing only when it seems to make
sense, which is when haproxy detects that buffers are read at once and
flushed at once. So that only applies to large transfers. If you download
a 1 MB object, it is very likely that the first few kB will be transferred
normally and that splice would be used afterwards. You can force to use
it for all responses whatever their size using "splice-response" if you
want to see it in action. Note that with a number of network cards, it
provides no gain and can even reduce the performance because of the
limit imposed by the pipe size (64k - 16 pages or 16 segments depending
on the driver).

> This is centos6 so it's kernel 2.6.32 + crazy RedHat stuff 
> (2.6.32-358.23.2.el6.x86_64).

It normally works on 2.6.32, even with RH stuff :-)

On 2.6.32, splicing works very well with certain NIC drivers such as
Myri10GE when you have LRO enabled on the NIC. For most other NICs
not supporting LRO, it might be useless. With more recent kernels
starting at 3.5 and onwards, GRO works much better than before with
splicing, to the point that it can be worth enabling even with
smaller objects and more NICs.

I could easily achieve 40 Gbps of forwarded traffic in 3.8 with 2
dual-port ixgbe NICs and LRO or GRO enabled. 

Willy


Reply via email to