On Fri, Jul 18, 2008 at 10:19:22PM -0700, Doug Barton wrote: > Bernd Walter wrote: > >Speaking about small systems, where startup time is more a problem than > >on 08/15 desktop and server systems. > >What I would love to see is that scripts like moused, ypserv, lpt, etc > >are not started if the services are disabled. > > That wold be a neat trick, how do you propose we accomplish it? (no, > I'm not being snide.) Sorry - I have no proposal - just a few ideas, of which I know none is perfect. I think it would be great if rcorder can honour the settings somehow, but I'm aware that rc.conf is a shell script and that some files are not depended on any kind of _enable variable. But if we can teach rcorder at least to read the foo_enable variables and drop the script that provide foo. Nevertheless I don't asume it to be a simple task. I'm not familar enough with all the details on how to implement it nor do I request it. All I wanted to do is spread an idea and hope that someone can do something with it. > There are 144 scripts in /etc/rc.d/ on HEAD right now. Out of those I > count roughly 40 that I actually need, so let's round off to 100 > unnecessary scripts to make the math easy. On my system (a pretty fast > C2D) it takes roughly .3 seconds of wall clock time to run one script > that is not enabled. Now cut that roughly in half since each of those > scripts will not have to suck in /etc/rc.subr and /etc/rc.conf* when > run at boot time, and that's 15 seconds of boot time that I could save > on average, let's say +/- 5 seconds. That's worth giving some thought to. Well - my problem about this is more problematic: [217]arm9# time /etc/rc.d/moused start 0.000u 0.000s 0:01.73 44.5% 1196+13491k 1+0io 2pf+0w Ok - you wrote below that rc.subr and Co are loaded only once, so the time on booting should be better. Also the system is not completely idle right now. But anyway - it's a much longer time for slow embedded systems. rcorder is run only once and fast enough for that: [220]arm9# time rcorder /etc/rc.d/* /usr/local/etc/rc.d/* [...] /etc/rc.d/bluetooth /etc/rc.d/bgfsck 0.000u 0.000s 0:01.04 54.8% 777+17180k 0+0io 0pf+0w > One way you could do this is to have /etc/rc.d/active and > /etc/rc.d/inactive (and probably an /etc/rc.d/system for critical > stuff that most people shouldn't touch). Then you could have a > vipw-like system to allow users to edit rc.conf that would move the > scripts to the right directory. Of course, this would be fraught with > potential for problems. :) That's why I'm not doing it manualy, although there are scripts that I will never need to enable. > Another thing that would work for systems that a more sophisticated > admin/user updates with mergemaster would be to write a pre-compare > script that removes all the scripts you know you don't need from the > temproot/etc/rc.d so that they don't get installed. Of course the > benefit of that would not be nearly as wide spread, but it would also > not result in so much foot-shooting. > > >So far each script is started, sucks in routines plus rc.conf > > We're actually a little smarter than that. :) rc.subr and > rc.conf[.local] are loaded once by rc, then each script that runs > inherits those values. That's bad to hear, since that fruit is already taken then ;-) -- B.Walter <bernd_at_bwct.de> http://www.bwct.de Modbus/TCP Ethernet I/O Baugruppen, ARM basierte FreeBSD Rechner uvm.Received on Sat Jul 19 2008 - 20:49:03 UTC
This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:39:33 UTC