Tmpfs Tools Profile Sync Daemon (PSD): Difference between revisions
Line 4: | Line 4: | ||
It is designed to work on desktop systems, but by creating custom fake profiles it could be used for non production servers :) Currently I'm using it to minimize [[Kali Linux Install Brave browser|Brave browser]] disk writings. More information about the PSD's Brave profile could be foun in the references section below. | It is designed to work on desktop systems, but by creating custom fake profiles it could be used for non production servers :) Currently I'm using it to minimize [[Kali Linux Install Brave browser|Brave browser]] disk writings. More information about the PSD's Brave profile could be foun in the references section below. | ||
{{collapse/begin}} | |||
== Preparation == | == Preparation == | ||
{{collapse/div|#Preparation details}} | |||
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"> | 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 ~/.cache ~/.config -type f -size +80k -mmin -10 -printf '%-30s \t %t %p\n'" | sudo watch -d -n 1 "find ~/.cache ~/.config -type f -size +80k -mmin -10 -printf '%-30s \t %t %p\n'" | ||
Line 12: | Line 14: | ||
iostat -h /dev/nvme0n1 -d 60 -t | iostat -h /dev/nvme0n1 -d 60 -t | ||
</syntaxhighlight> | </syntaxhighlight> | ||
{{collapse/end}} | |||
== Install log2ram == | == Install log2ram == |
Revision as of 13:43, 31 August 2022
Profile-sync-daemon (psd) is a tiny pseudo-daemon designed to manage your browser's profile in tmpfs
and to periodically sync it back to your physical disc (HDD/SSD). This is accomplished via a symlinking step and an innovative use of rsync
to maintain back-up and synchronization between the two. One of the major design goals of psd
is a completely transparent user experience.
It is designed to work on desktop systems, but by creating custom fake profiles it could be used for non production servers :) Currently I'm using it to minimize Brave browser disk writings. More information about the PSD's Brave profile could be foun in the references section below.
Preparation
sudo watch -d -n 1 "find ~/.cache ~/.config -type f -size +80k -mmin -10 -printf '%-30s \t %t %p\n'"
du -hs ~/.cache ~/.config
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