Tip for Desktop Memory management, new vm tuning option
Liam Proven
lproven at gmail.com
Tue Jul 30 13:18:31 UTC 2019
On Tue, 30 Jul 2019 at 14:43, Rashkae <ubuntu at tigershaunt.com> wrote:
>
> Recent Linux Kernels since Ubuntu 16.04 have had changes to Virtual
> Memory management that drastically hurt performance on Desktop loads
> where RAM is not always sufficient for all running apps. With 4 to 8 GB
> desktops it's easy, if multi-tasking, to starve the RAM. With older V3
> and 4.4 Linux kernels, swap on an SSD, you could easily drive the system
> memory usage several GB past your RAM and not even notice.
>
> However, with Newer linux kernels, if memory usage approaches your RAM,
> applications that try to allocate a large chunk of memory could quickly
> send a system into a swap tailspin that renders the system inoperable
> until rebooted or processes manually killed. I've tripped over this
> several times over the past few years, and I finally found the change
> that causes it, Documented Here:
>
> https://www.fclose.com/linux-kernels/642756/mm-scale-kswapd-watermarks-in-proportion-to-memory-linux-4-6/
>
> The key to avoiding this swap lock problem is to increase
> /proc/sys/vm/watermark_scale_factor
>
> It defaults to 10. In my testing, 100 is still not enough to avoid the
> problems, but increasing it to 500 *drastically* improves the computer's
> ability to handle memory over-commit without falling on it's face.
>
> On my 8GB system, I can have several browser windows, thunderbird, Open
> Office, calibre and a few movies playing, (brining my RAM usage past
> 6GB), then open a 4GB Windows 10 VirtualBox instance, and everything
> works with no noticeable slowdowns or hitches. This was completely
> impossible before.
>
> If you want to try this, the change can be made permanent by adding this
> line in /etc/sysctl.conf. Run sudo sysctl --system to apply changes
> without reboot.
>
>
> vm.watermark_scale_factor=500
_Very_ interesting. Thanks for that. I will try it. I have been
experiencing related problems myself recently. I tried this and noted
by assigned-memory meter leap up instantly. I have 16 GB but my normal
workload is ITRO 12-14GB.
I upgraded to a 16GB machine because with 6-7GB on my previous 8GB
machine, it was bogging down badly. I experimented with swappiness
settings and compcache but could not get any real improvement.
--
Liam Proven - Profile: https://about.me/liamproven
Email: lproven at cix.co.uk - Google Mail/Hangouts/Plus: lproven at gmail.com
Twitter/Facebook/Flickr: lproven - Skype/LinkedIn: liamproven
UK: +44 7939-087884 - ČR (+ WhatsApp/Telegram/Signal): +420 702 829 053
More information about the ubuntu-users
mailing list