On 02/17/2017 07:04 AM, Daniel Lescohier wrote:
Is the high-level issue that: for serving static content over HTTP, you can use sendfile() from the OS filesystem cache, avoiding extra userspace copying; but if it's SSL, or any other dynamic filtering of content, you have to do extra work in userspace?
Yes -- there are a bunch of potential high-level issues, but the one you've highlighted is the reason that I wouldn't expect our HTTPS implementation to ever get as fast as HTTP for static responses. At least not given the current architecture.
(There are potential kernel-level encryption APIs that are popping up; I keep hoping someone will start playing around with AF_ALG sockets. But those aren't magic, either; we still have to layer TLS around the encrypted data.)
That said, that's not what I'm trying to focus on with this thread. I have a feeling our performance is being artificially limited. `EnableMMAP on` appears to boost performance for static files, yes, but is that because of mmap() itself, or because our bucket brigades configure themselves more optimally in the mmap() code path? Yann's research is starting to point towards the latter IMO.
--Jacob