18 ms·
For people (like me) who are wondering why a kernel needs to boot in under 28ms: It's for virtual machines that get launched on-demand in services like AWS Lamb
by timmaxw 3y ago
For people (like me) who are wondering why a kernel needs to boot in under 28ms: It's for virtual machines that get launched on-demand in services like AWS Lambda. https://www.daemonology.net/blog/2022-10-18-FreeBSD-Firecracker.html https://www.daemonology.net/blog/2022-10-18-FreeBSD-Firecrac...
- atmosx 3y agoThere was an article about a Linux embedded system handling a car back-camera that had to boot within 3-5 seconds or something along those lines.
- mongol 3y agoYes I remember being surprised that Linux containers were used for that purpose.
- srcreigh 3y agoVery OT, but I concur. I need a DSP for my car audio system. I considered a rpi3 with a DAC attachment. I tried the raspbian OS with some moderate overclocking and removing unneeded startup processes. Couldn’t get it under 25 seconds for boot. Kind of a deal breaker (remote start unit could help, but…) Apparently somebody can start the rpi3 in <3 seconds. I’ll believe it when I try their image myself. Their setup disables USB and networking (maybe audio too who knows) which is a giant pain for configuring my system. Maybe I’ll try again with an RPi 4 and usb3 nvme. or maybe I’ll just pay hundreds of dollars for a dedicated DSP unit. In case anyone cares, my main use case is parametric EQ for phon adjusted low bass frequencies. 90dB 20Hz sounds as loud as 70dB 50Hz (give or take) and subwoofers are generally quieter at lower frequencies. Hence, audio processing unit to cut as you go higher than your lowest decently loud frequency. The lowest cost option for this is about $230USD plus some electrical components (miniDSP 2x4HD). I figure the rpi would cost around $100 including the DAC unit, open source audio software, just need some power source to link the battery to the rpi power cord. Edit: I don’t want to spam thanks comments for helpful replies, so I’ll just say it here (possibly in advance): thanks!!!
- pid-1 3y agoSearch ebay etc... for Texas Instruments DSP evaluation boards.
- ju-st 3y agoYou could use a ADAU1701 DSP board (cheaper and shittier minidsp) or do it directly on a modern/fast microcontroller, e.g. ESP32. I used an ESP32 to adjust frequency response of a small diy loudspeaker (and added Bluetooth).
- JeffeFawkes 3y agoIf you make your own buildroot image, you can get VERY quick boot times - here's a random vid I found [1] with 3.5 seconds on a pi zero w (which is considerably less powerful than a Pi3. I've worked with similarly underpowered boards (licheepi zero, only has 64mb ram and uses the cpu from a dashcam!) and those will still boot and start an SDL app in under five seconds. If you can identify the bare minimum that you need for your EQ solution, you can probably get similar boot times. [1]: https://www.youtube.com/watch?v=ZehLyumyMvE https://www.youtube.com/watch?v=ZehLyumyMvE
- jakear 3y agoWild that people have accepted a 5000ms delay between starting their car and seeing behind them. I suppose I'm more sensitive to downtime than most - I recently (unsuccessfully) tried to add a ton of capacitance into my head unit's power supply and acc-signal lines to keep it from turning off for a few seconds when starting the engine.
- chii 3y agoprobably because it started off as a 1000ms delay, which they begrudgingly accepted. Then it started to slow to 1100ms....
- cwalv 3y agoUp until a couple years ago my car didn't even have a camera. We just looked out the window, which is still an option.
- Sharlin 3y agoA large majority of cars in traffic don’t have a back camera. Either because they’re old or because they’re cheap (I don’t think a back camera is usually a standard feature at least where I’m from…)
- kalleboo 3y agoIn the US a backup camera is now required by law
- Someone 3y agoFor new cars, I guess. In the EU, it’s similar. https://ec.europa.eu/info/law/better-regulation/have-your-say/initiatives/12224-Vehicle-safety-technical-rules-test-procedures-for-advanced-safety-features_en https://ec.europa.eu/info/law/better-regulation/have-your-sa...: All new vehicles sold from May 2022 must be fitted with advanced safety features, including: - monitors that detect when a driver has become drowsy or distracted - emergency stop signal to help prevent rear-end collisions - rear-view camera or parking sensors - alcohol interlock system to prevent drunk driving. These systems will help reduce serious accidents on Europe’s roads.
- CalChris 3y agoMy 2015 Model S would lose badly in a quarter mile against a good cyclist if you included cold boot time. Worst bank robbery car ever.
- rfmoz 3y agoWith a custom kernel and without initrd/initramfs is possible to boot around 1 second.
- rascul 3y agoMight be quicker if you put everything you need into an initramfs that's built into the kernel. Then there's no slow storage needed once the kernel is loaded.
- hwd 3y agoThere is an interesting talk from BMW how they did it for their cars: https://youtu.be/_cSTBiwY7HE https://youtu.be/_cSTBiwY7HE.
- ciupicri 3y ago"Linux Kernel Fastboot On the Way", Linux Plumbers Conference 2019, https://www.linuxplumbersconf.org/event/4/contributions/281/attachments/216/617/LPC_2019_kernel_fastboot_on_the_way.pdf https://www.linuxplumbersconf.org/event/4/contributions/281/... / https://www.youtube.com/watch?v=A7N_O8pnyTw https://www.youtube.com/watch?v=A7N_O8pnyTw
- avidphantasm 3y ago3-5 seconds sounds like the latency I see in my 2018 Toyota’s garbage Entune 2.0 system. It’s criminal that things like this are released for general usage.
- abwizz 3y agomeanwhile our new dishwasher takes between two and four SECONDS from pressing the power button to showing something on the display
- moring 3y agoBut you still bought this one and not one of the alternatives that start faster... which is part of the reason things get built this way.
- Narretz 3y agoUnfortunately stuff like boot time / time to interactive isn't in the specifications. You have to check user reviews, and not everybody cares about this.
- vladvasiliu 3y agoI doubt this is an absolute requirement. Would I choose the faster booting dishwasher among a set of otherwise identical ones? Sure. Would I pay more for it to boot faster? It depends. €10? Sure. 100? Nah. Plus, as the sibling poster says, you usually don't know this before you first start to use it, which means it's already been delivered, connected, and everything.
- Shaanie 3y agoWould you really pay $10 for your dishwasher to boot in 1s instead of 4s? I absolutely wouldn't. Maybe $1, but even that is pushing it.
- jusssi 3y agoFor something that's going to annoy you daily for the next 10+ years? I'd definitely pay $10. I'd pay another $10 for the dishwasher to remember the program selection instead of always offering the 4+ hours eco program (which I believe is required by some regulation to be the default). I already paid $100 more for 2dB less, according to the spec. No regrets.
- contrarian1234 3y agoVery naiive question... But why can't you "just" memcopy and exec an image of an already booted system?
- throwawaylinux 3y agoSimplistic answer is because hardware and firmware environment gets configured during boot, even for virtual machines. Some virtual machine environments do have facilities to snapshot the entire state of a machine and resume it (potentially on another machine), but if you look at what is involved with snapshot metadata it's more than just the state of memory, you have CPU and device state as well.
- PMunch 3y agoWouldn't hibernating the machine and then copying the hibernation data to another machine do the trick? Sure it wouldn't be as instant, but it would skip most of the boot configuration.
- Angostura 3y agoPossibly a bit fragile if there is any situation where one day the other machine isn't entirely identical? (just hand-waving here)
- j16sdiz 3y agoThe usual culprit is CPU feature flags on different CPU generations.
- LeifCarrotson 3y agoWell then wouldn't you just have one image file for each CPU generation in your datacenter. Or better yet, have one image file on the hypervisor for each individual machine! That machine is probably dedicated to Lambda instances and boots them 1000x per day, if you're spending valuable time that's actually customer-facing latency on each call to reboot the system then switch that memory<->time tradeoff back towards memory!