Tmpfs Tools Log2ram

From WikiMLT
Revision as of 11:28, 31 August 2022 by Spas (talk | contribs) (→‎Setup)

Here I'm try­ing to use log2ram in or­der to min­i­mize disk write (caused by brave brows­er ses­sion stor­age) on a desk­top sys­tem.

Prepa­ra­tion

Iden­ti­fy which di­rec­to­ries has high I/O rate by the fol­low­ing com­mand.

watch -d -n 1 "find /home -type f -size +80k -mmin -10 -printf '%-30s \t %t %p\n'"

Check the cur­rent size of the iden­ti­fied di­rec­to­ries.

du -hs ~/.cache ~/.config/BraveSoftware

Take a sta­tis­tic for the av­er­age disk write per minute be­fore the set­up.

iostat -h /dev/nvme0n1 -d 60

In­stall log2ram

echo "deb [signed-by=/usr/share/keyrings/azlux-archive-keyring.gpg] http://packages.azlux.fr/debian/ bullseye main" | sudo tee /etc/apt/sources.list.d/azlux.list
sudo wget -O /usr/share/keyrings/azlux-archive-keyring.gpg  https://azlux.fr/repo.gpg
sudo apt update
sudo apt install log2ram

Set­up log2ram

sudo nano /etc/log2ram.conf
SIZE=2G
MAIL=true
PATH_DISK="/home/<user>/.config/BraveSoftware;/home/<user>/.cache"
ZL2R=false
COMP_ALG=lz4
LOG_DISK_SIZE=100M

Re­boot the sys­tem.

Ref­er­ences