[Haskell-cafe] whatever happened to sendFile?
Brandon S. Allbery KF8NH
allbery at ece.cmu.edu
Wed Aug 13 15:49:24 EDT 2008
On 2008 Aug 13, at 15:26, Chaddaï Fouché wrote:
> 2008/8/13 Brandon S. Allbery KF8NH <allbery at ece.cmu.edu>:
>>
>> I should clarify: what sendfile() is supposed to optimize isn't
>> writing
>> large strings, or even the user<->kernel roundtrips; it's an
>> optimization to
>> the kernel network stack (network buffer management, to be
>> specific). Web
>> servers use it to serve static content (e.g. icons, images,
>> stylesheets)
>> because it significantly reduces system load.
>>
>
> Ok, so it could still be useful in a restricted area (but then it
> should be easy to write a FFI wrapper for it anyway).
Right. I intended that to be a heads-up in both directions: it is not
simply a library convenience function, so one needs to think about
when to use it. In particular, it's possible that overuse of
sendfile() in the wrong circumstances will create additional system
load instead of reducing it.
--
brandon s. allbery [solaris,freebsd,perl,pugs,haskell] allbery at kf8nh.com
system administrator [openafs,heimdal,too many hats] allbery at ece.cmu.edu
electrical and computer engineering, carnegie mellon university KF8NH
More information about the Haskell-Cafe
mailing list