by actionowl · 6y ago · 0 comments
I recall Joyent's solution to this (similar) problem where you have an object stored somewhere (e.g. S3) and you want to use that object in a container, but you have to copy it over HTTP or something to do any work on it and the object could be very large.
With Joyent's Manta[1] you would spin up a container right where an object is stored (instead of bringing the objects to the container via NFS.) Also has map reduce support.
This feature they did release deserves little fanfare.
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.