Linux Will Be Able To Boot ~0.035 Seconds Faster With One Line Kernel Patch
The Linux kernel itself can already boot quite fast but with a simple one-line patch another ~0.035 seconds will be able to be shaved off the boot time.
Intel Linux engineer Colin Ian King discovered that if aligning the slab in the ACPI code via the "SLAB_HWCACHE_ALIGN" flag will offer a measurable improvement in memory performance and reducing the kernel boot time.
Colin explained with this one line kernel patch:
Linux has seen a lot of work on optimizing the kernel boot time, going back originally to the days of the netbooks craze and in the years since for better optimizing Linux servers...
A boot savings of around 0.035 seconds will be hardly noticeable to end-users but every little bit counts, especially in the case of hyperscalers and others needing to minimize downtime in the data center whether it be on bare metal servers or VMs. And for just being a one-line patch makes it all the more of an easy and nice win.
Intel Linux engineer Colin Ian King discovered that if aligning the slab in the ACPI code via the "SLAB_HWCACHE_ALIGN" flag will offer a measurable improvement in memory performance and reducing the kernel boot time.
Colin explained with this one line kernel patch:
"Enabling SLAB_HWCACHE_ALIGN for the ACPI object caches improves boot speed in the ACPICA core for object allocation and free'ing especially in the AML parsing and execution phases in boot. Testing with 100 boots shows an average boot saving in acpi_init of ~35000 usecs compared to the unaligned version. Most of the ACPI objects being allocated and free'd are of very short life times in the critical paths for parsing and execution, so the extra memory used for alignment isn't too onerous."
Linux has seen a lot of work on optimizing the kernel boot time, going back originally to the days of the netbooks craze and in the years since for better optimizing Linux servers...
A boot savings of around 0.035 seconds will be hardly noticeable to end-users but every little bit counts, especially in the case of hyperscalers and others needing to minimize downtime in the data center whether it be on bare metal servers or VMs. And for just being a one-line patch makes it all the more of an easy and nice win.
40 Comments