Tmpfs Tools Profile Sync Daemon (PSD): Difference between revisions
From WikiMLT
m Стадий: 3 [Фаза:Разработване, Статус:Разработван]; Категория:Linux Desktop |
mNo edit summary |
||
Line 1: | Line 1: | ||
<noinclude>< | <noinclude>{{ContentArticleHeader/Linux_Server|toc=off}}{{ContentArticleHeader/Linux_Desktop}}</noinclude> | ||
== | |||
== 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"> | |||
sudo watch -d -n 1 "find /var -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 /var/log | |||
</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 -t | |||
</syntaxhighlight> | |||
== Install log2ram == | |||
<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 | |||
sudo wget -O /usr/share/keyrings/azlux-archive-keyring.gpg https://azlux.fr/repo.gpg | |||
sudo apt update | |||
sudo apt install log2ram | |||
</syntaxhighlight> | |||
== 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="/var/log" | |||
ZL2R=false | |||
COMP_ALG=lz4 | |||
LOG_DISK_SIZE=100M | |||
</syntaxhighlight>Modify the default systemd timer unit, if you want to log more or less frequently than one time per day.<syntaxhighlight lang="shell" line="1" class="force-prompt"> | |||
sudo systemctl edit log2ram-daily.timer | |||
</syntaxhighlight>Reboot the system. After the reboot check [https://github.com/azlux/log2ram#is-it-working does it working] and use the <code>iostat</code> command to take a new statistic. | |||
== References == | |||
* GitHub: [https://github.com/azlux/log2ram log2ram] | |||
... | * ArchLinux Wiki: [https://wiki.archlinux.org/title/Firefox/Profile_on_RAM Firefox/Profile on RAM] | ||
* Linuxhowto.net: [https://www.linuxhowto.net/how-to-write-log-files-in-ram-using-log2ram-in-linux/ Write Log Files In RAM Using Log2ram In Linux]<br /> | |||
<noinclude> | <noinclude> | ||
Line 13: | Line 43: | ||
{{devStage | {{devStage | ||
| Прндл = Linux Desktop | | Прндл = Linux Desktop | ||
| Прндл1 = Linux Server | |||
| Стадий = 3 | | Стадий = 3 | ||
| Фаза = Разработване | | Фаза = Разработване |
Revision as of 13:35, 31 August 2022
Preparation
Identify which directories has high I/O rate by the following command.
sudo watch -d -n 1 "find /var -type f -size +80k -mmin -10 -printf '%-30s \t %t %p\n'"
Check the current size of the identified directories.
du -hs /var/log
Take a statistic for the average disk write per minute before the setup.
iostat -h /dev/nvme0n1 -d 60 -t
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="/var/log"
ZL2R=false
COMP_ALG=lz4
LOG_DISK_SIZE=100M
Modify the default systemd timer unit, if you want to log more or less frequently than one time per day.
sudo systemctl edit log2ram-daily.timer
Reboot the system. After the reboot check does it working and use the iostat
command to take a new statistic.
References
- GitHub: log2ram
- ArchLinux Wiki: Firefox/Profile on RAM
- Linuxhowto.net: Write Log Files In RAM Using Log2ram In Linux