Date: Fri, 6 Nov 2009 16:10:31 +0100 From: Jilles Tjoelker <jilles@stack.nl> To: freebsd-rc@freebsd.org Subject: unnecessary check_process calls due to r179870 Message-ID: <20091106151031.GA54363@stack.nl>
next in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20091106151031.GA54363>
