Open auwsom opened 5 years ago
Dumping a bit of code used to curtail thrashing (don't know effectiveness because also using AND).
sudo bash -c "echo -e \"\thard\tas\t$(($(grep -E 'MemTotal' /proc/meminfo | grep -oP '(?<=\s)\d+(?=\skB$)') - 2562**10))\" > /etc/security/limits.d/mem.conf" cat /etc/security/limits.d/mem.conf ulimit -H -v
Never happens in Windows, a big turn off to a new adopters, entering a steep rabbit hole of CLI commands to find the cause, and free up storage space.
Seems to be more frequent when not using swap disk. New swapfiles make setup more simple for a VM. Easily happens when installing a large package. Or because their is a null or very large journal size default.
There are a few fixes using the package AND (Auto Nice Daemon) or involving workarounds for 'thrashing' of memory between swap space. https://superuser.com/questions/248707/how-do-i-quickly-stop-a-process-that-is-causing-thrashing-due-to-excess-memory https://github.com/tobixen/thrash-protect
The simplest workaround is to create these two files and delete (command is: rm) to free enough space for the OS to operate: fallocate -l 100M /dummyfileroot; fallocate -l 100M $HOME/dummyfilehome
It seems other OSs prevent storage from becoming so full they halt it's operation. Seems easy to remedy with a small bit of 'nannying' the user, welcome I'm sure to most new users. Could also be redundantly implemented in Aptitude package manager.
Conventional solution is to boot into 'recovery mode' from the Grub menu. Get root command prompt and analyze the runaway storage file(s). Commands 'du --max-depth=1 ' (disk usage), 'du -d 1 | sort -nr' and 'ncdu' (needs small space to install) are very useful.