Tmpfs Tools Log2ram: Difference between revisions
From WikiMLT
m →Setup |
|||
Line 1: | Line 1: | ||
<noinclude>{{ContentArticleHeader/Linux_Server|toc=off}}{{ContentArticleHeader/Linux_Desktop}}</noinclude> | <noinclude>{{ContentArticleHeader/Linux_Server|toc=off}}{{ContentArticleHeader/Linux_Desktop}}</noinclude> | ||
Here I'm trying to use log2ram in order to minimize disk write (caused by brave browser session storage) on a desktop system. | Here I'm trying to use <code>log2ram</code> in order to minimize disk write (caused by brave browser session storage) on a desktop system. | ||
== Install == | == Preparation == | ||
Identify which directories has high [[I/O Monitoring and Analyze|I/O rate]] by the following command.<syntaxhighlight lang="shell" line="1" class="force-prompt"> | |||
watch -d -n 1 "find /home -type f -size +80k -mmin -10 -printf '%-30s \t %t %p\n'" | |||
</syntaxhighlight>Check the current size of the identified directories.<syntaxhighlight lang="shell" line="1" class="force-prompt"> | |||
du -hs ~/.cache ~/.config/BraveSoftware | |||
</syntaxhighlight>Take a statistic for the average disk write per minute before the setup.<syntaxhighlight lang="shell" line="1" class="force-prompt"> | |||
iostat -h /dev/nvme0n1 -d 60 | |||
</syntaxhighlight> | |||
== Install log2ram == | |||
<syntaxhighlight lang="shell" line="1" class="force-prompt"> | <syntaxhighlight lang="shell" line="1" class="force-prompt"> | ||
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 | 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 | ||
Line 10: | Line 19: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
== Setup == | == Setup log2ram == | ||
<syntaxhighlight lang="shell" line="1" class="force-prompt"> | |||
sudo nano /etc/log2ram.conf | |||
</syntaxhighlight><syntaxhighlight lang="bash" line="1"> | |||
SIZE=2G | |||
MAIL=true | |||
PATH_DISK="/home/<user>/.config/BraveSoftware;/home/<user>/.cache" | |||
ZL2R=false | |||
COMP_ALG=lz4 | |||
LOG_DISK_SIZE=100M | |||
</syntaxhighlight>Reboot the system. | |||
== References == | == References == |
Revision as of 10:28, 31 August 2022
Here I'm trying to use log2ram
in order to minimize disk write (caused by brave browser session storage) on a desktop system.
Preparation
Identify which directories has high I/O rate by the following command.
watch -d -n 1 "find /home -type f -size +80k -mmin -10 -printf '%-30s \t %t %p\n'"
Check the current size of the identified directories.
du -hs ~/.cache ~/.config/BraveSoftware
Take a statistic for the average disk write per minute before the setup.
iostat -h /dev/nvme0n1 -d 60
Install 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
Setup 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
Reboot the system.