FreeBSD Boot Times

Brandon Falk bfalk_bsd at brandonfa.lk
Wed Jun 13 17:06:11 UTC 2012


On 6/13/2012 10:19 AM, Nathan Whitehorn wrote:
> On 06/12/12 18:00, Richard Yao wrote:
>> On 06/11/12 18:51, Garrett Cooper wrote:
>>> On Mon, Jun 11, 2012 at 3:21 PM, Brandon 
>>> Falk<bfalk_bsd at brandonfa.lk>  wrote:
>>>> Greetings,
>>>>
>>>> I was just wondering what it is that FreeBSD does that makes it 
>>>> take so long
>>>> to boot. Booting into Ubuntu minimal or my own custom Linux distro,
>>>> literally takes 0.5-2 seconds to boot up to shell, where FreeBSD 
>>>> takes about
>>>> 10-20 seconds. I'm not sure if anything could be parallelized in 
>>>> the boot
>>>> process, but Linux somehow manages to do it. The Ubuntu install I 
>>>> do pretty
>>>> much consists of a shell and developers tools, but it still has a 
>>>> generic
>>>> kernel. There must be some sort of polling done in the FreeBSD boot 
>>>> process
>>>> that could be parallelized or eliminated.
>>>>
>>>> Anyone have any suggestions?
>>>>
>>>> Note: This isn't really an issue, moreso a curiosity.
>>>      The single process nature of rc is a big part of the problem, as
>>> is the single AP bootup of FreeBSD right before multiuser mode. There
>>> are a number of threads that discuss this (look for parallel rc bootup
>>> or something like that in the current, hacker, and rc archives -- the
>>> most recent discussion was probably 6~9 months ago).
>>>      Given past experience, a big part of getting past the parallelized
>>> rc mess would be to make services fail/wait gracefully for all their
>>> resources to come up before proceeding. It's not easy, but it's
>>> possible with enough resources.
>>> HTH,
>>> -Garrett
>>> _______________________________________________
>>> freebsd-hackers at freebsd.org mailing list
>>> http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
>>> To unsubscribe, send any mail to 
>>> "freebsd-hackers-unsubscribe at freebsd.org"
>> Gentoo FreeBSD shares OpenRC with Gentoo Linux. OpenRC is a BSD 2-clause
>> licensed System V init system replacement that supports parallel boot.
>> Its boot performance is competitive with systemd and Ubuntu's upstart.
>>
>> If FreeBSD's init system is serializing the boot process, it might be
>> worthwhile to consider importing OpenRC.
>> _______________________________________________
>> freebsd-hackers at freebsd.org mailing list
>> http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
>> To unsubscribe, send any mail to 
>> "freebsd-hackers-unsubscribe at freebsd.org"
>
> Please don't change any of the user-facing aspects of the RC system. 
> One of the things that brought me (and many others I know) to FreeBSD, 
> besides working sound, was having an rc.conf that was easy to 
> configure instead of the nightmare that is System V init.
> -Nathan
> _______________________________________________
> freebsd-hackers at freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
> To unsubscribe, send any mail to 
> "freebsd-hackers-unsubscribe at freebsd.org"

Sorry guys, I was very busy last night.

The issue is not the init system, rather the kernel. Maybe for a server 
does the init system start to get lengthy, but at least on my desktop 
environment where I have almost nothing for RC to do, the kernel bootup 
takes about 95% of the boot process.

If I were to really delve into this (as it would require extensive 
changes in the kernel [I think]), I would probably end up branching 
FreeBSD either to a new OS, or if I got permission, to just another 
branch of FreeBSD.

-Brandon


More information about the freebsd-hackers mailing list