■
NFSではsendfile(2)は効かないと理解しているのだけど本当の所はどうなのか。
man 2 sendfileだと
Presently (Linux 2.6.9): in_fd, must correspond to a file which supports mmap(2)-like operations (i.e., it cannot be a socket); and out_fd must refer to a socket.
とあるので、ソケット経由でのsendfileはできないと思うのだけども。
http://httpd.apache.org/docs/2.2/en/mod/core.html#enablesendfile
With a network-mounted DocumentRoot (e.g., NFS or SMB), the kernel may be unable to serve the network file through its own cache.
とあるけれど、このown cacheはNFSクライアントのキャッシュのことだよなぁ… それって一度はNFSサーバーから読み込んだ後の話な気がする。
要は画像ファイルのダウンロードでsendfile(2)を使って性能を稼ぎたいのだけど、置き場所としてNFSを使ってよいのだろうか?使えるといろいろ楽なのだが多分駄目だよねぇ、とかそういう。