4 ms·
My contribution: FreeBSD 13.1 boots significantly faster than FreeBSD 13.0; in EC2 it's over a 2x speedup. I'll be talking about this at BSDCan in a few weeks.
by cperciva 4y ago
My contribution: FreeBSD 13.1 boots significantly faster than FreeBSD 13.0; in EC2 it's over a 2x speedup.
I'll be talking about this at BSDCan in a few weeks. (Virtual conference, so it's not too late to sign up!)
- rwaksmunski 4y agoThank you for what you do.
- stingraycharles 4y agoAwesome, how did you do that? We use plenty of short-lived FreeBSD agents for our (AWS-hosted) CI builds, so a 2x speed up would be very welcome!
- MuffinFlavored 4y agoBoot Loader Changes This section covers the boot loader, boot menu, and other boot-related changes. Boot Loader Changes UEFI boot is improved for amd64. The loader detects whether the loaded kernel can handle the in-place staging area (non-copying mode). The default is copy_staging auto. Auto-detection can be overridden, for example: with copy_staging enable, the loader will unconditionally copy the staging area to 2M, regardless of kernel capabilities. Also, the code to grow the staging area is more robust; for growth to occur, it’s no longer necessary to hand-tune and recompile the loader. (Sponsored by The FreeBSD Foundation) boot1 and loader have been fixed on powerpc64le. 8a62b07bce7 Other Boot Changes Performance improvements have been made to loader(8), nvme(4), random(4), rtsold(8), and x86 clock calibration, which collectively yield a significant speedup in system boot time. Configuration changes on the EC2 platform provide additional benefits, resulting in 13.1-RELEASE booting over twice as fast as 13.0-RELEASE. (Sponsored by https://www.patreon.com/cperciva https://www.patreon.com/cperciva) EC2 images are now built by default to boot using UEFI instead of legacy BIOS. Note that UEFI is not supported by Xen-based EC2 instances or by "bare metal" EC2 instances. 65f22ccf8247 (Sponsored by https://www.patreon.com/cperciva https://www.patreon.com/cperciva) Support was added for recording EC2 AMI Ids in the AWS Systems Manager Parameter Store. FreeBSD will be using the public prefix /aws/service/freebsd, resulting in parameter names which look like /aws/service/freebsd/amd64/base/ufs/13.1/RELEASE. 242d1c32e42c (Sponsored by https://www.patreon.com/cperciva https://www.patreon.com/cperciva)
- ComputerGuru 4y agoAlso, for IPv6 users: > The -i flag is now added to rtsol(8) and rtsold(8) by default in /etc/defaults/rc.conf. a0fc5094bf4c > ... > The -i option has been added to rtsol(8) and rtsold(8) to disable the random delay between zero and one seconds, speeding up the boot process. 8056b73ea163
- loeg 4y agoIdentifying slow pieces of boot: https://github.com/freebsd/freebsd-src/search?q=TSENTER https://github.com/freebsd/freebsd-src/search?q=TSENTER , etc: https://github.com/freebsd/freebsd-src/blob/main/sys/sys/tslog.h https://github.com/freebsd/freebsd-src/blob/main/sys/sys/tsl... , and then eliminating low hanging fruit (many, but not all of his recent commits): https://freshbsd.org/freebsd/src/branch/main?merge=false&author[]=Colin+Percival+%28cperciva%29 https://freshbsd.org/freebsd/src/branch/main?merge=false&aut...
- cperciva 4y agoAs loeg says, profiling and then working my way through the list of places we're spending a lot of time. I'd love to hear more about how you're using FreeBSD/EC2; can you send me an email?
- arthurcolle 4y agoNice work, you are a champ. Anything fun and new planned with tarsnap by any chance?
- cperciva 4y agoLots of things planned. Unfortunately my schedule got rather derailed after a very demanding baby arrived last year -- in a sense the FreeBSD work is thanks to her since I couldn't focus enough to do tricky tarsnap coding. Now that she's over a year old and the FreeBSD boot speedup work is mostly wrapping up I'm hoping to get back to more tarsnap coding soon.
- asveikau 4y agoCongrats on the kiddo.
- cperciva 4y agoThanks! She's bright and alert and well ahead of her milestones (crawling at 2 months, independently walking at 11 months, and confidently running around at 13 months) -- but along with the energy comes only wanting 10 hours of sleep per day (including her afternoon nap) which sadly makes for two rather sleep deprived parents. :-/
- queuebert 4y agoGotta love those FOMO babies!
- rayiner 4y agoCongrats! Crawling at 2 months! My 10 month old is just learning to crawl. I blame his giant head.
- cperciva 4y agoTo be fair, that was just commando crawling and it took her five minutes to get a few feet. But she was doing a "traditional crawl" at five months (and charging full speed for the door to the basement stairs if we ever made the mistake of leaving it open).
- gautamcgoel 4y agoI think I prompted you to look into this a few years ago: https://news.ycombinator.com/item?id=26051254#26051847 https://news.ycombinator.com/item?id=26051254#26051847 Anyways, thanks for all of your work :)
- cperciva 4y agoAs I said in that thread, I started working on this in 2017 (indeed, the tslog profiling I encouraged you to try was my first step).