FreeBSD The Power to Serve

Boot Performance Improvements

Contact: Colin Percival <cperciva@FreeBSD.org>

Colin Percival is coordinating an effort to speed up the FreeBSD boot process. For benchmarking purposes, he is primarily using an EC2 c5.xlarge instance as a reference platform and is measuring the time between when the virtual machine enters the EC2 "running" state and when it is possible to SSH into the instance.

This work started in 2017, and as of the end of December 2021 the FreeBSD boot time was reduced from approximately 30 seconds to approximately 10 seconds. During 2022Q1, further improvements have shaved more time off the boot process, taking it down to roughly 8 seconds

Two major issues remain outstanding:

  1. The first time an EC2 instance boots, dhclient takes about 2 seconds longer than normal to get an IPv4 address. The cause of this is unknown and requires investigation.

  2. IPv6 configuration includes two one-second-long sleep(1) invocations, one from /etc/rc.d/netif and the other from /etc/rc.d/rtsold. It might be possible to simply remove these; but care is needed to avoid progressing too far in the boot process before IPv6 addresses are configured. Input from IPv6 experts is required here.

Issues are listed on the wiki page as they are identified; the wiki page also has instructions for performing profiling. Users are encouraged to profile the boot process on their own systems, in case they experience delays which don’t show up on the system Colin is using for testing.

This work is supported by Colin’s FreeBSD/EC2 Patreon.


Last modified on: June 10, 2022 by Daniel Ebdrup Jensen