You are not logged in.

#451 2013-11-06 19:59:04

graysky
Member
From: /run/user/1000
Registered: 2008-12-01
Posts: 8,595
Website

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

orschiro wrote:

Is this message on startup something I have to worry about?

home-orschiro-.cache.mount: Directory /home/orschiro/.cache to mount over is not empty, mounting anyway.
Nov 06 10:43:21 thinkpad systemd[1]: Mounted /home/orschiro/.cache.

That message is unrelated to psd.  It is informing you that the mount target contains files.  If you want to avoid it, just umount the target, inspect the contents, and if you don't care about them (i.e. just cache stuff), delete it, then remount it to tmpfs and problem solved.

orschiro wrote:

psd takes care of my ~/.cache to sync my Chromium profile. I set up the following tmpfs in /etc/fstab as suggested in the Wiki:

No, psd will not touch ~/.cache unless you modified it.  It only manages known profile dirs for supported browsers.


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

Offline

#452 2013-11-06 21:16:04

frankfender
Member
Registered: 2013-11-06
Posts: 3

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

Hi,

I installed psd on Ubuntu 13.10. Works fine, except on reboot I have to restart it manually. Before I do that I have a broken symlink in my .mozilla/firefix directory. After the restart everything works fine, until the next reboot.

mw@x220:~$ sudo service psd restart

* Restarting Profile-sync-daemon profile-sync-daemon                                                                                                                                                                                   
/home/mw/.mozilla/firefox/firefoxDefault does not exist or is a broken symlink! Is /tmp unmounted?

Any ideas?

Offline

#453 2013-11-06 22:55:20

graysky
Member
From: /run/user/1000
Registered: 2008-12-01
Posts: 8,595
Website

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

@frank - I dunno where ubuntu [upstart] logs the output of daemons but I might look around for the log to see if it's actually getting shutdown properly on a reboot.  Anything funky with your system setup (lvm or encrypted home or anything like that)?  If the daemon is properly shutdown the symlinks should be removed.  Try this, disable psd, manually stop it, manually start it, verify it is working, stop it, verify there are no symlinks.

sudo update-rc.d -f psd remove
sudo service psd stop
psd p <<post this output>>
sudo service psd start
psd p <<post this output>>

If that works, go ahead and reenable it to start at boot, reboot and post the output of `psd p` again.

sudo update-rc.d psd defaults
sudo reboot
psd p <<post this output>>

EDIT:  Wait a sec... you're using /tmp as your tmpfs?  I thought ubuntu used /run/shm for tmpfs?  Can you also post the output of `mount | grep tmpfs` for me?

Last edited by graysky (2013-11-06 23:01:37)


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

Offline

#454 2013-11-07 16:22:59

frankfender
Member
Registered: 2013-11-06
Posts: 3

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

Of course, now it works like a charm. I wonder what the problem was...

Yes, I do have an encrypted home (encfs). I changed the location from /run/shm to /tmp in the config file, thinking this might be a source of error (it wasn't)

Anyway, thanks for the quick help.

== EDIT ==

Damn, back to old behaviour.

Here are the outputs
1. psd p

Profile-sync-daemon v5.43 on Ubuntu 13.10.

 Daemon pid file is not present.
 Resync cronjob is present.

Psd will manage the following per /etc/psd.conf settings:

 browser/psname:  firefox/firefox
 owner/group id:  mw/1000
 sync target:     /home/mw/.mozilla/firefox/firefoxDefault
 tmpfs dir:       /tmp/mw-firefox-firefoxDefault
 profile size:    64M

2. psd d

Profile-sync-daemon v5.43 on Ubuntu 13.10.

 Daemon pid file is present.
 Resync cronjob is present.

Psd will manage the following per /etc/psd.conf settings:

 browser/psname:  firefox/firefox
 owner/group id:  mw/1000
 sync target:     /home/mw/.mozilla/firefox/firefoxDefault
 tmpfs dir:       /tmp/mw-firefox-firefoxDefault
 profile size:    55M

3. psd d (after reboot - no output of what is managed)

mw@x220:~$ psd p
Profile-sync-daemon v5.43 on Ubuntu 13.10.

 Daemon pid file is present.
 Resync cronjob is present.

Psd will manage the following per /etc/psd.conf settings:

mw@x220:~$ sudo service psd stop
[sudo] password for mw: 
/home/mw/.mozilla/firefox/firefoxDefault does not exist or is a broken symlink! Is /tmp unmounted?
mw@x220:~$ mount | grep tmpfs
none on /sys/fs/cgroup type tmpfs (rw)
udev on /dev type devtmpfs (rw,mode=0755)
tmpfs on /tmp type tmpfs (rw,nosuid)
tmpfs on /run type tmpfs (rw,noexec,nosuid,size=10%,mode=0755)
none on /run/lock type tmpfs (rw,noexec,nosuid,nodev,size=5242880)
none on /run/shm type tmpfs (rw,nosuid,nodev)
none on /run/user type tmpfs (rw,noexec,nosuid,nodev,size=104857600,mode=0755)
tmpfs on /var/log type tmpfs (rw,noexec,nosuid,nodev)

Last edited by frankfender (2013-11-07 16:42:06)

Offline

#455 2013-11-07 18:58:11

graysky
Member
From: /run/user/1000
Registered: 2008-12-01
Posts: 8,595
Website

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

frankfender wrote:

Yes, I do have an encrypted home (encfs)...

psd manpage wrote:

BUGS
       Discover a bug? Please open an issue on the project page linked below.

              ·  It is known that on slow systems with large profiles, the sync'ing step  sometimes  take  longer  than  the
                 boot-up of the WM. Therefore, users can theoretically start their browser before the profile has been tran‐
                 sitioned to tmpfs. This is particularly prevalent on systems with slow HDDs running  systemd.  This  effect
                 can be exacerbated with excessively large profiles that store mail as well as browser profiles.

              ·  Currently, psd does not work with encrypted home directories.

Last edited by graysky (2013-11-07 18:58:34)


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

Offline

#456 2013-11-08 09:53:30

orschiro
Member
Registered: 2009-06-04
Posts: 2,136
Website

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

graysky wrote:

That message is unrelated to psd.  It is informing you that the mount target contains files.  If you want to avoid it, just umount the target, inspect the contents, and if you don't care about them (i.e. just cache stuff), delete it, then remount it to tmpfs and problem solved.

Thanks for that. For some reasons ~/.cache was full of no longer used files. I cleaned it up, reactivated it in /etc/fstab and now it remounts without a flaw. smile

Offline

#457 2013-11-08 10:36:07

frankfender
Member
Registered: 2013-11-06
Posts: 3

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

Sorry, didn't see that sad

Why isn't it working? - Some kind of problem with the startup scripts in upstart?

And do you have an idea, if you will fix it sometime?

Anyway, thanks for the help,

Frank

Offline

#458 2013-11-08 10:47:02

graysky
Member
From: /run/user/1000
Registered: 2008-12-01
Posts: 8,595
Website

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

@frank - For psd to sync, your encrypted home needs to be mounted and decrypted to the daemon.


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

Offline

#459 2013-12-24 12:18:09

masnormen
Member
From: between Asia and Australia
Registered: 2012-06-03
Posts: 29
Website

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

Is it good to have the Firefox profile sync'd with Dropbox while using psd? I have two computers and want to sync 'em all. And needless to say, how will it work?
I hope this will be added to psd's TODO list.

Last edited by masnormen (2013-12-24 12:19:11)


Sorry for my bad English roll

Offline

#460 2013-12-24 12:38:49

graysky
Member
From: /run/user/1000
Registered: 2008-12-01
Posts: 8,595
Website

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

I have never used dropbox.  Psd only syncs to/from tmpfs/physical media.


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

Offline

#461 2013-12-24 13:12:55

masnormen
Member
From: between Asia and Australia
Registered: 2012-06-03
Posts: 29
Website

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

Dropbox will download the files from the web and place them in a folder in your computer. If you change your file "onlinely", dropbox will download the changed file(s) to your computer, and vice versa. It syncs your computer with the web. You have the physical files in your computer while you have the "copy" in the web.


Sorry for my bad English roll

Offline

#462 2013-12-24 13:18:14

graysky
Member
From: /run/user/1000
Registered: 2008-12-01
Posts: 8,595
Website

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

I understand how dropbox works.  This is beyond the scope of psd.


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

Offline

#463 2013-12-24 13:20:29

masnormen
Member
From: between Asia and Australia
Registered: 2012-06-03
Posts: 29
Website

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

I just wanted to know. Sorry smile


Sorry for my bad English roll

Offline

#464 2013-12-29 02:08:49

GSF1200S
Member
Registered: 2008-12-24
Posts: 434

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

Thank you very much for this! This script is fantastic for laptops with SSD drives for some very good reasons:
1) Faster browser as you said due to RAM being significantly faster than disk; SSDs have faster seektime and dont have a disk to spool up, so they are less affected in this sense, but any read from disk costs time.
2) SSD lifespan- as the web browser is one of the most used applications, it contributes many writes/wear to the SSD. This script essentially eliminates many repetitive writes, thus contributing to SSD drive lifespan.
3) Battery life- less writes = less power consumption, and as this script essentially reduces the amount of repetitive writes, it also increases battery life (by how much depends I suppose).

I had been meaning to get around to cooking up a script to do this, but now I dont need to! Thanks

Last edited by GSF1200S (2013-12-29 02:10:21)

Offline

#465 2013-12-31 17:13:45

ervinshiznit
Member
Registered: 2013-06-12
Posts: 11

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

I installed psd and am trying to synchronize my Firefox profile, but I can't get it to synchronize back at shutdown. I also tried to synchronize the same directory with anything-sync-daemon (not advised, I know) but it also didn't synchronize at shutdown. Hence there's some more fundamental problem here with systemd shutdown scripts not being run at shutdown, but I'm not sure which log files to check for this.

Could you guys help me out?

Offline

#466 2014-01-03 22:40:15

graysky
Member
From: /run/user/1000
Registered: 2008-12-01
Posts: 8,595
Website

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

@ervinshiznit - Just saw you post now... are you sure that the daemon is running?  What init system/distro are you using?  Post the output of:

psd p

Last edited by graysky (2014-01-03 22:40:26)


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

Offline

#467 2014-01-09 17:18:42

ervinshiznit
Member
Registered: 2013-06-12
Posts: 11

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

Yes I'm sure the daemon is running. I am using systemd on Arch Linux. I enabled psd and psd-resync.

From psd p:

Profile-sync-daemon v5.45 on Arch Linux.

 Systemd service is currently active.
 Systemd resync service is currently active.

Psd will manage the following per /etc/psd.conf settings:

 browser/psname:  firefox/firefox
 owner/group id:  ervinshiznit/100
 sync target:     /mnt/SSD_Docs/Firefox_Profile
 tmpfs dir:       /tmp/ervinshiznit-firefox-Firefox_Profile
 profile size:    293M

Every time I reboot I get a Firefox_Profile-backup-crashrecovery folder created, and my profile clearly has not synchronized back to disk because it does not remember the tabs that I opened during that session, nor any bookmarks or changes to Firefox settings.

Offline

#468 2014-01-09 20:38:52

graysky
Member
From: /run/user/1000
Registered: 2008-12-01
Posts: 8,595
Website

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

@ervin - If you stop the psd rather than letting systemd stop it on reboot, does the sync happen successfully?  Also, how is /mnt/SSD_Docs mounted and what filesystem is it?


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

Offline

#469 2014-01-09 20:52:08

ervinshiznit
Member
Registered: 2013-06-12
Posts: 11

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

Yes, it does sync back successfully. Like I said, I believe that my systemd scripts that are supposed to run at shutdown are not being run for some reason and I don't know what logs I should be looking at.

/mnt/SSD_Docs is a ntfs partition, mounted at boot using ntfs-3g and with the following options:

rw,auto,async,noatime,nodiratime,uid=1000,gid=100,discard,data=writeback,noexec,nofail 

Offline

#470 2014-01-09 20:56:03

graysky
Member
From: /run/user/1000
Registered: 2008-12-01
Posts: 8,595
Website

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

I wonder if systemd takes the mount down before psd syncs back... not too sure how to debug it though.  I use both ext4 and btrfs for my /home and never have the problem you are describing.

EDIT: I am not a systemd service expert by any means, but the included service for psd does Wants=local-fs.target so I would think that systemd is aware of that and that would play into the order in which it shuts down things... what if you let systemd automount your /mnt/SSD_Docs like this in your /etc/fstab?

Last edited by graysky (2014-01-09 21:03:09)


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

Offline

#471 2014-01-09 20:58:43

ervinshiznit
Member
Registered: 2013-06-12
Posts: 11

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

Hm that would make sense if true. The weird thing though is that I use psd on my desktop with the same mount options for ntfs and it synchronizes back fine.

Offline

#472 2014-01-09 21:03:39

graysky
Member
From: /run/user/1000
Registered: 2008-12-01
Posts: 8,595
Website

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

If that is the case, something else must be different on your "problem" machine hmm


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

Offline

#473 2014-01-13 07:36:41

megabaks
Member
Registered: 2014-01-13
Posts: 1

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

profile-sync-daemon must check fstype of ${VOLATILE}.
fstype != tmpfs && exit 1
or profile can be broken
/ sorry my bad english

Offline

#474 2014-01-19 16:59:53

kozaki
Member
From: London >. < Paris
Registered: 2005-06-13
Posts: 644
Website

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

Today I noticed there are symlinks to /tmp/USERn-firefox-xxx.default right into each user's profiles. All where created at the same time:

ls -l $HOME/.mozilla/firefox/<profile.default>/
drwx------ 2 user   group     100  3 janv. 14:26 CookieSwap
drwxr-xr-x 2 user   group    1240 13 déc.   2012 HTTPSEverywhereUserRules
<snip snip>
lrwxrwxrwx 1 root root       32 10 avril  2013 USERn-firefox-xxx.default -> /tmp/USERn-firefox-xxx.default
<snip snip>
$ psd p
Profile-sync-daemon v5.45.1 on Arch Linux.

 Systemd service is currently active.
 Systemd resync service is currently active.

Psd will manage the following per /etc/psd.conf settings:

 browser/psname:  firefox/firefox
 owner/group id:  USER/1000
 sync target:     /home/USER/.mozilla/firefox/xxx.default
 tmpfs dir:       /tmp/USER-firefox-xxx.default
 profile size:    46M

 browser/psname:  firefox/firefox
 owner/group id:  USER/1000
 sync target:     /home/USER/.mozilla/firefox/xxx.anon
 tmpfs dir:       /tmp/USER-firefox-xxx.anon
 profile size:    6,6M

Deleted the symlink after shutting down the browser instances and psd, then restarted and all is fine.

Any idea how the symlink may have landed into the firefox's profile? 
A manual mistake is of course possible (yet unconventional wink) but I thought it won't harm to report.

Thank you v much graysky for this KISS script :]


Seeded week #28: Arch 25 gig (stock 12, Talking 1, Anywhere 11, Apricity 1)
Desktop @3.30GHz 8 gig RAM, Arch linux-ck
laptop1 Atom 2 gig RAM, Arch linux stock i686 (5+H battery smile) & 2: ARM Tegra K1 4 gig RAM, ChrOS
Atom Z520 2 gig RAM, OMV (Debian 7) kernel 3.16 bpo on SDHC | PGP Key: 0xFF0157D9

Offline

#475 2014-01-19 19:06:54

graysky
Member
From: /run/user/1000
Registered: 2008-12-01
Posts: 8,595
Website

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

@k - Not sure why that would be.  Mine does not have them.  Let me know if they re-appear.


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

Offline

Board footer

Powered by FluxBB