Hacker News new | ask | show | jobs
by hedora 2199 days ago
Ummm. Linux’s NFS client includes a kernel page cache.

You can just mmap or read the file without doing anything else. That is zero or one memcpy overhead.

S3 clients have to copy the data over the network, assemble the tcp packets, decrypt and checksum for ssl, and then memcpy the result. That’s at a minimum. They may be doing other work, like verifying the s3 checksum, or allocating memory to store the object.

They have to do that once per lambda process, again, at a minimum. They might do it once per lambda invocation.

I wonder how amazon bills DRAM if multiple lambdas mmap the same thing read only.

1 comments

Ummm, I'm pretty sure that before data from remote NFS server make it into kernel cache they too have to be copied over network, assembled from TCP packets, possibly decrypted (k5p) and verified (k5i) with NFS over Kerberos (otherwise you would have no confidentiality/integrity), and moved into newly allocated memory. Sure, once it is in kernel cache and data are not modified there may be just "Is this handle still up to date?" remote calls but you could achieve the similar cache with object storage.