Sendfile

John Zedlewski zedlwski at Princeton.EDU
Wed Jan 5 06:02:20 GMT 2000


Hi, I'm totally new to this list, but I was wondering if you guys had
looked into the sendfile() system call to speed up file i/o.  The call
was added to Linux in the 2.2 kernel and also exists in recent versions
of HP-UX, AIX, and FreeBSD in a variety of forms.  Basically, it
eliminates the old "read fd1, write fd2" loop, replacing it with a
single call to directly blast a file (full or partial) to another file
descriptor.  The call generally tends to provide a marked speed
increase, especially for larger files.
  I've been working on a cross-platform (well, cross-Unix, it's very
nonstandard) implementation for the Apache 2.0 apr library that you
folks could certainly use if you're interested.  It's not done yet, but
I really just wanted to see if you'd looked into the possibility before.
Thanks,
--JRZ


More information about the samba-technical mailing list