Boot Performance

ColinPercival is coordinating an effort to speed up the FreeBSD boot process. He is using an Amazon EC2 c5.xlarge instance as a reference platform and measuring the time between the instance entering "running" state and when it is possible to SSH into the instance.

Current Performance

Some statistics collected in August 20211:

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

Colin would like to see FreeBSD become far more competitive in 14.0. Some improvements have already been made since 13.0.

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 | ./ | /usr/local/bin/perl -flamechart -colors tslog > tslog.svg

Known Performance Issues

Colin would like to extend TSLOG to cover the userland boot process as well, which may reveal further issues.

Past Performance Improvements

Boot performance improvements which have been prompted by this effort:


BootTime (last edited 2021-10-03T22:21:54+0000 by ColinPercival)