apache / openwhisk

Apache OpenWhisk is an open source serverless cloud platform
https://openwhisk.apache.org/
Apache License 2.0
6.54k stars 1.17k forks source link

memory-based limit on concurrent invocations #4196

Open dgrove-oss opened 5 years ago

dgrove-oss commented 5 years ago

Because of the switch to memory-based allocation of invoker slots, we also need the ability to limit users based on the amount of memory concurrently used by their running actions. A user that wants to run 200 concurrent 128MB actions is significantly (16x) easier for an OpenWhisk deployment to satisfy than a user that wants to run 200 concurrent 2GB actions.

The implementation would parallel the current invocation-based counting of concurrent actions (but would increment/decrement by the action's requested memory instead of counting all actions equally as 1).

We should probably implement a separate memory-based concurrency limit initially, then consider whether we actually need both count-based and memory-based concurrency limits and perhaps deprecate the count-based limit.

mdeuser commented 5 years ago

not sure this is feasible, but perhaps this memory limit might be somewhat dynamic. that is, if the system is lightly loaded, allow the namespace to consume more memory than when the system is heavily loaded.

markusthoemmes commented 5 years ago

I'd move that discussion to the dev-list first. It was initially proposed when implementing the memory aware scheduling here:

https://lists.apache.org/thread.html/dfccf972bc1419fe48dbc23119441108c45f85d53625fd6f8fc04fcb@%3Cdev.openwhisk.apache.org%3E