Should I limit docker resources on my linode?

I have a nanode1gb, and am deploying mailcow in a docker container. The docker docks talk about limiting resources and I am wondering if I should be limiting the container to prevent upsetting the VPS I am on.

2 Replies

Hey there,

To my understanding, while in some cases limiting memory resources in a specific Docker container can help to prevent any resource contention issues with your other containers, this isn't something that you'd want enabled by default in the majority of cases, especially if you still have a high amount of resources available. If you do ever want to check and make sure that you do have these resources available, you should be able to do so at any time by performing the following command:

 free -m

If you still have a high amount of free memory available then it's pretty unlikely that you'd want to add a limit to your resources. If you do find that you're using up most of your memory, then it's usually a better option to either fine tune your services to use less memory, or resize your Linode to have more memory available. For a little more information regarding how you might do this, I'm including some documentation below which should help:

Resizing a Linode
Troubleshooting Memory Issues

Additionally, if you can tell us more about the nature of your service and your other containers, someone may be able to let you know in a little bit more detail why limiting resources may or may not be a good fit for you.

Hope that helps!

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct