|Summary help replacing me|
|AUR (psd) is a diminutive 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.|
Benefits of Psd
Running this daemon is beneficial for two reasons:
- Reduced wear to physical discs
Since the profile(s), browser cache*, etc. are relocated into tmpfs (RAM disk), the corresponding onslaught of I/O associated with using the browser is also redirected from the physical disc to RAM, thus reducing wear to the physical disc and also greatly improving browser speed and responsiveness. For example, the access time of RAM is on the order of nanoseconds while the access time of physical discs is on the order of milliseconds. This is a difference of six orders of magnitude or 1,000,000 times faster.
Supported Browsers and Caveats
Currently, the following browsers are auto-detected and managed:
- firefox (all flavors including stable, beta, and aurora)
- heftig's version of aurora
Setup and Installation
AUR. Build it and install like any other package.AUR is available for download from the
Edit the included
/etc/psd.conf defining which user(s) will have their profiles managed by psd.
# List users separated by spaces whose browser(s) profile(s) will get symlinked # and sync'ed to tmpfs. # Do NOT list a user twice! USERS="facade happy"
Optionally uncomment the BROWSERS array and populate it with whichever browser(s) are to be sync'ed to tmpfs. If the BROWSERS array stays commented (default) then all supported browser profiles will be sync'ed if they exist.
Example: Let's say that both chromium and mirdori are installed but only chromium is to be sync'ed to tmpfs since the user keeps Midori as a backup browser and it is seldom used:
# List browsers separated by spaces to include in the sync. Useful if you do not # wish to have all possible browser profiles sync'ed. # # Possible values: # chromium # conkeror.mozdev.org # firefox # google-chrome # heftig-aurora # midori # opera # opera-next # qupzilla # # If the following is commented out (default), then all available/supported # browsers will be sync'ed BROWSERS="chromium"
Optionally redefine the location of the tmpfs mount to use for syncs. Do this in the VOLATILE variable. Note that for Arch Linux, the default value of "/tmp" should work just fine.
The initial synchronization will occur when the pseudo-daemon starts. Additionally, cron (if running) will call it to sync or update once per hour. Finally, psd will sync back a final time when it is called to stop.
The provided daemon file should be used to interact with psd (
# systemctl [option] psd.service
start Turn on daemon; make symlinks and actively manage targets in tmpfs. stop Turn off daemon; remove symlinks and rotate tmpfs data back to disc. enable Autostart daemon when system comes up. disable Remove daemon from the list of autostart daemons.
Enable psd to start/stop at boot/shutdown (highly recommended) using:
# systemctl enable psd.service
The required rc.d file (
/etc/rc.d/psd) is provided and should be used to manage psd.
# /etc/rc.d/psd [option]
start Turn on daemon; make symlinks and actively manage targets in tmpfs. stop Turn off daemon; remove symlinks and rotate tmpfs data back to disc.
It is highly recommended to start/stop the daemon at boot/shutdown. This is accomplished by adding psd to the DAEMONS array in /etc/rc.conf like so:
DAEMONS=(... psd ...)
Sync at More Frequent Intervals (Optional)
Users wishing to have syncs occur more frequently can simply add a line to the root crontab to call the sync function of psd like so:
# crontab -e
Example syncing all profiles being managed once every ten minutes:
*/10 * * * * /usr/bin/profile-sync-daemon sync &> /dev/null
The debug option can be called to show users exactly what psd will do based on the /etc/psd.conf entered. Call it like so:
$ profile-sync-daemon debug
As stated above, if no specific browser or set of browsers are defined in the BROWSERS array, psd will sync ALL profiles that it finds for the given user.
Post in the discussion thread with comments or concerns.