Dallinger icon indicating copy to clipboard operation
Dallinger copied to clipboard

Bounding resource usage in Docker apps: 5 pts

Open pmcharrison opened this issue 4 years ago • 2 comments

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?

pmcharrison avatar May 27 '21 11:05 pmcharrison

We could certainly expose this. I see these two options:

  • add command line parameters to the dallinger docker-ssh deploy command 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.

silviot avatar Jun 01 '21 13:06 silviot

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.

jacobyn avatar Jun 01 '21 15:06 jacobyn