4 ms·
> The functions being tested simply return the current time Not a very interesting benchmark. This would only measure net latency and spin-up time.
by mchahn 8y ago
> The functions being tested simply return the current time
Not a very interesting benchmark. This would only measure net latency and spin-up time.
- zackbloom 8y agoI have a post which should come out later in the week which dives into the performance with CPU-intensive workloads. tl;dr is that a 128MB Lambda is about 8x slower than a Worker.
- mayank 8y agoCan you also throw in some adversarial workloads? Simple proof of work using node’s builtin crypto module would be a nice benchmark for V8 isolates vs Lambda’s processes, and would go a long way convincing people that using isolates is reliable in a shared setting relative to processes/containers.
- zackbloom 8y agoCan you elaborate on this? How would doing crypto demonstrate the security of the isolate?
- mayank 8y agoNail the CPU and ensure that other isolates on the same process/machine don’t get starved. I meant isolation more than security.
- kentonv 8y agoDifferent isolates can run concurrently on different threads, so pegging the CPU in one isolate doesn't block any others. Also, if a worker spends more than 50ms of CPU time on a request, we cancel it, terminating execution of the worker even if it's in an infinite loop. (Almost all non-buggy Workers we've seen in practice use more like 0ms-2ms per request. Note this is CPU time; time spent waiting for network replies doesn't count.)