Skip to content
View in the app

A better way to browse. Learn more.

Unraid

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Limit total memory allocated for Dockers

Featured Replies

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)?

 

 

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.

  • Author

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.

Archived

This topic is now archived and is closed to further replies.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.