Re: bin/60607: /etc/rc does too much throw-away work and is needlessly slow on constrained systems

"Taylor R Campbell via gnats" <[email protected]>
Newsgroups gmane.os.netbsd.bugs
Message-ID <[email protected]>
The following reply was made to PR bin/60607; it has been noted by GNATS.

From: Taylor R Campbell <[email protected]>
To: Jason Thorpe <[email protected]>
Cc: [email protected], [email protected]
Subject: Re: bin/60607: /etc/rc does too much throw-away work and is needlessly slow on constrained systems
Date: Mon, 17 Aug 2026 13:19:16 +0000

 > Date: Mon, 17 Aug 2026 05:35:00 +0000 (UTC)
 > From: Jason Thorpe <[email protected]>
 > 
 > I've devised a simple solution to the problem that's minimally
 > invasive and, on the wrap030 homebrew, cuts the boot time (with
 > ldconfig=NO) from ~13 minutes to ~7 minutes.
 
 Nice!
 
 > 2. Another small change to /etc/rc where the real work of invoking
 > the rc.d scripts is performed.  This second change introduces the
 > notion of the "rcorder.cache".  At boot time, if it is determined
 > that the cache needs to be rebuilt, then all of the rc.d scripts are
 > interrogated in rcorder-order to see if they will do work.  If so,
 > they're added to the list, otherwise they are ignored.  Once the
 > list is built, then the list is invoked to start each service in the
 > normal way.  The list is saved in the "rcorder.cache" and consulted
 > at the next boot.  The cache is invalidated by modifying
 > /etc/rc.conf, /etc/rc.d, or by manually removing /etc/rcorder.cache.
 
 Can you make this part optional, and/or populated up front at
 build-time or repopulated on request?  It would be nice if we could
 boot to multi-user from a read-only /, with all state stored on other
 file systems like /var, and without spurious EROFS warnings spewed to
 the console.  (I know we'll hit issues with, e.g., /etc/motd today,
 but I'd like to avoid adding more issues.)
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.