Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
openrc boot timing
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
krinn
Watchman
Watchman


Joined: 02 May 2003
Posts: 7470

PostPosted: Fri Mar 23, 2018 11:09 am    Post subject: openrc boot timing Reply with quote

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
View user's profile Send private message
Ant P.
Watchman
Watchman


Joined: 18 Apr 2009
Posts: 6920

PostPosted: Fri Mar 23, 2018 8:53 pm    Post subject: Reply with quote

Isn't this what /etc/init.d/savecache does?
Back to top
View user's profile Send private message
krinn
Watchman
Watchman


Joined: 02 May 2003
Posts: 7470

PostPosted: Fri Mar 23, 2018 9:27 pm    Post subject: Reply with quote

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
View user's profile Send private message
Ant P.
Watchman
Watchman


Joined: 18 Apr 2009
Posts: 6920

PostPosted: Fri Mar 23, 2018 9:59 pm    Post subject: Reply with quote

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
View user's profile Send private message
krinn
Watchman
Watchman


Joined: 02 May 2003
Posts: 7470

PostPosted: Fri Mar 23, 2018 10:21 pm    Post subject: Reply with quote

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
View user's profile Send private message
saboya
Guru
Guru


Joined: 28 Nov 2006
Posts: 552
Location: Brazil

PostPosted: Sun Mar 25, 2018 1:00 am    Post subject: Reply with quote

I suggest you go directly upstream: https://github.com/OpenRC/openrc

You can probably get more valuable feedback there.
Back to top
View user's profile Send private message
krinn
Watchman
Watchman


Joined: 02 May 2003
Posts: 7470

PostPosted: Sun Mar 25, 2018 3:59 pm    Post subject: Reply with quote

AntP, you're the winner :D

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
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum