On Tue, Feb 14, 2012 at 8:49 AM, billywhizz <[email protected]> wrote:
> Liam - i asked Ben about exposing the fd on the socket handle so linux > folks could use sendfile but it seems the core team don't really want > to do that. there was a mention of providing a sendfile and/or pipe > between two handles internally in the c++ code at some stage, but my > feeling was that this is some way off. my patch has nothing to do with > big changes to the c++ - it is just a patch to expose the fd so i can > pass it to the fs.sendfile system call. > > Matt - there's no need to be so rude, especially to one of the best > guys in the community. from what i understand nginx will cache small > files in memory if configured to do so and it will also use sendfile > if configured to do so. when using sendfile, there could be a blocking > operation if the file has not been cached by the kernel, but once it's > in memory then subsequent requests should be as fast as possible and > most of the work will be done in the kernel. the difference between > using sendfile from v8/node.js and directly from c/c++ is very small > from the testing i have done. getting close to nginx performance is > definitely achievable, but probably not using the standard node.js > libs (at least not right now anyway). the only way i have got good > performance is to use the c++ bindings directly along with sendfile. > i'll post up a benchmark asap which should shed some light on all > this. > Well put, Billy. Also Matt: please reread Tim's original message. Does nginx know anything about a git hash? Of course not. So even if it's cached it has to at least stat the file, right? -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines You received this message because you are subscribed to the Google Groups "nodejs" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/nodejs?hl=en?hl=en
