* sendfile support in linux
@ 2003-01-28 1:45 Stanley Yee
2003-01-28 9:32 ` Gianni Tedesco
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Stanley Yee @ 2003-01-28 1:45 UTC (permalink / raw)
To: 'Gianni Tedesco', Stanley Yee; +Cc: Linux Kernel Mailing List
I'm trying to find out more about sendfile(2). So far, from what I've
gathered, it sounds like the requirements for it are (please correct me if
I'm wrong):
1. A kernel with sendfile support (i.e. 2.4.X)
2. A network card capable of doing the TCP checksum in the hardware
3. The application must support sendfile
Do you know what applications support zerocopy (sendfile)? I noticed that a
zerocopy NFS patch was added to the 2.5.x tree. Does the 2.4.X NFS daemon
support zerocopy? Does samba support zerocopy and if so what version?
Only me,
Stanley Yee
-----Original Message-----
From: Gianni Tedesco [mailto:gianni@ecsc.co.uk]
Sent: Thursday, January 23, 2003 1:14 AM
To: Stanley Yee
Cc: Linux Kernel Mailing List
Subject: Re: Zero copy in 2.4 kernels
On Wed, 2003-01-22 at 01:48, Stanley Yee wrote:
> Is the zero copy function enabled by default in the 2.4.X kernels? If so
> which kernel version and what do I need to do to enable it? Thanks for
your
> time.
sendfile(2) does zero-copy writes from files to sockets, works on any
version of 2.4 AFAIK.
HTH
--
// Gianni Tedesco (gianni at scaramanga dot co dot uk)
lynx --source www.scaramanga.co.uk/gianni-at-ecsc.asc | gpg --import
8646BE7D: 6D9F 2287 870E A2C9 8F60 3A3C 91B5 7669 8646 BE7D
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: sendfile support in linux
2003-01-28 1:45 sendfile support in linux Stanley Yee
@ 2003-01-28 9:32 ` Gianni Tedesco
2003-01-28 13:16 ` jlnance
2003-01-28 17:22 ` Oliver Xymoron
2 siblings, 0 replies; 4+ messages in thread
From: Gianni Tedesco @ 2003-01-28 9:32 UTC (permalink / raw)
To: Stanley Yee; +Cc: Linux Kernel Mailing List
[-- Attachment #1: Type: text/plain, Size: 1081 bytes --]
On Tue, 2003-01-28 at 01:45, Stanley Yee wrote:
> I'm trying to find out more about sendfile(2). So far, from what I've
> gathered, it sounds like the requirements for it are (please correct me if
> I'm wrong):
>
> 1. A kernel with sendfile support (i.e. 2.4.X)
> 2. A network card capable of doing the TCP checksum in the hardware
> 3. The application must support sendfile
Those are the user requirements yes. Of course the programmer only needs
to assume (1) to start writing applications. Oh and its probably worth
mentioning:
4. You can't do zero-copy receive.
> Do you know what applications support zerocopy (sendfile)? I noticed that a
> zerocopy NFS patch was added to the 2.5.x tree. Does the 2.4.X NFS daemon
> support zerocopy? Does samba support zerocopy and if so what version?
Samba, tux2, apache?, all the big stuff.
Dunno about NFS.
--
// Gianni Tedesco (gianni at scaramanga dot co dot uk)
lynx --source www.scaramanga.co.uk/gianni-at-ecsc.asc | gpg --import
8646BE7D: 6D9F 2287 870E A2C9 8F60 3A3C 91B5 7669 8646 BE7D
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: sendfile support in linux
2003-01-28 1:45 sendfile support in linux Stanley Yee
2003-01-28 9:32 ` Gianni Tedesco
@ 2003-01-28 13:16 ` jlnance
2003-01-28 17:22 ` Oliver Xymoron
2 siblings, 0 replies; 4+ messages in thread
From: jlnance @ 2003-01-28 13:16 UTC (permalink / raw)
To: linux-kernel
On Mon, Jan 27, 2003 at 05:45:20PM -0800, Stanley Yee wrote:
> I'm trying to find out more about sendfile(2). So far, from what I've
> gathered, it sounds like the requirements for it are (please correct me if
> I'm wrong):
>
> 1. A kernel with sendfile support (i.e. 2.4.X)
> 2. A network card capable of doing the TCP checksum in the hardware
> 3. The application must support sendfile
I believe that 2 is only necessary for zero-copy sendfile. The system
call will work regardless of whether the network card does the TCP
checksum or not.
Thanks,
Jim
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: sendfile support in linux
2003-01-28 1:45 sendfile support in linux Stanley Yee
2003-01-28 9:32 ` Gianni Tedesco
2003-01-28 13:16 ` jlnance
@ 2003-01-28 17:22 ` Oliver Xymoron
2 siblings, 0 replies; 4+ messages in thread
From: Oliver Xymoron @ 2003-01-28 17:22 UTC (permalink / raw)
To: Stanley Yee; +Cc: Linux Kernel Mailing List
On Mon, Jan 27, 2003 at 05:45:20PM -0800, Stanley Yee wrote:
> I'm trying to find out more about sendfile(2). So far, from what I've
> gathered, it sounds like the requirements for it are (please correct me if
> I'm wrong):
>
> 1. A kernel with sendfile support (i.e. 2.4.X)
> 2. A network card capable of doing the TCP checksum in the hardware
> 3. The application must support sendfile
Don't confuse sendfile with zerocopy. You generally need to use
sendfile to take advantage of zerocopy, but you can still get
advantages from sendfile without having hardware support, mainly in
terms of reducing syscall overhead. And without sendfile, you can
still get performance benefits from zerocopy..
> Do you know what applications support zerocopy (sendfile)? I noticed that a
> zerocopy NFS patch was added to the 2.5.x tree. Does the 2.4.X NFS daemon
> support zerocopy? Does samba support zerocopy and if so what version?
Sendfile is mostly used by webservers. You can check the Samba
changelogs for when they started using sendfile. And 2.4 NFS doesn't
use zerocopy, AFAIK.
--
"Love the dolphins," she advised him. "Write by W.A.S.T.E.."
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2003-01-28 17:13 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-01-28 1:45 sendfile support in linux Stanley Yee
2003-01-28 9:32 ` Gianni Tedesco
2003-01-28 13:16 ` jlnance
2003-01-28 17:22 ` Oliver Xymoron
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox