unnecessary check_process calls due to r179870

Jilles Tjoelker jilles at stack.nl
Fri Nov 6 15:10:33 UTC 2009


I noticed that r179870 considerably slows down startup on my qemu
virtual machine running on an old box. Reverting it speeds up the
/etc/rc part of the startup by about 30%. This is because with r179870
the check_process or check_pidfile (eval $_pidcmd) is executed even if
the service is not enabled.

It also seems strange that eval $_pidcmd is done even if $rc_fast is
enabled. Skipping the eval if $rc_fast or $rc_quiet are enabled provides
a similar speedup.

One part of check_process that seems particularly slow is the
ps ... -ax | while read loop. Now that pgrep is in /bin it may be faster
to use that.

-- 
Jilles Tjoelker


More information about the freebsd-rc mailing list