Bounding resource usage in Docker apps: 5 pts
We can see it being useful to bound the resource usage of individual Docker deployed apps, for example in terms of RAM and CPU usage. Can we expose this functionality via dallinger docker-ssh deploy?
We could certainly expose this. I see these two options:
- add command line parameters to the
dallinger docker-ssh deploycommand to specify CPU/RAM limits for web and worker - define a file format to specify an "experiment deployment": this format will include the docker image name, the desired nunmber of worker and web processes, the RAM and CPU limits and other tunables related to deployment
The first option would be the fastest to implement, but it would also generate a lot of cumbersome to use options; I imagine --worker-max-ram 200Mb, --web-max-cpu=0.5 etc.
The second option would take more time and we'd need to properly shape and document it.
I believe the second option is the most desirable.
Why can't we use config.txt for specifying this? We already use config.txt to sepcify the deployment resources in heroku (redis_size = hobby-dev). Can we simply do something similar to specify the resources in docker deploy addind a line that is effectively : docker-worker-max-ram = 200Mb and docker-worker-max-ram = 200M? I am not sure I see the justification for another file on top of it.