Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 21 Mar 2010 08:21:25 +0300
From:      Alexander Bubnov <alexander.bubnov@gmail.com>
To:        Bruce Simpson <bms@incunabulum.net>
Cc:        freebsd-net@freebsd.org
Subject:   Re: why zero-copy sockets(9) are not popular?
Message-ID:  <c3e287ff1003202221p15fe6da8gce813c5889e095e0@mail.gmail.com>
In-Reply-To: <4BA50BA1.5060401@incunabulum.net>
References:  <c3e287ff1003200306l162800bfgfc0eecec04401917@mail.gmail.com> <4BA50BA1.5060401@incunabulum.net>

next in thread | previous in thread | raw e-mail | index | archive | help
Bruce, many thanks for comprehensive answer!

2010/3/20 Bruce Simpson <bms@incunabulum.net>

> On 03/20/10 10:06, Alexander Bubnov wrote:
>
>> Hello, all!
>> Anybody knows why zero copy is not popular although this technique  allows
>> to increase performance of servers? It is very hard to find any examples
>> of
>> zero-copy for FreeBSD.
>>
>>
>
> Transmit is easy. Receive is hard.
>
> The whole concept of zero-copy revolves around being able to use
> page-flipping to map buffers in user and kernel space, to amortize the cost
> of copies across that system boundary.
>
> The compromise usually taken is to use the sendfile() API, or rely on TCP
> Segmentation Offload (TSO), much like Microsoft's Chimney stack does in
> Windows 7. Unfortunately, sendfile() only covers transmit. TSO only offloads
> up to the point where sockets hit the card; TSO can offload TCP stream
> reassembly, but you still have to copy from the kernel buffers into
> userland.
>
> True zero-copy sockets generally require scatter/gather DMA engine support,
> and TCP/IP header splitting, to do zero-copy recieve.
>
> S/G PCI DMA cores are often custom designed, and you tend not to find them
> in off-the-shelf VHDL libraries. That IP (as in intellectual property) still
> has cost.
>
> Historically the only cards in FreeBSD which supported this, were the
> Tigon-II, which got bought by Broadcom (bge is the Tigon-III). Modified
> firmware was required to do this.
>
>
> _______________________________________________
> freebsd-net@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-net
> To unsubscribe, send any mail to "freebsd-net-unsubscribe@freebsd.org"
>



-- 
/BR, Alexander



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?c3e287ff1003202221p15fe6da8gce813c5889e095e0>