[lkml]   [2001]   [Jan]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: Is sendfile all that sexy?

> how would sendpath() construct the Content-Length in the HTTP header?

You'd still stat() the file to decide whether to use sendpath() to
send it or not, if it was Last-Modified: etc. Of course, you'd cache
stat() calls too for a few seconds. The main thing is that you save
a valuable fd and open() is expensive, even more so than stat().

> TCP_CORK is useful for FAR more than just sendfile() headers and
> footers. it's arguably the most correct way to write server code.

Agreed -- the hard-coded Nagle algorithm makes no sense these days.

> imnsho if you want to optimise static file serving then it's pretty
> pointless to continue working in userland. nobody is going to catch up
> with all the kernel-side implementations in linux, NT, and solaris.

Hmmm, there's a place for userland httpds that are within a few
percent of kernel ones (like Zeus is, when I last looked). But I
agree, hybrid approaches will become more common, although the trend
towards server-side dynamic pages negate this. A kernel approach is a
definite win if you're used to using a limited-scalability userland
httpd like Apache.


Jonathan Thackray Zeus House, Cowley Road, Cambridge CB4 OZT, UK
Software Engineer +44 1223 525000, fax +44 1223 525100
Zeus Technology

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
Please read the FAQ at

 \ /
  Last update: 2005-03-22 13:17    [W:0.220 / U:2.252 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site