June 4, 20233 yr 21 hours ago, primeval_god said: I am glad it is working for you. I am however not the one to thank. I did not actually write this plugin, I just to over when it was abandoned. Ture. Well thanks for taking over the app and keeping it viable than 😊
July 5, 20232 yr Has anyone had success with swap working in 6.12? I've got a docker container that I use it for and I get the following when updating the container: WARNING: Your kernel does not support swap limit capabilities or the cgroup is not mounted. Memory limited without swap. WARNING: Your kernel does not support memory swappiness capabilities or the cgroup is not mounted. Memory swappiness discarded.
July 5, 20232 yr Author 35 minutes ago, TheEyeTGuy said: Has anyone had success with swap working in 6.12? I've got a docker container that I use it for and I get the following when updating the container: WARNING: Your kernel does not support swap limit capabilities or the cgroup is not mounted. Memory limited without swap. WARNING: Your kernel does not support memory swappiness capabilities or the cgroup is not mounted. Memory swappiness discarded. So far as i know swap works just fine on 6.12, the issue is whether or not docker supports limiting swap access to containers. See my answer here.
July 5, 20232 yr If it does work, its not working for my docker containers, I can also confirm the docker container is not respecting its memory limit configuration (limited to 8 gigs, but uses more than that). Bug in 6.12.x?
July 6, 20232 yr Author 2 hours ago, juan11perez said: Good day, would the plugin work on a zfs formatted cache drive? Thank you To my knowledge swapfiles are not supported on the zfs filesystem.
July 6, 20232 yr Author 2 hours ago, TheEyeTGuy said: If it does work. I am almost certain that it does, in that the only thing this plugin does is allow the management of a swapfile and enable swap in unraid. 2 hours ago, TheEyeTGuy said: its not working for my docker containers. Correct, unRAID 6.12 moved to cgroupv2 and for some reason docker is unable to set swap limits using it. I dont know if it is a configuration issue with docker or cgroups, a limitation of the docker version used, or something else. 2 hours ago, TheEyeTGuy said: Bug in 6.12.x? So far as I can tell its not a bug in this plugin. Its also unlikely to be considered a bug in unRAID as support for swap has never been an official feature. If someone knows or can figure out what needs to be changed to restore swap limit support for docker in unRAID 6.12 we can likely get limetech to make a fix. Cgroup stuff however is way above my head.
July 6, 20232 yr 1 hour ago, primeval_god said: I am almost certain that it does, in that the only thing this plugin does is allow the management of a swapfile and enable swap in unraid. Correct, unRAID 6.12 moved to cgroupv2 and for some reason docker is unable to set swap limits using it. I dont know if it is a configuration issue with docker or cgroups, a limitation of the docker version used, or something else. So far as I can tell its not a bug in this plugin. Its also unlikely to be considered a bug in unRAID as support for swap has never been an official feature. If someone knows or can figure out what needs to be changed to restore swap limit support for docker in unRAID 6.12 we can likely get limetech to make a fix. Cgroup stuff however is way above my head. Thanks for your response. Sorry if I offended you with some of my wording, did not mean any offense. Docker can't control memory either now though, which regardless of swap, I think is something that could be considered a bug. Cgroup stuff is also above my head. I appreciate your quick responses. On an unrelated note, is your source code published anywhere? I'd just like to poke around, for my own curiosity. Thanks! Edited July 6, 20232 yr by TheEyeTGuy
July 6, 20232 yr Author 1 hour ago, TheEyeTGuy said: Thanks for your response. Sorry if I offended you with some of my wording, did not mean any offense. Docker can't control memory either now though, which regardless of swap, I think is something that could be considered a bug. Cgroup stuff is also above my head. I appreciate your quick responses. On an unrelated note, is your source code published anywhere? I'd just like to poke around, for my own curiosity. Thanks! No problem I did not mean to imply offense in my response, just trying to be specific as to where the issue is. The source for this plugin is here https://github.com/dcflachs/swapfile_plugin
July 6, 20232 yr Author 17 hours ago, TheEyeTGuy said: I can also confirm the docker container is not respecting its memory limit configuration (limited to 8 gigs, but uses more than that). How are you measuring how much memory it is using? Is the number you are seeing purely RAM or RAM+SWAP? Just as I am not clear on why swap limits dont work, I am also not clear on how docker containers interact with swap when limits are not settable. It is possible that even with a memory limit set a container has access to unlimited (except by the amount available on the system) swap space. Another possibility, based on how memory limits without swap limits work when swap limiting is available, is that the container has access to as much swap as its configured memory limit (meaning in your case the container would be able to use 8G RAM + 8G SWAP).
July 19, 20232 yr I am using UNRAID version 6.12.3 and enale 10Gb swapfile. wap file exists: ✔ Swap file in use: ✔ Swap file location and filename: /mnt/disks/disco02/swapfile/swapfile Swap file size: 10000.07 MB used: 138.05 MB used 1% But Main not show swap memory.
July 20, 20232 yr Author 12 hours ago, Adriano Frare said: But Main not show swap memory. This is correct. The plugin does not provide any integration with the unRAID dashboard, you can view swap usage in the swap plugin settings menu if need be.
July 23, 20232 yr Hey Guys, I got a "Out of Memory" Problem with my Unraid. Jorge told me that i can try a Swap File / Plugin. But I dont have a clue what that Plugin exactly does and what Cons I might get when using it. Would this Plugin help me get rid of that Error? If yes, maybe someone here can tell me what I need to do without breaking my Config/Machine? I'm really afraid of losing it Thank you in advance
July 24, 20232 yr Author On 7/23/2023 at 4:02 AM, Zeench said: But I dont have a clue what that Plugin exactly does and what Cons I might get when using it. If you are not familiar with swap you should do some googling to better understand computer memory systems (linux specifically). The basic idea though is that the OS can take the least recently used memory pages and move them from RAM into a file on a disk (the swapfile) in order to free up RAM. When the pages stored in the file are needed they get moved back into RAM and something else gets swapped out to disk. The downside of this is that swapping data out to disk has a significant performance penalty. That is typically not a big deal for normal swap usage where swap contains rarely used data and you are mainly protecting against an app occasional using a ton of memory for a short time. Swap is not a good substituted for additional RAM on a system that is consistently memory constrained however. On 7/23/2023 at 4:02 AM, Zeench said: Would this Plugin help me get rid of that Error? Yes it would, how well it performs however depends on exactly why you are running out of memory. If Jorge thinks it could help though its definitely worth a try. There is not really any risk to using this plugin that i can think of. You will need an xfs or btrfs formatted cache drive (preferably sdd) in your system to host the swap file. Edited July 24, 20232 yr by primeval_god
July 26, 20232 yr Ty for the answer. The Plugin wont work for me. It doesnt install the swapfile properly i guess. When i clock "Save below.... and install" it still shows the red X on the left side. What did i do wrong? I read in the help that it wont work on cachepools. Im not running a pool, but i do run 2 seperate caches. What do i do wrong? Can u help me out here. Thx again.
July 26, 20232 yr Author 32 minutes ago, Zeench said: What did i do wrong? I read in the help that it wont work on cachepools. Im not running a pool, but i do run 2 seperate caches. What do i do wrong? Can u help me out here. Thx again. The swapfile cannot be placed in the root directory of a cache drive on BTRFS. It must be placed in a subvolume. Best to specify a directory that does not already exist and allow the plugin to create the subvolume itself. I would suggest something like '/mnt/cache/system/swap/' Click the little help icon next to the location for further information on swapfile placement. I would also recommend setting swappiness to something lower than 10 (i use 1) and setting 'start swapfile during array mount' to true. Finally you will need to click the start button to start the swapfile for the first time.
July 29, 20232 yr On 7/26/2023 at 6:08 PM, primeval_god said: The swapfile cannot be placed in the root directory of a cache drive on BTRFS. It must be placed in a subvolume. Best to specify a directory that does not already exist and allow the plugin to create the subvolume itself. I would suggest something like '/mnt/cache/system/swap/' Click the little help icon next to the location for further information on swapfile placement. I would also recommend setting swappiness to something lower than 10 (i use 1) and setting 'start swapfile during array mount' to true. Finally you will need to click the start button to start the swapfile for the first time. Thank you very much. The File got created, but it cant be used for some reason. When i click start, nothing happens, just a quick reload of the plugin site... Edited July 29, 20232 yr by Zeench
July 29, 20232 yr Author 13 hours ago, Zeench said: Thank you very much. The File got created, but it cant be used for some reason. When i click start, nothing happens, just a quick reload of the plugin site... What does the system log say?
July 31, 20232 yr On 7/30/2023 at 1:34 AM, primeval_god said: What does the system log say? Just this:
July 31, 20232 yr Author 6 hours ago, Zeench said: Just this: That would seem to indicate that the swapfile is active. On the command line you can run 'swapon -s' to confirm. Weird the that webpage does not update.
July 31, 20232 yr What swap file size would you recommend if I had 48 gigs total ram? Does the swap file size count as a total across the entire system or is the number inputted per docker?
July 31, 20232 yr Author 46 minutes ago, DrSpaldo said: Does the swap file size count as a total across the entire system or is the number inputted per docker? So far as the setting of this plugin are concerned the swap file size is the total amount of swap available to the system. 48 minutes ago, DrSpaldo said: What swap file size would you recommend if I had 48 gigs total ram? I dont consider myself an expert on swap in linux. The amount of swap you need is less about your total amount of ram an more about your ram usage. In general you would want to keep your swap usage low. I wouldnt think you would need more than a few GB of swapspace. 2G-4G maybe?
August 1, 20232 yr 17 hours ago, primeval_god said: That would seem to indicate that the swapfile is active. On the command line you can run 'swapon -s' to confirm. Weird the that webpage does not update. Strange, it really seems to be in use. But the Page still shows While you guys were writing about the size. I put mine to 10GB, it doesnt have negative side effects to have it this big, right?
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.