Raspberry Pi boots off an NVMe SSD, natively!

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
the compute module 4 this tiny little thing is a truly expandable raspberry pi able to be used in many ways for example there's a project called cm4aes which builds some super high fidelity audio outputs straight into the raspberry pi or take this board the mirko pc which i just got in the mail from poland one guy mirak saw the compute module 4 and decided he wanted to build a full mini pc with it so he did he designed this pcb and had it manufactured then soldered all the components to make a full-fledged mini pi pc with tons of neat features including a built-in high quality headphone amp i'll talk more about this board in a future video but what i wanted to highlight is this part right here in the middle of the board it's the first time i've had a pie board with a full size m key slot and it's really cool because now i can put in any standard nvme ssd on the pi this storage is even faster than when you plug an nvme drive into a standard pi 4 using a usb 3.0 adapter because the storage connects straight to the pi's pci express bus anyways that's not what this video is about either in this video i wanted to test a feature that's so new it's still in beta but soon it'll be available standard on pios and that's nvme booting what does it take to get the pi to boot off an nvme drive like this 500 gig wd black ssd and how much faster are tasks like booting and web browsing to test that i'm going to install the wd black ssd into the miraco pc's m.2 slot then i'll snap in a compute module 4 right where it belongs i booted it up and made sure i could see the attached nvme drive using ls blk in the terminal now in the future the compute modules should be able to boot from nvme drives right away out of the box maybe requiring a tweak to the boot order if you have a compute module with emmc but right now since it's in beta i have to do a few extra steps to get this to work first i shut down the pi and connected it to my mac in usb boot mode so i could update the pi's bootloader to do that i used the usb boot utility on github i modified the boot order so the nvme drive would be used before emmc or sd cards then ran the update pi eeprom's shell script in usb boot finally i ran the rpi boot command with an extra argument dash d nvme which makes sure the nvme boot loader is in place but like i said all that stuff won't be necessary once this feature is out of beta after that was done i booted the pi back up and used the built-in sd card copier utility to copy all the data from the emmc storage to my wd black ssd make sure to check new partition uuids here this copy took some time but once it was done there was one more step to ensure the pi would actually boot properly i had to mount the nvme drive and update the raspberry pi firmware to the latest version using rpi dash update specifying a root path and a boot path like you see on the screen so it would update the firmware on the nvme drive once that was done i shut down the pi then booted back up and look the route and boot partitions are both mounted from the nvme drive and you can also see the boot and route partitions on the internal emmc storage were mounted automatically as if they were external micro sd cards at this point i could reformat the emc storage if i wanted or if i pulled out the ssd the pi would just revert back to booting off the emmc but i didn't want to do that instead i wanted to benchmark this thing my big question how much faster is the pi with an nvme ssd and i wanted to compare boot times and app launch times first i wanted to compare it to a number of different boot options like the built-in emmc storage a fast micro sd card in my case a 64 gig sandisk extreme and the exact same ssd but in a usb 3.0 to nvme adapter like you'd use on a raspberry pi 4. first of all i should mention i made sure to disable bluetooth by adding the disable bt overlay to my boot config and then i disabled hci uart i found the measured boot time was a lot longer on pi's without built in bluetooth if i didn't do that with that sorted here are the numbers boot up times are practically identical i'm not too surprised though the linux boot process has been fine-tuned over the years and the things that take the longest are networking device and graphic system startup none of which are affected by the boot volume speed next up i wanted to test something i do once my pi is booted and actually quite a bit while using the pi open an app do something in it and then quit i built a nodejs script to open chromium load my website then quit chromium there's a link to a blog post with the script in it in the description if you're wondering but you might wonder why i chose my website well because it's a very light and fast website that gives consistent benchmark results because i take privacy seriously and don't load any third-party scripts or trackers if you have your own website you should consider doing the same thing and no i'm not going to segue into a sponsored segment for a vpn here educate yourself on privacy don't do what paid sponsors tell you to do anyways back to the test here are the results and here's where it gets more interesting you can see the emmc is actually a bit faster than the micro sd card and that's because the compute module 4 actually has some optimizations for emmc that make it fairly fast at least compared to even the fastest micro sd cards but the nvme drive is faster still it's 44 percent faster than the micro sd card and 21 percent faster than emmc and just because i know someone's going to ask about it in the comments i also tested the exact same nvme drive on the exact same pi in an external usb 3.0 to nvme adapter to see what kind of overhead loss you get if you use nvme drives through an adapter on a regular pi 4 model b and as a reminder i ran all these tests three times and the numbers in each run were very close with less than two percent standard deviation that's pretty good for a complex benchmark like this and in this benchmark and many others i've seen the same thing about a 10 percent speed up by running the nvme drive native instead of through usb 3.0 now these numbers are one thing but would you really notice the difference using a pi day-to-day yeah you will i guarantee it and remember from my tofu board review nvme storage is actually more than 10 times faster when it comes to raw storage operations like file copies and if you want a final reason why nvme on the pi is a good idea the wd black i'm using should last much longer with many more write cycles than all but the most expensive industrial micro sd cards assuming you have a good power supply and that brings me to the point of the mirko pc's power input you might have noticed a couple low voltage warnings when i was running the benchmarks earlier a fast new ssd like this one can use up to 10 watts and couple that with the pi itself consuming 10 watts at peak and you need at least 20 watts of power to be safe the miraco pc is designed with a 5 volt 3 amp power input and that can only provide 15 watts in fact my fio benchmarks ran into errors a couple times so i re-ran them on the official i o board with a pci to m.2 adapter card so i could provide 12 volts at 5 amps that's over 60 watts of power and this is why it's incredibly important to use a good power supply with a raspberry pi no matter what kind of storage you use it has to provide enough current and handle large spikes a lot of people might not realize it but power supplies are often the reason for micro sd card corruption i've never had corruption on any of the samsung or sandisk microsd cards i use and i've been testing some of these cards since 2014. why is that because i make sure i use good power supplies with my pies and i try not to write tons and tons of data to them like noisy log files sorry for the rant bottom line if you care about your data use a good power supply not the cheapest one you have laying in your drawer so pies can boot off nvme ssds that's pretty cool and yeah a pie is going to bottleneck a fast ssd like the wd black i have it's as going over three gigabytes per second of sequential read speed but current generation pi's will only get about 400 megabytes per second max but they're still super fast on the pi the random i o is way faster on one of these than any other option for pi storage and you can also get nvme ssds in way larger sizes with much better performance than microsd cards plus they're much smaller than even 2.5 inch sata drives and that brings me to my current suggestion for the pi foundation if there's any way a future pi 5 could include four lanes of pci express throughput and i don't know maybe an m.2 slot under the board that would make one heck of a single board computer until then i'll be using boards like the miraco pc and the compute module 4 so i can get the fastest pi performance possible for my particularly pertinent projects until next time i'm jeff gearling and my app just locked up so i can't do anything right now because i take privacy private privacy privacy privacy privacy with tons of neat features including oh man every time i add words it doesn't make sense well that's because it's a very light and fast website no somebody texted me i really need to learn to turn off notifications when i'm recording
Info
Channel: Jeff Geerling
Views: 130,498
Rating: 4.9711308 out of 5
Keywords: raspberry pi, nvme, pci express, pcie, fast, boot, beta, pi os, firmware, bootloader, rpi-update, eeprom, usbboot, rpiboot, terminal, mirkopc, micro pc, small pc, western digital, wd, sn750, wd_black, performance, benchmark, speed, test, emmc, microsd, comparison, sbc, tiny, pc, update, upgrade, fastest, hack, usb, usb 3.0, adapter, ssd, solid state, flash
Id: 4Womn10v71s
Channel Id: undefined
Length: 9min 30sec (570 seconds)
Published: Tue Mar 23 2021
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.