View previous topic :: View next topic |
Author |
Message |
krinn Watchman
Joined: 02 May 2003 Posts: 7470
|
Posted: Fri Mar 23, 2018 11:09 am Post subject: openrc boot timing |
|
|
I made a patch for openrc to decrease boot timing, but only for openrc-0.34.11 as it's the version i use.
You can find it in the bug there and see my timing results there.
But i'll be happy to help backport a cleaner one (this one add timing for testing) to an older openrc if you wish, as i know many of you keep running older versions.
The idea came from Naib's thread
Where the guy was asking himself: "my system boot in 5 minutes, openrc is building dependencies cache and it takes a very long time ; i'm surprise because i have use it before and it still rebuild it". |
|
Back to top |
|
|
Ant P. Watchman
Joined: 18 Apr 2009 Posts: 6920
|
Posted: Fri Mar 23, 2018 8:53 pm Post subject: |
|
|
Isn't this what /etc/init.d/savecache does? |
|
Back to top |
|
|
krinn Watchman
Joined: 02 May 2003 Posts: 7470
|
Posted: Fri Mar 23, 2018 9:27 pm Post subject: |
|
|
no idea what this di, but by logic no init script could do the job
at first init script invocation, openrc need its deptree, and will build it to handle the script, which made whatever the script will do, too late |
|
Back to top |
|
|
Ant P. Watchman
Joined: 18 Apr 2009 Posts: 6920
|
Posted: Fri Mar 23, 2018 9:59 pm Post subject: |
|
|
The init script only saves to /lib/rc/cache at shutdown, it gets restored in /lib/rc/sh/init.sh, which gets run by `/sbin/openrc sysinit` in inittab.
Having said that, the modification time on that cache on my desktop is November 2016 and I don't know if it's just broken or a side-effect of me using runit... |
|
Back to top |
|
|
krinn Watchman
Joined: 02 May 2003 Posts: 7470
|
Posted: Fri Mar 23, 2018 10:21 pm Post subject: |
|
|
It looks like it actually exactly do the needed job (the init script save it, the sh restore it)
But for whatever reason i don't know, it doesn't do it with /run/openrc/deptree which is the file use for deptree caching.
Looks like the feature is there, but buggy. I'll look at it tomorrow if i could. |
|
Back to top |
|
|
saboya Guru
Joined: 28 Nov 2006 Posts: 552 Location: Brazil
|
Posted: Sun Mar 25, 2018 1:00 am Post subject: |
|
|
I suggest you go directly upstream: https://github.com/OpenRC/openrc
You can probably get more valuable feedback there. |
|
Back to top |
|
|
krinn Watchman
Joined: 02 May 2003 Posts: 7470
|
Posted: Sun Mar 25, 2018 3:59 pm Post subject: |
|
|
AntP, you're the winner
I have change savecache to handle the deptree file and made tests, and yes, it's working, all you need to do is just alter savecache to handle the deptree file.
Code: | --- savecache.old 2018-03-25 17:58:19.564654706 +0200
+++ savecache 2018-03-25 17:57:52.284995748 +0200
@@ -49,7 +49,7 @@
fi
ebegin "Saving dependency cache"
local rc=0 save=
- for x in shutdowntime softlevel rc.log; do
+ for x in deptree shutdowntime softlevel rc.log; do
[ -e "$RC_SVCDIR/$x" ] && save="$save $RC_SVCDIR/$x"
done
if [ -n "$save" ]; then
|
|
|
Back to top |
|
|
|