AndroidCat Posted March 14, 2016 Share Posted March 14, 2016 I'd like to be able to limit total memory allocated for all Dockers running. For instance system has 6GB of RAM allocated to unRAID and I want to set a hard limit of max 4GB to be utilized by Dockers, leaving 2GB (in worst case scenario) for NAS subsystem (emhttp, SAMBA, etc). That would hopefully prevent Out of Memory occurrences killing important processes when suddenly some Docker decides to use tons of RAM. That could,for example, be implemented as a global Docker setting in respective GUI. I know this could be solved by manually adding -m parameter to each Docker, but what about simple solution like this: For EACH DOCKER-> IF (-m not specified) append -m <global setting> ELSE use existing -m <value> entered by user EDIT: LOL, I realized the above would not work properly and it doesn't achieve what I wanted i.e. it would not limit TOTAL memory usage. Is there any way to do it at all (cgroups)? Link to comment
unevent Posted March 16, 2016 Share Posted March 16, 2016 I'd like to be able to limit total memory allocated for all Dockers running. For instance system has 6GB of RAM allocated to unRAID and I want to set a hard limit of max 4GB to be utilized by Dockers, leaving 2GB (in worst case scenario) for NAS subsystem (emhttp, SAMBA, etc). That would hopefully prevent Out of Memory occurrences killing important processes when suddenly some Docker decides to use tons of RAM. That could,for example, be implemented as a global Docker setting in respective GUI. I know this could be solved by manually adding -m parameter to each Docker, but what about simple solution like this: For EACH DOCKER-> IF (-m not specified) append -m <global setting> ELSE use existing -m <value> entered by user EDIT: LOL, I realized the above would not work properly and it doesn't achieve what I wanted i.e. it would not limit TOTAL memory usage. Is there any way to do it at all (cgroups)? Not sure on limiting memory usage with Docker, but have you looked at installing the swap file plugin to enable swap in unRAID? It's in the plugin subforum. Link to comment
AndroidCat Posted March 16, 2016 Author Share Posted March 16, 2016 As a matter of fact I did install the swap plugin a few days ago..seems to be working well. Thanks for that suggestion. Hopefully there is some hope it could be resolved more elegantly. Link to comment
Recommended Posts
Archived
This topic is now archived and is closed to further replies.