Page 1 of 1

[SOLVED] Profile-sync-daemon

PostPosted: Jul 18th, '12, 12:36
by sverreef
I was just wondering if anyone has graysky's profile-sync-daemon working under Mageia 2? If so, I would really appreciate some step-by-step instructions - which a Linux/Mageia newbie can follow - on how to install/compile it.

Re: Profile-sync-daemon

PostPosted: Jul 18th, '12, 22:23
by doktor5000
Well, f.ex. firefox can be set directly to use RAM for cache, but you shouldn't do that for the whole profile.
Can you please elaborate a bit on the exact use case?

Re: Profile-sync-daemon

PostPosted: Jul 19th, '12, 00:01
by sverreef
Yeah, I found the instructions on how to load Firefox' cache in RAM here. According to some posts at the official Opera community, it doesn't seem to be quite as straight forward for Opera and Opera Next, which are my main browsers, though. Apparently there's an issue with Opera's RAM cache??? That made me look for other alternatives, and Arch Linux' SSD Wiki, as well as this topic, made the profile-sync-daemon look like a very interesting solution. It handles Firefox, Opera and Chromium, and the synchronisation of data back to SSD/HDD seems like an added benefit.

Any specific reason why you wouldn't recommend loading the whole browser profile in tmpfs? My new rig has 16GB of RAM, so I don't think the size should be an issue.

Re: Profile-sync-daemon

PostPosted: Jul 19th, '12, 21:20
by doktor5000
sverreef wrote:Any specific reason why you wouldn't recommend loading the whole browser profile in tmpfs? My new rig has 16GB of RAM, so I don't think the size should be an issue.


If your system freezes or crashes, or for any reason it can't write the profile back into your home folder, it's gone.

Re: Profile-sync-daemon

PostPosted: Jul 20th, '12, 11:36
by sverreef
With hourly backups, I thought the risk of severe data loss would be minimal, or at least negligible.

Re: Profile-sync-daemon

PostPosted: Jul 21st, '12, 22:11
by doktor5000
Well, from where should i know that? Just gave you some best-practice hints and details to consider ...

Re: Profile-sync-daemon

PostPosted: Aug 10th, '12, 00:34
by sverreef
Sorry for taking so long to reply, but computer/Internet time has been a bit limited during my vacation, and as a result, this ended up on the backburner...

In hindsight, I should probably have been a bit more verbose in my opening post and tried to explain the basic features and functionality of the profile-sync-daemon, instead of just linking to its Git repository. I still think it looks like a really interesting solution to the SSD/browser performance "dilemma" though - offering users the best of two worlds (maximum speed and SSD longevity with backups to prevent data loss) - so if anyone can help or point me in the right direction on how this could be installed on Mageia 2, I'd really appreciate it.

Re: Profile-sync-daemon

PostPosted: Sep 13th, '12, 19:54
by djennings
Profile-sync-daemon is just a bash shell script. It does not need compiling or anything.
To use it on Mageia all you have to do is download the source from the git repository and place the files in the respective postitions in the mageia file system (remembering to make the script executable)

You also need to have the rsync package installed.

The profile-sync-daemon script itself would go in /usr/bin (make it executable)
psd.cron.hourly would go into /etc/cron.hourly (make it executable)
psd.service goes into /etc/systemd/system/multi-user.target.wants
psd.conf goes into /etc

The remainder should not be needed.
If systemd does not start the service you can start it yourself with
Code: Select all
/usr/bin/profile-sync-daemon sync &
in a root terminal

Edit
----

You will also need to make /tmp a tmpfs
You can do that in MageiaControl Centre>Boot>BootSetup>Advancednoot options>clear /tmp on each boot

Re: Profile-sync-daemon

PostPosted: Sep 14th, '12, 06:08
by djennings
Correction psd.service goes into /lib/systemd/system and use mageiaControlcentre>system>services to enable psd at boot.

As you may have gathered I have tried profile-sync-daemon out for myself and have formed a mixed opinion of it.

It does start OK at boot, and it syncs the opera configuration OK, but for some reason it only syncs the firefox config when I start the sync manually.
Opera certainly starts quickly, but since I use Opera Mail, my entire email history gets loaded into RAM ( 870MB) which is rather more overhead than I am prepared to tolerate.

I also checked out disabling the disc cache in Opera which is trivially easy to do in the opera configuration settings, so I am not convinced that psd is necessary to reduce SSD wear for Opera.e
Similarly disabling the firefox disc cache is quite easy as described in the link posted earlier, so I am not yet convinced that profile-sync-daemon is doing anything useful.

EDIT
-------
The opera mail folder can be moved to a different location by entering opera:config in the url line and entering a new location in Mail Root Directory
(move the folder contents first and make a backup just in case)

Re: Profile-sync-daemon

PostPosted: Sep 15th, '12, 23:06
by sverreef
Thanks a lot for the detailed instructions and great advice djennings! :)

Ironically, the setup procedure is exactly how I thought it would be, and also what I started to do a couple of months ago, but as a Linux newbie I just didn't trust my initial instincts...

Anyway, it seems like I've finally got it up and running on my system, and so far, it looks very promising. Not that performance was bad from the SSD, but with profile-sync-daemon enabled, Opera's startup dialogue pops up instantly, and 10+ tabs loads with blazing speed!

As for the mentioned caveat, I don't use Opera's Mail Client, and I also try to avoid other functionality which can have a negative effect on browser performance and bloat the profile, so I think I should be fine in that regard.

djennings wrote:I also checked out disabling the disc cache in Opera which is trivially easy to do in the opera configuration settings, so I am not convinced that psd is necessary to reduce SSD wear for Opera.e
Similarly disabling the firefox disc cache is quite easy as described in the link posted earlier, so I am not yet convinced that profile-sync-daemon is doing anything useful.


I don't have any data to back up the claims myself, but according to several posts on the My Opera Forum, including one from an Opera employee, the "disc cache off" setting does little or nothing to reduce disc writes from Opera. Apparently it was "implemented more for testing on devices than for other reasons" :?

Re: [SOLVED] Profile-sync-daemon

PostPosted: May 24th, '13, 22:57
by sverreef
Just a little heads up in case other Mageia users want to try this script:

After I upgraded to M3 a few days ago, I decided to upgrade to the latest version of profile-sync-daemon as well. Instead of doing it manually, I gave the Fedora rpm a shot, and so far it seems to be working without a hitch.