You are not logged in.

#51 2012-06-01 19:16:09

nierro
Member
From: Milan, Italy
Registered: 2011-09-02
Posts: 849

Re: anything-sync-daemon - keep ANYTHING in tmpfs and sync'ed

ehi Gravsky, i'm having little troubles with your asd.service:

systemd-analyze blame
 16115ms asd.service
  4827ms systemd-vconsole-setup.service

16sec?? Isn't it too much? big_smile

Offline

#52 2012-06-01 19:49:25

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

Re: anything-sync-daemon - keep ANYTHING in tmpfs and sync'ed

@nierro - depends on how much data you are syncing and how fast/slow your HDD/SSD is....  All the script does is to call rsync to copy what you tell it to over to tmpfs.  How much data are you copying?


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

Offline

#53 2012-06-01 19:55:19

nierro
Member
From: Milan, Italy
Registered: 2011-09-02
Posts: 849

Re: anything-sync-daemon - keep ANYTHING in tmpfs and sync'ed

cat /etc/asd.conf | grep WHATTOSYNC=
#WHATTOSYNC=('/var/log' '/srv/http' '/home/foo/bar')
WHATTOSYNC=('/home/federico/.config/chromium')
71Mb...

Offline

#54 2012-06-01 19:58:33

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

Re: anything-sync-daemon - keep ANYTHING in tmpfs and sync'ed

I can't answer your specific question.  It shouldn't take 16 s to copy over 71 Mb.  As a test, disable asd (stop it first so it syncs back) and try psd which is unique to browsers.  What does the copy time for it equal?

$ systemd-analyze blame
  1583ms psd.service

$ du --max-depth 1 -h /tmp | grep chromium
108M	/tmp/facade-chromium

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

Offline

#55 2012-06-01 20:02:58

nierro
Member
From: Milan, Italy
Registered: 2011-09-02
Posts: 849

Re: anything-sync-daemon - keep ANYTHING in tmpfs and sync'ed

systemd-analyze blame
 18860ms psd.service
  5517ms rc-local.service
du --max-depth 1 -h /tmp | grep chromium
0	/tmp/.org.chromium.Chromium.exzeng
71M	/tmp/federico-chromium

I think it is pretty too much smile
The entire bootup takes 32sec, and 18 are psd! (well rc-local.service too takes too long to me...5 sec for 3 "echo" commands...)

Last edited by nierro (2012-06-01 20:11:34)

Offline

#56 2012-06-01 20:20:41

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

Re: anything-sync-daemon - keep ANYTHING in tmpfs and sync'ed

That is crazy... what kind of HDD do you have in your box?  Could it be because systemd is too aggressive starting all your stuff at once thus rapping your HDD?

Test #2:

*Disable psd on startup.
*Reboot
*Log into X
*Manually start psd once you are sure there is no HDD activity

How fast is it now?


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

Offline

#57 2012-06-01 20:25:38

nierro
Member
From: Milan, Italy
Registered: 2011-09-02
Posts: 849

Re: anything-sync-daemon - keep ANYTHING in tmpfs and sync'ed

time sudo systemctl start psd.service

real	0m2.127s
user	0m0.013s
sys	0m0.009s

Damn, how can it be?

Offline

#58 2012-06-01 20:30:47

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

Re: anything-sync-daemon - keep ANYTHING in tmpfs and sync'ed

graysky wrote:

Could it be because systemd is too aggressive starting all your stuff at once thus rapping your HDD...


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

Offline

#59 2012-06-01 20:36:16

nierro
Member
From: Milan, Italy
Registered: 2011-09-02
Posts: 849

Re: anything-sync-daemon - keep ANYTHING in tmpfs and sync'ed

well, ok...how can i fix it then? may be putting a sleep 30 for example, but where?

Offline

#60 2012-06-01 20:41:19

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

Re: anything-sync-daemon - keep ANYTHING in tmpfs and sync'ed

No idea... systemd is kinda black box to me.  What I found is that unless you have a fast SSD, systemd offers no difference in startup speed vs. sysv + backgrounding daemons.


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

Offline

#61 2012-06-01 20:52:10

nierro
Member
From: Milan, Italy
Registered: 2011-09-02
Posts: 849

Re: anything-sync-daemon - keep ANYTHING in tmpfs and sync'ed

Do you think so? i think it is really good anyway, i like the way it handles the services.
Well may be sysv + back daemons + e4rat =systemd, it is not too bad.
I want to try out e4rat with systemd, may be it can make some difference.

Offline

#62 2012-06-01 22:16:20

nierro
Member
From: Milan, Italy
Registered: 2011-09-02
Posts: 849

Re: anything-sync-daemon - keep ANYTHING in tmpfs and sync'ed

Offline

#63 2012-06-01 22:26:13

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

Re: anything-sync-daemon - keep ANYTHING in tmpfs and sync'ed

Cool, enjoy.

FYI - use psd if you're just syncing browsers.


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

Offline

#64 2012-06-02 08:19:55

nierro
Member
From: Milan, Italy
Registered: 2011-09-02
Posts: 849

Re: anything-sync-daemon - keep ANYTHING in tmpfs and sync'ed

Yes, but as far as yesterday afternoon, i was using asd to sync /var/log. But now i'm using systemd and i do not need it (well, not a lot), so i removed it smile

Offline

#65 2012-06-02 08:25:03

Shark
Member
From: /dev/zero
Registered: 2011-02-28
Posts: 686

Re: anything-sync-daemon - keep ANYTHING in tmpfs and sync'ed

Interesting. I have 2gb of RAM (i686), ussually (i have KDE) i have 50% ram usage. Would installed ASD eat a lot of RAM? Do you have to have at least 4GB of ram?

Appreciate you work, graysky!


If you have built castles in the air, your work need not be lost; that is where they should be. Now put foundations under them.
Henry David Thoreau

Registered Linux User: #559057

Offline

#66 2012-06-02 10:08:19

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

Re: anything-sync-daemon - keep ANYTHING in tmpfs and sync'ed

is it possible to port this package on a fedora/rpm system? i would like to use it on my fedora laptop but i'm not sure if it's running as expected as under arch. fortunately the package is shipped with systemd files smile

Offline

#67 2012-06-02 12:32:33

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

Re: anything-sync-daemon - keep ANYTHING in tmpfs and sync'ed

@shark - thanks.  To your question, it depends on how much data you plan to sync.  If you plan to sync 1 G for example that might kill you smile  If it's just a browser profile (100 M or so) that isn't a problem.  If it is a browser profile use psd not asd.

@broken pipe - dunno, I don't run fedora stuff smile


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

Offline

#68 2012-06-04 13:16:07

unikum
Member
From: Russia
Registered: 2010-09-04
Posts: 151
Website

Re: anything-sync-daemon - keep ANYTHING in tmpfs and sync'ed

After install core/systemd-sysvcompat and remove initscripts cron script not work because /usr/sbin/rc.d does not exist.

Last edited by unikum (2012-06-04 16:54:45)

Offline

#69 2012-06-04 20:52:32

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

Re: anything-sync-daemon - keep ANYTHING in tmpfs and sync'ed

@unikum - this is a known issue I haven't yet had time to address.

xduugu helped solve this for psd:
https://github.com/graysky2/profile-sync-daemon

Anyone game to do it for asd?  I just do not have the time right now.
https://github.com/graysky2/anything-sync-daemon


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

Offline

#70 2012-06-05 06:49:19

unikum
Member
From: Russia
Registered: 2010-09-04
Posts: 151
Website

Re: anything-sync-daemon - keep ANYTHING in tmpfs and sync'ed

Something like that.
asd.service:

[Unit]
Description=Symlinks and syncs user defined dirs to RAM thus reducing HDD/SDD calls and speeding-up the system
Wants=local-fs.target

[Service]
ExecStartPre=/usr/bin/anything-sync-daemon sanity
ExecStart=/usr/bin/anything-sync-daemon check
ExecStart=/usr/bin/anything-sync-daemon sync
ExecStop=/usr/bin/anything-sync-daemon sync
ExecStop=/usr/bin/anything-sync-daemon unsync

[Install]
WantedBy=multi-user.target

asd.cron.hourly

#!/bin/sh
/usr/bin/anything-sync-daemon sync &> /dev/null

Offline

#71 2012-06-05 11:18:23

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

Re: anything-sync-daemon - keep ANYTHING in tmpfs and sync'ed

Can you run with it and verify that it is working under real world conditions?


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

Offline

#72 2012-06-05 13:47:43

unikum
Member
From: Russia
Registered: 2010-09-04
Posts: 151
Website

Re: anything-sync-daemon - keep ANYTHING in tmpfs and sync'ed

I get: 'You should not call this script directly, let the /etc/rc.d/asd do it for you!'
Seems need edit /usr/bin/anything-sync-daemon.

Offline

#73 2012-06-06 08:24:19

Runiq
Member
From: Germany
Registered: 2008-10-29
Posts: 1,053

Re: anything-sync-daemon - keep ANYTHING in tmpfs and sync'ed

graysky wrote:

If it's just a browser profile (100 M or so) that isn't a problem.  If it is a browser profile use psd not asd.

I'm very intrigued by the *sds, but to me it looks like asd is a superset of psd. Why should I still use psd for browser profiles? Does it do something different?

Last edited by Runiq (2012-06-06 08:25:22)

Offline

#74 2012-06-06 09:05:12

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

Re: anything-sync-daemon - keep ANYTHING in tmpfs and sync'ed

Psd has more options for managing browsers and users.  Ads is an offshoot of psd and is more generic with less niceties.  If you're syncing just browsers, psd is the way to go.


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

Offline

#75 2012-07-02 11:47:28

FarStar07
Member
Registered: 2012-04-02
Posts: 51

Re: anything-sync-daemon - keep ANYTHING in tmpfs and sync'ed

Hello,
Your program is really very useful. I have a very large hosts file (with approximately 1.300.000 lines) which slowed down my browsing. I moved my hosts file to a folder relocated into tmpfs via asd and I created a symbolic link in /etc/. Now, my browsing speed is much faster! So, thanks for this script!

Offline

Board footer

Powered by FluxBB