[Haskell-cafe] whatever happened to sendFile?

Brandon S. Allbery KF8NH allbery at ece.cmu.edu
Wed Aug 13 18:29:47 EDT 2008

On 2008 Aug 13, at 18:25, Jason Dusek wrote:

> Brandon S. Allbery KF8NH <allbery at ece.cmu.edu> wrote:
>> 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.
>  Can you say more about this? I assume that sending static
>  images back and forth is a good fit for sendfile().

Your previously stated use case sounds like a good fit.  I can easily  
imagine sendfile() implementations starving other network operations,  
though (and IIRC linux's early sendfile() implementation did so).   
It's essentially an optimization specific to web servers.

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