linux poison RSS
linux poison Email

Tool to move the web browser profile to RAM - Profile-sync-daemon

Profile-sync-daemon (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.

Running this daemon is beneficial for two reasons:
Reduced wear to physical discs
Speed
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.
Profile-sync-daemon Installation:
To add the PPA (personal package archive) to your Ubuntu (packages available for Lucid and newer) system, and to install psd, type following commands:
sudo add-apt-repository ppa:graysky/utils
sudo apt-get update
sudo apt-get install profile-sync-daemon
Profile-sync-daemon configuration:
After successful installation, you need to edit the Profile-sync-daemon settings in one of it's configuration file (/etc/psd.conf)

Edit the included /etc/psd.conf defining which user(s) will have their profiles managed by psd.
USERS="linuxpoison"
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.
BROWSERS="chromium"
Now you need to close the browsers added to /etc/psd.conf - make sure they are not still running! - and start the Profile Sync Damon:
sudo service psd start
NOTE: Psd will update once per hour on its own thanks to /etc/cron.hourly/psd-update -- psd does NOT remain running in memory!





2 comments:

Mark Preston said...

Running sudo aptitude upgrade today, I got this in the terminal:

D : show the differences between the versions
Z : start a shell to examine the situation
The default action is to keep your current version.
*** psd.conf (Y/I/N/O/D/Z) [default=N] ? N
info: Allowing request to http://ocsp.thawte.com/
info: Allowing request to https://www.google.com/favicon.ico

LoadPlugin: failed to initialize shared library libXt.so [libXt.so: cannot open shared object file: No such file or directory]
LoadPlugin: failed to initialize shared library libXext.so [/usr/lib/nvidia-current/libnvidia-glcore.so.295.40: cannot make segment writable for relocation: Cannot allocate memory]
info: Allowing request to http://noscript.net/?ver=2.6.5.7&prev=2.6.5.2

info: Blocking request to http://www.facebook.com/plugins/likebox.php?href=http%3A%2F%2Fwww.facebook.com%2Fnixcraft&width=292&height=258&colorscheme=light&show_faces=true&border_color&stream=false&header=false


info: Blocking request to http://www.facebook.com/plugins/like.php?href=http://www.cyberciti.biz/faq/stop-process-ubuntu-linux-command/&send=false&layout=button_count&width=90&show_faces=false&action=like&colorscheme=light&font=arial&height=21
info: Blocking request to http://www.facebook.com/plugins/likebox.php?href=http%3A%2F%2Fwww.facebook.com%2Fnixcraft&width=292&height=258&colorscheme=light&show_faces=true&border_color&stream=false&header=false
info: Getting data for content script for tab undefined
info: No tab info for tab undefined defined.

error: An exception occurred.
Traceback (most recent call last):
File "resource://sharemenot-at-franziroesner-dot-com/api-utils/lib/content/content-worker.js", line 96, in onChromeEvent
return emit.apply(null, args);
File "resource://sharemenot-at-franziroesner-dot-com/api-utils/lib/content/content-worker.js", line 45, in onEvent
results.push(callback.apply(null, args));
File "resource://sharemenot-at-franziroesner-dot-com/api-utils/lib/content/content-worker.js", line 45, in onEvent
results.push(callback.apply(null, args));
File "resource://sharemenot-at-franziroesner-dot-com/sharemenot/data/Content%20Script/Browser%20Abstraction%20Layer.js", line 51, in exports.getTrackerData/<
var contentScriptFolderUrl = response.contentScriptFolderUrl;
TypeError: response is null

[8728:8728:0224/104136:ERROR:chrome_browser_main_extra_parts_gtk.cc(51)] Startup refusing to run as root.
dpkg: error processing profile-sync-daemon (--configure):
subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
profile-sync-daemon

terminal lines were a lot more than posted here. Eventually, Firefox opened to the No Script donation page. Also, the day before yesterday, I got a new Ubuntu Kernel. It asked to keep or replace the psd.conf. I said replace. Then no browser would open (can be called from) the desktop or the drop down menu, nor the panel. So, I edited psd.conf and un-commented my browsers (Chrome and firefox) and everything was 'jake' again. If necessary how can I remove this?

Mark Preston said...

After installing your :ppa, I edited my /etc/psd.conf file and added my username and issued sudo service psd start. Today, neither google-chrome nor firefox would start. I could not call Chrome from the panel, my desktop or the applications drop-down menu. Even this page as saved to my Desktop would not open a browser. It did open in gedit and I was able to find and execute the psd start command. When the chrome did open, it had none of my log-ins, passwords, etc. I'm not mad, but you haven't posted my first question here and now I'm having even bigger problems. Can you please tell me how to remove your psd.conf and restore my computer to a time, prior to this addition. I'm certain this is a wonderful idea, but it's harming my work. Please give me a little help.

Post a Comment

Related Posts with Thumbnails