Skip to content

Instantly share code, notes, and snippets.

@TBog
Forked from voyeg3r/zram.sh
Last active February 25, 2021 08:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save TBog/52e83ee126a64ecd3ab0a9d88552373f to your computer and use it in GitHub Desktop.
Save TBog/52e83ee126a64ecd3ab0a9d88552373f to your computer and use it in GitHub Desktop.
How enable zram module on kernel (debian lik distro)?
from
https://www.phoronix.com/forums/forum/software/mobile-linux/1086709-zram-will-see-greater-performance-on-linux-5-1-it-changed-its-default-compressor/page3
There has been this zram-config script in the wild for over 7 years that for some reason has been emulated and copied blindly with no actual reference to the kernel docs or thought as it would seem.
If you just need some free RAM, you can restrict crocesses to a certain amount of it using:
systemd-run --user --scope -p MemoryLimit=500M firefox &
disown -r
Hide console output
command > /dev/null 2>&1
Explanation:
1. command > /dev/null: redirects the output of command(stdout) to /dev/null
2. 2>&1: redirects stderr to stdout, so errors (if any) also goes to /dev/null
&>/dev/null: redirects both stdout and stderr to /dev/null. one can use it as an alternate of /dev/null 2>&1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment