May 24, 20233 yr For every Docker container I start in the GUI of Unraid I see the following warning: Quote WARNING: Your kernel does not support swap limit capabilities or the cgroup is not mounted. Memory limited without swap. Why? And how can I fix it? I seem to be the first / only one. I did nothing special.
June 16, 20233 yr You're not the only one, but most people probably don't limit docker memory on unraid. I didn't for years. But this started for me after upgrading to 6.12.0, 6.11.0 didn't have this issue for me. Edited June 16, 20233 yr by lostsoulfly
June 16, 20233 yr The why is that unRAID 6.12.0 uses cgroups v2 which, if i understand correctly, does not have a controller for limiting swap. The memory limit flag trys to limit both available memory and swap space. What I havent been able to decipher is what the resolution should be, whether a version of docker or option in docker resolves it, or if there is something that can be configured in the kernel, or even if there is a resolution at the moment. For the moment I think we have to just ignore it and accept that docker memory limits dont apply to swap (assuming you even have swap enabled on you unRAID host). Edited June 16, 20233 yr by primeval_god
June 16, 20233 yr Author @primeval_god okay got it thanks. I mean anyway its just a warning and not more.
July 5, 20233 yr On 6/16/2023 at 2:20 PM, primeval_god said: The why is that unRAID 6.12.0 uses cgroups v2 which, if i understand correctly, does not have a controller for limiting swap. While i still dont have any way to resolve the messages, i think I was wrong about cgroupv2 not having a way to limit swap. I think I misread something saying that I only has global controls for swappiness. That said the issue is still something to do with how docker and cgroupv2 are interacting.
December 12, 20232 yr Seeing this as well on one of my containers using the memory constraints. Is there a new better way to do this?
January 8, 20242 yr Just got this message on one of my containers updates. Never seen it before or changed anything (as far as i can remember). Any clues as to how this affects things and how can I solve it?
March 5, 20242 yr So no one has/knows a solution to this warning? I also have it and not sure what to do about it.
March 5, 20242 yr There's nothing to do or solve. Its simply docker giving a warning for everything. Limiting memory on an application does work no problems....
January 3, 20251 yr The thing is that we cannot set the swappiness value to be different from the host, as I only want one container to be able to use swap on my NAS is there any solution for that ?
January 19, 20251 yr Solution This is a bit of a necro, but if all you want is the warning to go away, at the top level under the service put memlimit_swap: -1 and it'll stop throwing the warning. Posting here since this is the top hit on Google when I searched for the warning text and unraid.
January 19, 20251 yr Author Works. More details on this here: https://docs.docker.com/engine/containers/resource_constraints/#--memory-swap-details Add this as an extra parameter: --memory-swap=-1
January 20, 20251 yr On 1/19/2025 at 5:56 PM, at0m said: This is a bit of a necro, but if all you want is the warning to go away, at the top level under the service put memlimit_swap: -1 and it'll stop throwing the warning. Posting here since this is the top hit on Google when I searched for the warning text and unraid. memswap_limit: -1 was working for me inside docker-compose.yml
September 15, 2025Sep 15 Hello, I hope people still read this thread. I have this message too. And I didn't understand these answers 100%. So is it correct that this is just a warning or notice but is not a cause for concern or that it affects the reliability of the running container?The parameters --memory-swap=-1 or memswap_limit: -1 only change that the warning no longer appears, but do not solve the reason for it?I've already tried adding one of the parameters to my docker-compose.yml for Dawarich, without success. I always get some error messages. However, since I don't really know the syntax, I can't get any further. Would someone be willing to show me exactly where the parameter should be inserted? I would be happy to post the file here.greetingBeUnRaider! dawarich_app Your kernel does not support swap limit capabilities or the cgroup is not mounted. Memory limited without swap.
September 15, 2025Sep 15 Community Expert 39 minutes ago, BeUnRaider said:Hello, I hope people still read this thread. I have this message too. And I didn't understand these answers 100%. So is it correct that this is just a warning or notice but is not a cause for concern or that it affects the reliability of the running container?The parameters --memory-swap=-1 or memswap_limit: -1 only change that the warning no longer appears, but do not solve the reason for it?I've already tried adding one of the parameters to my docker-compose.yml for Dawarich, without success. I always get some error messages. However, since I don't really know the syntax, I can't get any further.Would someone be willing to show me exactly where the parameter should be inserted? I would be happy to post the file here.greetingBeUnRaider! dawarich_app Your kernel does not support swap limit capabilities or the cgroup is not mounted. Memory limited without swap.It's only a warning, you can just ignore it. Also, if your containers are routinely running OOM such that you need to add a limit in the first place, you should consider changing its config so that it's not doing as much work in RAM, or add more RAM.
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.