ColinPercival is coordinating an effort to speed up the FreeBSD boot process and would like to see FreeBSD become far more competitive in 14.0. Some improvements have already been made since 13.0.

An Amazon EC2 c5.xlarge instance is being used as a reference platform and measuring the time between the instance entering "running" state and when it is possible to SSH into the instance.

Boot Components

Boot time consists of four consecutive stages:

  1. System: BIOS/UEFI, before running any FreeBSD code -- we can't do anything about this.
  2. FreeBSD: boot loader.
  3. FreeBSD: kernel, before init starts running.
  4. FreeBSD: userland boot process.

Boot Profiling

The boot loader and kernel can be profiled using the TSLOG framework to generate a flamechart. To do this:

  1. Build a kernel with 'options TSLOG'.
  2. Check out the freebsd-boot-profiling repository

  3. Run sh > tslog.svg

Current Performance

Some statistics collected in August 20211:

Performance is measured using the ec2-boot-bench utility.

How it started

How it's going

(As of late March 2022.)

Known Performance Issues

Loader (~260 ms, more on first boot):

Kernel (~ 400 ms):

Userland (~ 3500 ms, more on first boot):

Performance Issues not affecting EC2

In addition to the above, there are some performance issues which don't affect the benchmark system but should be addressed to help other platforms.

On Colin's 13.0-RELEASE laptop:

Past Performance Improvements

Boot performance improvements which have been prompted by this effort:

CategoryProject CategoryPerformance

BootTime (last edited 2022-03-24T21:54:34+0000 by ColinPercival)