<div dir="ltr">The maximum supported swap space has been significantly increased in master.  The amount of core memory required to manage swap is approximately 1:128 (ram:swap-used).  The system allows up to half of your core ram to be used for swap management so the maximum swap you can actually use on a machine would be as follows:<div><br><div>With 1GB of ram it would be 512M*128 = 64GB of swap.<br></div><div><div><br></div><div>With 8GB of ram it would be 4G*128 = 512GB of swap.</div><div><br></div><div>With 128GB of ram it would be around ~8TB of swap.</div><div><br></div><div>The maximum the system supports due to KVM limitations is around ~32TB of swap.</div><div><br></div><div>While you can configure more swap than the above limitations, the system might not be able to actually manage as much as you configure.  I'm considering improving the management code to reduce its memory requirements.  Also, people shouldn't go overboard w/regards to configuring swap space.  Configured swap does eat some memory resources even when not actively in-use, and there might not be a practical use for having such massive amounts of swap with your setup.</div><div><br></div><div>--</div><div><br></div><div>The memoryuse resource limit (ulimit -m in /bin/sh) is now being enforced on a per-process basis.  By default this limit is infinity so nothing will change for most people.  Setting a memoryuse limit has advantages in certain circumstances as long as it isn't over-used.  For example, it might be reasonable to start your browser with a 500m (500 megabyte) limit.  The system will allow each process VSZ to grow larger, but will force the RSS to the limit and devalue the pages it removes to make them more likely to be recycled by the system.</div><div><br></div><div>There is a sysctl, vm.pageout_memuse_mode, to control the behavior.  It can be set to 0, 1, or 2, and defaults to 1.  Setting it to 0 disables the enforcement (system operates the same as it did before the commit).  The default value of 1 enables enforcement by removing pages from the process pmap and deactivating them passively.  The value 2 enables enforcement and actively pages data out and frees pages.   Mode 2 can cause excessive paging and wear out your SSD so it is not currently recommended.</div><div><br></div><div><div><div>-Matt</div></div></div></div></div></div>