You are not logged in.

#1 2011-12-03 01:19:02

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,644
Website

profile-sync-daemon - keep browser profiles in tmpfs and sync'ed

Wrote my own daemonized version of a script that will symlink your browser's profile directories to tmpfs and keep them sync'ed using rsync.  My stuff is based on this script which I've been using for years except my version is both daemonized and handles the following browsers automatically:

*Chromium
*Conkeror
*Firefox
*Google-chrome
*Heftig's Aurora
*Midori
*Opera
*Opera-next
*QupZilla

Try running psd in 'parse' mode which will show you exactly what it plans to sync and manage for you based on your /etc/psd.conf
parse.jpg

Works natively with systemd.  Feedback is welcomed.

AUR:  https://aur.archlinux.org/packages.php?ID=54516
Wiki:  https://wiki.archlinux.org/index.php/Pr … ync-daemon
Source: https://github.com/graysky2/profile-sync-daemon

Last edited by graysky (2012-12-02 21:07:43)


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#2 2011-12-03 20:21:40

maggie
Member
Registered: 2011-02-12
Posts: 255

Re: profile-sync-daemon - keep browser profiles in tmpfs and sync'ed

This is a very slick tool. Thank you for supporting Opera!

Offline

#3 2011-12-06 23:49:02

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,644
Website

Re: profile-sync-daemon - keep browser profiles in tmpfs and sync'ed

You're welcome.  Love your avatar btw!


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#4 2011-12-10 09:55:06

therico
Member
Registered: 2011-12-10
Posts: 4

Re: profile-sync-daemon - keep browser profiles in tmpfs and sync'ed

I installed this, then was forced to hard reboot machine due to unknown gnome3 problem. Upon restart Firefox complains with "Profile missing" and sure enough, there's no /tmp/$USER-mozilla anymore, even if I ask psd to sync.

Copying ~/.mozilla-backup to /tmp/$USER-mozilla fixes this, but is there any reason why psd can't do it automatically?

Offline

#5 2011-12-10 10:24:35

Pajaro
Member
Registered: 2004-04-21
Posts: 884

Re: profile-sync-daemon - keep browser profiles in tmpfs and sync'ed

therico wrote:

I installed this, then was forced to hard reboot machine due to unknown gnome3 problem. Upon restart Firefox complains with "Profile missing" and sure enough, there's no /tmp/$USER-mozilla anymore, even if I ask psd to sync.

Copying ~/.mozilla-backup to /tmp/$USER-mozilla fixes this, but is there any reason why psd can't do it automatically?

Instead of handling this automatically, I would suggest a "recover $USER" command in "rc.psd".

Offline

#6 2011-12-10 10:53:51

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,644
Website

Re: profile-sync-daemon - keep browser profiles in tmpfs and sync'ed

therico wrote:

I installed this, then was forced to hard reboot machine due to unknown gnome3 problem. Upon restart Firefox complains with "Profile missing" and sure enough, there's no /tmp/$USER-mozilla anymore, even if I ask psd to sync.

Copying ~/.mozilla-backup to /tmp/$USER-mozilla fixes this, but is there any reason why psd can't do it automatically?

@therico - Good call!  Just updated to version 2.4 which now auto-recovers stale files/link due to a system crashes or other ungraceful states.

Last edited by graysky (2011-12-10 11:14:36)


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#7 2011-12-12 12:43:07

neuromancer85
Member
Registered: 2011-12-12
Posts: 3

Re: profile-sync-daemon - keep browser profiles in tmpfs and sync'ed

Hi, thanks for your work! This script is great, my hard disk has never been so happy! big_smile
I have just one little problem: I'm using systemd, and when I start my pc, login and start firefox, all my add-ons are not loaded... So I have to manually sync the profile with

# rc.d restart psd

The output of

# systemctl status psd.service

is

psd.service - Legacy unit for psd.service
	  Loaded: loaded (/run/systemd/generator/arch-daemons.target.wants/psd.service)
	  Active: failed since Mon, 12 Dec 2011 12:52:22 +0100; 30min ago
	 Process: 508 ExecStart=/etc/rc.d/psd start (code=killed, signal=TERM)
	  CGroup: name=systemd:/system/psd.service

Obviously "psd" is in my "rc.conf" daemons list.
Is there any way to make it work right with systemd?

Thank you.

Last edited by neuromancer85 (2011-12-12 12:43:46)

Offline

#8 2011-12-12 12:52:34

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,644
Website

Re: profile-sync-daemon - keep browser profiles in tmpfs and sync'ed

Sorry man, I have no experience with systemd at all.  Actually, your post caused me to google it smile. You know more than I do at this point.  In principal, I see no reason why it shouldn't work with an alternative initd.  I also can't think why your extensions/addons aren't copied over on startup.  Maybe others have more experience with systemd.

Last edited by graysky (2011-12-12 21:45:10)


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#9 2011-12-12 21:56:56

maggie
Member
Registered: 2011-02-12
Posts: 255

Re: profile-sync-daemon - keep browser profiles in tmpfs and sync'ed

Can you add support for midori? It is in [extra].

Offline

#10 2011-12-12 22:08:17

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,644
Website

Re: profile-sync-daemon - keep browser profiles in tmpfs and sync'ed

Done, enjoy!


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#11 2011-12-13 00:43:03

neuromancer85
Member
Registered: 2011-12-12
Posts: 3

Re: profile-sync-daemon - keep browser profiles in tmpfs and sync'ed

@graysky: Fine, I've made it work now, I just had to put "psd" after "slim" in the rc.conf daemons list big_smile
Thanks for the support wink

Offline

#12 2011-12-13 20:52:24

el mariachi
Member
Registered: 2007-11-30
Posts: 595

Re: profile-sync-daemon - keep browser profiles in tmpfs and sync'ed

would luakit benefit from this?

Offline

#13 2011-12-14 00:55:11

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,644
Website

Re: profile-sync-daemon - keep browser profiles in tmpfs and sync'ed

If it saves your browser cache, temp files, profile, etc. to a profile directory then, yes.  Any browser that does a lot of read/write to the HDD will benefit.  Let me know.

Last edited by graysky (2011-12-14 09:28:13)


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#14 2011-12-19 20:37:48

maggie
Member
Registered: 2011-02-12
Posts: 255

Re: profile-sync-daemon - keep browser profiles in tmpfs and sync'ed

el mariachi wrote:

would luakit benefit from this?

Does laukit even cache files to disk? I tried it before and it only puts your config files in ~/.config/laukit so it probably does not matter.

Offline

#15 2011-12-19 21:40:40

el mariachi
Member
Registered: 2007-11-30
Posts: 595

Re: profile-sync-daemon - keep browser profiles in tmpfs and sync'ed

I guess you're right.

Offline

#16 2011-12-20 08:15:42

Pajaro
Member
Registered: 2004-04-21
Posts: 884

Re: profile-sync-daemon - keep browser profiles in tmpfs and sync'ed

graysky,

I wasn't using your plugin, but "firefox-tmpfs", just because I found it before, which works almost the same than yours, and my computer crashed. When I rebooted the information of one plugin, "session manager", went back to the state it was about one week ago. This is weird, because I had rebooted the computer many times during this week, and I had a cron job to sync the profiles, but it didn't go back to the state it was in the last sync, but to a partial state.

I assume that I had a partial sync when the computer crashed. To prevent this the sync process could be made like this:
1 - Initially, rename .mozilla to .mozilla-backup, like you do
2 - Then, instead of sync /dev/shm with .mozilla-backup, sync to .mozilla-backup-partial
3 - when rsync is done, swap .mozilla-backup-partial and .mozilla-backup

This way, .mozilla-backup would never be in a middle partial state.

Last edited by Pajaro (2011-12-20 12:30:54)

Offline

#17 2011-12-20 12:29:15

broken pipe
Member
Registered: 2010-12-10
Posts: 243

Re: profile-sync-daemon - keep browser profiles in tmpfs and sync'ed

this daemon is truly awesome and it helps me reducing I/O of my SSD! smile

would it be possible to support thunderbird? in my case, thunderbird is running the all day minimized to tray and i noticed that it reads/writes to the hd very often (once in 10 sec)

Offline

#18 2011-12-20 12:32:49

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,644
Website

Re: profile-sync-daemon - keep browser profiles in tmpfs and sync'ed

Problem with thunderbird is that folks like me have 200+ Meg's of old emails POP3 saved.  I wouldn't wanna sync that load all the time.  you can spin up a 'thunderbird-sync-daemon' that does just that if you base it on this script, but I want to keep psd limited to browsers.  Go ahead and fork it from my github if you wish: https://github.com/graysky2/profile-sync-daemon

Last edited by graysky (2011-12-20 19:56:33)


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#19 2011-12-20 14:01:25

otown
Member
From: Florida
Registered: 2011-12-17
Posts: 2

Re: profile-sync-daemon - keep browser profiles in tmpfs and sync'ed

Great work, graysky!  I checked out your package a few weeks ago, as well as https://aur.archlinux.org/packages.php?ID=54386/ while searching for ways speed up my system.  I wish I could remember or kept better notes on the problems I was having.  They weren't from your script, but rather from me installing/uninstalling and moving all kinds of stuff around on my system. It had something to do with an odd combination of the original profile,backup, and link being present/missing.  Anyway, I used your script as the basis and inspiration for my newest tweaking project of installing the browsers along with along side the browser profiles in tmpfs.  Thanks.

Offline

#20 2011-12-23 22:33:25

lorin
Member
Registered: 2011-12-06
Posts: 28

Re: profile-sync-daemon - keep browser profiles in tmpfs and sync'ed

Wow, can't thank you enough for this.  Been using it for a while with great results on Firefox but had the idea today I could add Second Life clients ... Mind you, the cache for something like Firestorm is 1-2 gbs but it almost doubled my frame rate. Very cool.

Offline

#21 2011-12-25 07:47:25

broken pipe
Member
Registered: 2010-12-10
Posts: 243

Re: profile-sync-daemon - keep browser profiles in tmpfs and sync'ed

i'm not good at writing wiki articles but someone should definitely add psd to the maximizing performance article smile
https://wiki.archlinux.org/index.php/Ma … erformance

Offline

#22 2011-12-28 10:51:56

tacker
Member
Registered: 2011-11-21
Posts: 8

Re: profile-sync-daemon - keep browser profiles in tmpfs and sync'ed

I keep having problems with PSD.
After nearly every system start my chromium profile is empty and started with a fresh one.
I even start psd in foreground in rc.conf

Offline

#23 2011-12-28 12:17:05

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,644
Website

Re: profile-sync-daemon - keep browser profiles in tmpfs and sync'ed

Very odd.  What is your partition setup?  Post:

grep DAEMONS  /etc/rc.conf
cat /etc/fstab

CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#24 2012-01-03 17:47:31

masteryod
Member
Registered: 2010-05-19
Posts: 433

Re: profile-sync-daemon - keep browser profiles in tmpfs and sync'ed

I love you graysky smile

questions:
1) how to benchmark this?
2) how much memory psd can eat with time?

Offline

#25 2012-01-03 19:58:01

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,644
Website

Re: profile-sync-daemon - keep browser profiles in tmpfs and sync'ed

masteryod wrote:

I love you graysky smile

questions:
1) how to benchmark this?
2) how much memory psd can eat with time?

1) Dunno - for me it's more about saving SSD access than a speed gain.
2) Psd doesn't use any memory itself.  The amount of RAM used is dependant entirely on:

*How many users you are syncing (defined in /etc/psd.conf)
*How many browsers you are syncing (currently if you have browser profiles for the users you defined that relate to firefox, chromium and opera they get synced automatically)
*The size of individual profile directories for each browser


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

Board footer

Powered by FluxBB