Move browser profile to RAM
Install (as root or sudo):
Code: Select all
apt install profile-sync-daemon
Code: Select all
export PATH=/usr/sbin:$PATH && psd p
The package install creates a systemd service which runs automatically.
To load a newly edited config, just stop and restart the service:
Code: Select all
systemctl --user stop psd.service
systemctl --user start psd.service
#and to check status:
systemctl --user status psd.service

This Debian page contains more info:
https://manpages.debian.org/testing/pro ... .1.en.html
Arch wiki has a little extra info but is basically the same:
https://wiki.archlinux.org/title/Profile-sync-daemon
Move Firefox cache to RAM:
Simple change in about:config
Get your user ID with id -u
then set browser.cache.disk.parent_directory to /run/user/UID/firefox . You will probably need to create that as a new config entry.
For me and most single users it will be 1000, so mine is
Code: Select all
browser.cache.disk.parent_directory /run/user/1000/firefox
fatrace
The thing that prompted me to do this was running a nice little utility called fatrace which displays all disk access in real time. The number of accesses when running Firefox was astounding so I determined to do something about it. Comparing the disk accesses from before activating profile-sync-daemon and after proved how well it was working.
To run fatrace, first install it (as root or sudo):
Code: Select all
sudo apt install fatrace
Code: Select all
sudo fatrace


Edited 19/03/23 to add PATH instruction and cache section. Edited 29/03/23 to clarify cache config entry.