Differences
This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
| boottime [2022/03/24 21:54] – Update to current status. ColinPercival | boottime [2023/07/25 13:34] (current) – Consistent with <https://github.com/cperciva/freebsd-boot-profiling/pull/3> for USAGE. GrahamPerrin | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | ===== Introduction | + | ===== Boot Performance |
| 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. | 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. | ||
| Line 9: | Line 9: | ||
| Boot time consists of four consecutive stages: | Boot time consists of four consecutive stages: | ||
| - | - System: BIOS/UEFI, before running any %%FreeBSD%% code -- we can't do anything about this. | + | - System: BIOS/UEFI, before running any %%FreeBSD%% code – we can't do anything about this. |
| - %%FreeBSD%%: | - %%FreeBSD%%: | ||
| - %%FreeBSD%%: | - %%FreeBSD%%: | ||
| Line 15: | Line 15: | ||
| ===== Boot Profiling ===== | ===== Boot Profiling ===== | ||
| - | The boot loader and kernel can be profiled using the TSLOG framework to generate a flamechart. | ||
| - | | + | For visual analysis of the four stages: use [[https:// |
| - | - Check out the [[https:// | + | |
| - | - Run '' | + | For example, run the following command to extend the GENERIC |
| + | |||
| + | '' | ||
| + | |||
| + | – then build, install and use the GENERIC kernel. | ||
| + | |||
| + | Checkout | ||
| + | |||
| + | '' | ||
| ===== Current Performance ===== | ===== Current Performance ===== | ||
| Line 44: | Line 51: | ||
| Loader (~260 ms, more on first boot): | Loader (~260 ms, more on first boot): | ||
| * Reading the kernel from disk takes ~150 ms. This would be faster with a smaller and/or a compressed kernel, but tooling work would be needed for kernel updates. | * Reading the kernel from disk takes ~150 ms. This would be faster with a smaller and/or a compressed kernel, but tooling work would be needed for kernel updates. | ||
| - | * The first time an EC2 instance boots, this I/O takes longer | + | * The first time an EC2 instance boots, this I/O takes longer |
| * The loader spends ~45 ms printing status information to the console. | * The loader spends ~45 ms printing status information to the console. | ||
| * The loader spends ~65 ms on other stuff (reading in the lua scripts, loading fonts, etc). | * The loader spends ~65 ms on other stuff (reading in the lua scripts, loading fonts, etc). | ||