NetBSD-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: 7.0_RC1 slow boot



Sorry, I have been neglecting NetBSD for a while.

On Mon, 13 Jul 2015, Eric Haszlakiewicz wrote:
On July 13, 2015 6:14:47 AM EDT, Arto Huusko <armihu%gmail.com@localhost> wrote:
On 12.07.2015 21:02, Martin Husemann wrote:
On Sun, Jul 12, 2015 at 08:47:13PM +0300, Arto Huusko wrote:
I also tested 7.99.19, and it is just as slow to boot as 7.0_RC1,
and
vmstat numbers are pretty much the same.

See:
http://mail-index.netbsd.org/tech-userlevel/2015/06/01/msg009153.html

That helped, but only about 1-2 seconds, so with that 7.0_RC1 boot is 43 seconds compared to 11 seconds of 6.1.5. But I looked at other rc changes in 7.0, and reverting revision 1.94 of etc/rc.subr restored the boot speed back to the same level as in 6.1.5, and number of forks dropped back from over 1000 to less than 300.

At a glance the diffs do look like they should not cause any forks, but maybe someone should take a closer look.

That diff appears to replace a simple "-n" test with a function that does an eval, a kill and a expr, the last with an embedded command substitution to run ps, so it'll definitely cause more forks. It's aimed at determining whether some pid is alive, but it seems like an awful lot of work to be doing just for that.

It's not just checking whether a pid is alive, it's checking whether the
PID represents a shell running /etc/rc, to guard against pids being
recycled.  That part is probably unnecessary.

I can also reduce the number of times _have_rc_postprocessor is called.

--apb (Alan Barrett)


Home | Main Index | Thread Index | Old Index