News for hackers. Stuff that matters.
Re:Upgrade Raspberry Pi 4 with a NVMe boot drive by geerlingguy on Monday November 23, 2020 @06:35PM (#25193257)
Just wanted to note that you DO get a large (measurable) performance increase using NVMe natively via the Pi's PCIe bus vs. through a USB 3.0 adapter; see my notes in my Compute Module 4 review: https://www.jeffgeerling.com/blog/2020/raspberry-pi-compute-...

I should probably dedicate a post and video to NVMe support, but basically you get double the random IO numbers if using NVMe vs NVMe-via-USB3. You can't boot off internal NVMe though, at least not natively with no microSD card or eMMC volume.

Re:Upgrade Raspberry Pi 4 with a NVMe boot drive by FullyFunctional on Monday November 23, 2020 @09:18PM (#25194560)
Thanks for the write up. That was enlightening. PCIe is a really nice "bus" all things considered. At DSSD we liked it so much that we ran it directly to clients, over custom cables & connectors.
Re:Upgrade Raspberry Pi 4 with a NVMe boot drive by brirec on Monday November 23, 2020 @10:27PM (#25194971)
What sort of distance are we talking? What sort of devices? Running a PCIe lane to a client seems a little odd to me, but I figure I’m missing context
Re:Upgrade Raspberry Pi 4 with a NVMe boot drive by FullyFunctional on Tuesday November 24, 2020 @12:06AM (#25195459)
Up to 2 m over copper, longer over active optical. Why? Because of insanely low latency and very high bandwidth (PCIe gen 3 x4 in 2010!). No kernel involvement, app direct to storage. Way ahead of the time.
Re:Upgrade Raspberry Pi 4 with a NVMe boot drive by alexellisuk on Tuesday November 24, 2020 @07:32AM (#25197841)
Looking forward to getting my hands on one :-) Next time you speak to the RPi folks, feel free to name-drop. Getting into the "RPi alpha tester club" would be very helpful for writing tutorials like this.
Re:Upgrade Raspberry Pi 4 with a NVMe boot drive by kzrdude on Monday November 23, 2020 @02:41PM (#25190789)
One needs to login to read. I'm sorry, medium is not a very charitable blog host, and will cost the blog a large part of its audience with these new rules, unfortunately.
Re:Upgrade Raspberry Pi 4 with a NVMe boot drive by lxe on Monday November 23, 2020 @03:00PM (#25191041)
I'm getting pretty irritated that the Web is inundated with Medium. It used to be just a nice blog host, and now I don't even know what it is. Glad Substack is picking up steam.
Re:Upgrade Raspberry Pi 4 with a NVMe boot drive by sp332 on Monday November 23, 2020 @04:49PM (#25192349)
You know Substack has paid subscriptions too, right?
Re:Upgrade Raspberry Pi 4 with a NVMe boot drive by anderspitman on Wednesday November 25, 2020 @01:14PM (#25212305)
How is substack today different from Medium a few years ago? More importantly, what's different about their incentives that will prevent them from becoming what Medium is today?
Re:Upgrade Raspberry Pi 4 with a NVMe boot drive by 1vuio0pswjnm7 on Monday November 23, 2020 @09:04PM (#25194465)
"One needs to login to read."

Not if Javascript is disabled. No need for cookies either.

Alternatively, blocking cdn.client.medium.com where the Javascript is sourced in Developer Tools or via ad blocker, /etc/hosts, DNS, etc. will work, too.

Re:Upgrade Raspberry Pi 4 with a NVMe boot drive by kzrdude on Tuesday November 24, 2020 @06:18AM (#25197435)
There's a lot of countermeasures listed here in the responses, including this. :)

Good to know but the default experience matters. I have a beef here and I want the author to know that they need to switch blog host if they want their articles to be out on the open web and not behind logins or whatever.

Re:Upgrade Raspberry Pi 4 with a NVMe boot drive by 1vuio0pswjnm7 on Tuesday November 24, 2020 @08:02PM (#25204852)
I was careful to only quote the first sentence of the comment. I understand and agree with the point being made in the remainder of the comment.

I also think the "default experience" matters in terms of web browsers. Why do they all default to Javascript and cookies enabled. In this case, and there are hundreds of thousands of others, neither was technically necessary to read the blog.

Re:Upgrade Raspberry Pi 4 with a NVMe boot drive by meditative on Tuesday November 24, 2020 @12:21AM (#25195541)
pictures fail to load when I block the domain
Re:Upgrade Raspberry Pi 4 with a NVMe boot drive by 1vuio0pswjnm7 on Tuesday November 24, 2020 @02:33AM (#25196175)
Some of the images do not load when Javascript is disabled because the web developer has chosen to include three different-sized copies of the same image and use Javascript to emulate a "zoom" effect.

Quick fix: remove the <noscript> tags

   curl https://alexellisuk.medium.com/upgrade-your-raspberry-pi-4-with-a-nvme-boot-drive-d9ab4e8aa3c2 |sed 's/<noscript>//g;s/<.noscript>//g' > 1.htm

   firefox ./1.htm
Note you can still zoom on these images. Right-click and open the image in a new tab, then zoom. Or you can open the larger versions in a browser tab and then zoom. The full URLs for all different-sized copies of images can be seen with view source.
Re:Upgrade Raspberry Pi 4 with a NVMe boot drive by EricE on Monday November 23, 2020 @03:29PM (#25191384)
Yup - second time today I am also required to log in. No thanks.
Re:Upgrade Raspberry Pi 4 with a NVMe boot drive by OneLeggedCat on Monday November 23, 2020 @03:22PM (#25191275)
True, but this IS Hacker News, and most of us in here can easily get around this particular one .
Re:Upgrade Raspberry Pi 4 with a NVMe boot drive by tutfbhuf on Monday November 23, 2020 @03:47PM (#25191624)
Yes, but it's pretty annoying nonetheless.

https://outline.com/aS4yWR

Re:Upgrade Raspberry Pi 4 with a NVMe boot drive by Lukas_Skywalker on Monday November 23, 2020 @05:03PM (#25192480)
The Medium Unlimited browser addon works pretty well: https://addons.mozilla.org/de/firefox/addon/medium-unlimited...
Re:Upgrade Raspberry Pi 4 with a NVMe boot drive by citrons on Monday November 23, 2020 @04:48PM (#25192343)
Incognito helps override this.
Re:Upgrade Raspberry Pi 4 with a NVMe boot drive by mceachen on Monday November 23, 2020 @11:49PM (#25195373)
FWIW, no login with Firefox, ublock origin, and a pihole.
Re:Upgrade Raspberry Pi 4 with a NVMe boot drive by pmiller2 on Monday November 23, 2020 @04:12PM (#25191969)
Re:Upgrade Raspberry Pi 4 with a NVMe boot drive by alexellisuk on Friday November 27, 2020 @08:54AM (#25228709)
I don't think you understand how Medium works. This is part of the paywall, pay-wall is opt-in for content.

And incognito browser will get you to read the post for free, but I won't get any royalties as the author, if that's what you want.

I honestly don't understand why developers have such a problem valuing their time and the time of others.

Re:Upgrade Raspberry Pi 4 with a NVMe boot drive by rwmj on Monday November 23, 2020 @12:54PM (#25189485)
This is just plugging in NVMe over the USB 3 port? I was expecting this to be soldering something to PCIe lanes coming out of the SoC.

Is this going to be any better than using an SSD with UAS which is what I'm doing already? (https://rwmj.wordpress.com/2020/09/24/raspberry-pi-4-running...)

Re:Upgrade Raspberry Pi 4 with a NVMe boot drive by rektide on Monday November 23, 2020 @02:09PM (#25190404)
I am looking forward to a future where PCIe devices might be connected too. I would really appreciate it if someone other than Intel would kindly please start doing Thunderbolt. Now that USB4 is official, adding PCIe connectivity would be a very good perk for these next generation systems. So far though no one has registered interest. Please can someone other than Intel & Apple prioritize better connectivity? AMD? MediaTek? Qualcomm? Anyone?

There's two modest perks to NVMe over SATA. First, the drives tend to be faster. For large reads/writes, this probably wont help, as you'll be bus limited to USB3 speeds. But for smaller reads & writes, the NVMe drive can maybe probably do more iops, and you may see wins & better latency on workloads. NVMe also has a bunch of under the hood improvements. There's a quite in depth comparison of the two[1]. Larger queues, multiple queues, less round trips to issue commands, better completion model. I am very much unsure of how many of these advantages are exposed & would carry over when the host-to-device connection is still UAS based, which is what adapters like the one in this article still feature, same as if it were SATA. But some of these wins will help latency & iops again vs a SATA drive.

[1] https://sata-io.org/system/files/member-downloads/NVMe%20and...

Re:Upgrade Raspberry Pi 4 with a NVMe boot drive by an_opabinia on Monday November 23, 2020 @03:16PM (#25191208)
Many AMD enthusiast motherboards ship with Thunderbolt.

It's a straightforward technology to implement and I believe it is now royalty free. The only implementations are Intel's though and I'm sure they're expensive.

Expansion is a complicated business model. Apple doesn't even ship headphone ports. The AirPods are smash hit, not least because when you sell a $1,100 device a $100 accessory suddenly seems really well priced. PCs are similarly pretty high ticket items, that market supports a situation where spending $100 on custom internal PSU cabling is not that bad.

The Raspberry Pi is tough. Accessories cost more than 2x the device. It's a model that doesn't really make sense. You could say that people are buying these accessories, but really its greatest limiting factor is that it's too cheap, it's hard to psychologically deliver on the big ticket item + accessories shopping cart for it.

Re:Upgrade Raspberry Pi 4 with a NVMe boot drive by rektide on Monday November 23, 2020 @03:37PM (#25191474)
Intel has Thunderbolt integrated onto their CPU, which seems natural & like what I would want in the future from everyone.

Current Intel host-adapters seem to be ~$10 for the dual-port chip itself[1] (JHL8540). Not sure how much else it adds to the bill-of-material beyond a regular USB port! Adding it direct to the CPU would be a wonderful way to save space, & significantly reduce how hard it is to implement, since one would no longer need to route USB and PCIe and power to this extra chip.

I wouldn't expect Thunderbolt support on the low end for a long time. But I really do think it's really time that cpu makers begin offering it onboard. They already need to start moving towards USB4. Adding PCIe as well would be a courtesy, & a big enabler, for their customers. Hopefully we see these great awesome futures begin arriving in a more well-distributed manner.

[1] https://www.mouser.com/new/intel/intel-8000-thunderbolt-4-co...

Re:Upgrade Raspberry Pi 4 with a NVMe boot drive by akiselev on Monday November 23, 2020 @04:22PM (#25192086)
Intel's reference designs for thunderbolt are behind NDAs so it's a pain in the ass to implement on a PCB and I don't think the controllers themselves (or their datasheets) are easily sourceable either. The Pi foundation has probably got the pull to do it but it would take quite a bit of effort since it would make the Pi an easily available competing reference design, possibly running into internal politics at Intel.
Re:Upgrade Raspberry Pi 4 with a NVMe boot drive by bitbang on Monday November 23, 2020 @04:09PM (#25191923)
Zen-4
Re:Upgrade Raspberry Pi 4 with a NVMe boot drive by miahi on Monday November 23, 2020 @03:33PM (#25191421)
I don't see how a Pi can take advantage of NVMe. From my tests using a 10Gbit USB3 adapter with a capable NVMe drive (3GB/s), its impressive IOPs are reduced so much that they are almost comparable to a 'normal' SATA. I would expect a 5Gbit USB to further limit it.
Re:Upgrade Raspberry Pi 4 with a NVMe boot drive by ascagnel_ on Monday November 23, 2020 @05:03PM (#25192485)
I have a “normal” SATA SSD plugged in, and it’s running within 10% of the hdparm benchmark in the article (it’s not a 1:1 comparison since it’s an older SSD, cheap adapter, and I have two other HDDs plugged in via USB for bulk storage). At that speed, with those other variables, I think it’s the USB port that’s the bottleneck.
Re:Upgrade Raspberry Pi 4 with a NVMe boot drive by alexellisuk on Friday November 27, 2020 @08:52AM (#25228693)
There are some numbers included. If you can link to a reliable UAS SSD product, I can buy one and try it out to compare.
Re:Upgrade Raspberry Pi 4 with a NVMe boot drive by intricatedetail on Monday November 23, 2020 @03:41PM (#25191533)
These days merely connecting two things together gets you PhD. I am so tired of these lazy articles that seems to pop up more often.
Re:Upgrade Raspberry Pi 4 with a NVMe boot drive by melvyn2 on Monday November 23, 2020 @03:23PM (#25191289)
This part is strange: "NVMe drive — an M.2 SSD looks almost identical, but has two notches instead of one. Generally an SSD will perform to the tune of hundreds of MB/s instead of thousands."

First, both are SSDs, so I don't know what he is trying to compare. Both use M.2, but different keys from the sounds of it (the "notches").

M.2 drives can be either SATA or NVME, but it is harder to come across a SATA M.2 drive than an NVME drive these days, so I'm having trouble seeing the point.

Re:Upgrade Raspberry Pi 4 with a NVMe boot drive by onli on Monday November 23, 2020 @03:44PM (#25191584)
There are some M.2 SATA SSDs around that get regularly confused with NVMe SSDs. He for sure wanted to warn against SATA SSDs.

Though for the Pi a SATA SSD would be fast enough.

Re:Upgrade Raspberry Pi 4 with a NVMe boot drive by ascagnel_ on Monday November 23, 2020 @05:01PM (#25192469)
For what it’s worth, unless you’re somehow able to dedicate a PCI-E lane to a USB port, the USB spec will be what limits you. I switched a Pi4 to boot from an older, spare USB SATA SSD a few weeks ago, and it’s reporting 1566MB/924MB on the same hdparm tests as the article (about a 10% drop-off).
Re:Upgrade Raspberry Pi 4 with a NVMe boot drive by davrosthedalek on Monday November 23, 2020 @10:13PM (#25194883)
SATA III is 600MB/s max. So either something is funky with the hdparm test (host side cache?) or it's not SATA.
Re:Upgrade Raspberry Pi 4 with a NVMe boot drive by ascagnel_ on Monday November 23, 2020 @10:19PM (#25194918)
The run uses a cache (hdparm -tT); I was more interested in relocating the results in the screenshot [0] than doing a more relevant test.

[0] https://miro.medium.com/max/1400/1*xcGnOTsPvZtPdGSj8yODiA.pn...

Re:Upgrade Raspberry Pi 4 with a NVMe boot drive by jasonjayr on Monday November 23, 2020 @04:28PM (#25192150)
Often, most parts will just plain fail to fit, and fit exactly one way.

But the keys for the different type of M.2 slots are not large enough on M.2 SATA vs M.2 SSD to prevent them from mixing up. It's easy to force, and forcing it will be fatal for the device.

I know this from an expensive lesson I learned, long ago :(

Re:Upgrade Raspberry Pi 4 with a NVMe boot drive by wtallis on Monday November 23, 2020 @09:21PM (#25194577)
It's not quite that bad.

A M.2 SATA SSD will fit into any socket designed for M.2 SATA or M.2 PCIe SSDs, without damage. A M.2 PCIe SSD that only uses two PCIe lanes will fit into any socket designed for M.2 SATA or M.2 PCIe SSDs, without damage.

The only way to run into trouble is to force a M.2 PCIe SSD keyed for four lanes of PCIe into a M.2 socket keyed for SATA only with no PCIe lanes. Forcing this requires you to install the drive upside down and overcome the 0.5mm misalignment of the 1.2mm wide notch in the drive (meant to be filled by a 1.1mm key in the slot).

If you merely install a SATA SSD in a slot only wired for PCIe, or a PCIe x2 SSD into a slot only wired for SATA, the drive will fail to work but nothing will be damaged.

(You could theoretically also end up in trouble by forcing a SATA or PCIe x2 M.2 SSD into an appropriate slot, but upside down. However, this requires considerably more stupidity on the part of the user because in this scenario the SSD has two notches in the connector, so it is fairly obvious that any mechanical difficulty with installation could be due to having the card upside down. When installing a drive with only one notch, it's less obvious that the difficulty arises from a fundamental and intentional incompatibility.)

Re:Upgrade Raspberry Pi 4 with a NVMe boot drive by jasonjayr on Tuesday November 24, 2020 @01:33AM (#25195904)
(Whatever I did; it let out the magic smoke, and the M.2 device was visibly scorched. The 2nd time I ordered the same part and very carefully examined the keying did I realize my error...)
Re:Upgrade Raspberry Pi 4 with a NVMe boot drive by charwalker on Monday November 23, 2020 @04:27PM (#25192141)
And likely even a Pi4 couldn't take full advantage of an NVME drive except in specific workloads or setups. I'd use a SATA M.2 if needed to save 40% of the cost on the same size SSD. Or just a random thumb drive I have around.

The Pi4 compute unit has a PCIe x1 slot, I think, and that could better put an NVME drive to use. But at that cost, for the drive and Pi, I don't see it being widely used outside of hobby or home use.

I'm excited about this and how the official Pi4 firmware now supports USB boot. Maybe if you used the Pi to run a NAS and wanted the NVME drive as accelerated cache (it can do H.265, 4kp60 decode, and H.264)?

But can a Pi even process an NVME drives bandwidth via it's CPU/etc or Gigabit Ethernet/USB 3.0/GPIO add on?

Edit: This guide is basically 1. Put SSD in adapter and 2. Set up USB boot then clone SD card to SSD. How is this article not just a forum post like the dozens of others that provide the same information and process?

Re:Upgrade Raspberry Pi 4 with a NVMe boot drive by wtallis on Monday November 23, 2020 @09:35PM (#25194656)
> I'd use a SATA M.2 if needed to save 40% of the cost on the same size SSD. Or just a random thumb drive I have around.

There are now lots of low-end M.2 NVMe SSDs on the market, and M.2 SATA SSDs are becoming uncommon. So there's no price remaining price advantage for M.2 SATA over M.2 NVMe—certainly not 40%—and it is not uncommon to find M.2 NVMe sale prices that are better than any M.2 SATA SSD price, since the more popular NVMe SSDs get better and more frequent discounts than the niche M.2 SATA SSDs.

And the M.2 SSDs on the market with the lowest absolute cost (rather than per GB) are usually the Intel Optane Memory 16GB NVMe SSDs that were intended for use as cache devices, but have enough capacity for lots of embedded Linux use cases while also outperforming SATA SSDs of any capacity.

Re:Upgrade Raspberry Pi 4 with a NVMe boot drive by kup0 on Monday November 23, 2020 @05:14PM (#25192576)
The USB is limiting this so much there is no need to go with NVME over SATA, IMHO.

I see the USB3 result for the "M.2 SSD" (I assume the author means SATA?) being ~30/MB but almost surely something is going wrong there. That is not a normal result for any mid-to-high level SATA SSD. Plenty of SATA M.2 SSDs can easily hit the same speeds the NVME drive is hitting (specifically when on USB3). NVME might give you some additional random r/w performance, however.

It seems like overkill to use NVME on USB 3.0 when SATA can saturate that bus just as easily. SATA M.2 drives will also run cooler. Some NVME USB controllers are notoriously hot-running

Re:Upgrade Raspberry Pi 4 with a NVMe boot drive by emidln on Monday November 23, 2020 @05:27PM (#25192696)
Power consumption would be my guess for why one would choose NVME over SATA in this application.
Re:Upgrade Raspberry Pi 4 with a NVMe boot drive by kup0 on Monday November 23, 2020 @06:04PM (#25192984)
Hrm, maybe over USB it's different because of the performance limitations, but my understanding was that SATA was lower power draw.

Though maybe I'm wrong and/or potentially this differs on a per-drive/per-controller basis.

Re:Upgrade Raspberry Pi 4 with a NVMe boot drive by wtallis on Monday November 23, 2020 @09:46PM (#25194727)
It very much depends on the particular drive, with both controller and NAND choice affecting power draw and efficiency.

On a performance per Watt basis, most M.2 NVMe SSDs are much more efficient than M.2 SATA SSDs. The most efficient M.2 NVMe SSDs are also at least competitive with M.2 SATA SSDs in terms of absolute power consumption, despite outperforming the SATA SSDs by at least a factor of 2-3x. Power consumption from a M.2 NVMe SSD will also drop slightly when only one or two of its four PCIe lanes are used, which is the case when the drive is behind a USB to NVMe bridge.

For example, comparing a SK hynix NVMe drive against of dozens of other M.2 NVMe and 2.5" SATA drives: https://images.anandtech.com/doci/16012/rr-all.png Unfortunately, I don't think there are any M.2 SATA results in there, and those are often a little bit more efficient than their 2.5" counterparts (running off 3.3V rather than 5V, but stepping it down to at least one or two lower voltages on the drive in either case).

Re:Upgrade Raspberry Pi 4 with a NVMe boot drive by lifty on Monday November 23, 2020 @01:45PM (#25190099)
Does anyone know any board that is similar to RPi 4, with 8GB of RAM or more and a SATA port or an nvme slot? ARM would be great.
Re:Upgrade Raspberry Pi 4 with a NVMe boot drive by jamesfmilne on Monday November 23, 2020 @02:37PM (#25190749)
Re:Upgrade Raspberry Pi 4 with a NVMe boot drive by unnouinceput on Monday November 23, 2020 @03:52PM (#25191681)
The price difference though...
Re:Upgrade Raspberry Pi 4 with a NVMe boot drive by othercharles on Monday November 23, 2020 @01:54PM (#25190199)
Generally speaking you can choose either power efficiency or a wide bus, but rarely both. If you want a crappy underpowered m.2 slot, probably Intel Atom is the cheapest route.

High performance ARM with m.2 PCI, not sure, but guessing if it's around it probably isn't cheap

Re:Upgrade Raspberry Pi 4 with a NVMe boot drive by throwaway894345 on Monday November 23, 2020 @02:33PM (#25190697)
Let's say one has a friend who doesn't know what "a wide bus" refers to... What would be a good way of explaining it to said friend?
Re:Upgrade Raspberry Pi 4 with a NVMe boot drive by othercharles on Monday November 23, 2020 @02:53PM (#25190951)
A single PCIe lane can draw 0.5 A, 4x rises to 2 A.

Separately, (random top Google result cutpaste):

    Architectural-level power optimization can target different system
    components such as CPU, caches, main memory,and buses [5, 6, 22, 4]. Power
    spent in off-chip buses can be a significant portion of the overall power
    budget. As an example, the core power consumption of Intel Celeron at
    266MHz is 16W, while its off-chip bus (for a standard configuration)
    operating at 133 MHz consumes 3.3W [12, 13]. The contribution of off-chip
    bus power consumption to the overall power budget increases even more for
    embedded systems with low-power processor cores and memories, making
    off-chip  buses  a  potential  candidate  for  power  optimization. Figure
    1 shows the power consumption due to off-chip data bus for several embedded
    benchmark codes as a percentage of the overall power consumption (which
    includes processor data path, caches, buses, TLB, register file,
    instruction issue logic, clock, and off-chip memory) for an
    embedded processor.  From this figure, we see that the off-chip data bus
    consumes between 9.8% and 23.2% of the total power consumed by the system
    depending on the benchmark being run. So, reducing the power consumption
    of the off-chip data bus would reduce the overall power consumption of
    the system to a considerable extent
Re:Upgrade Raspberry Pi 4 with a NVMe boot drive by mixmastamyk on Monday November 23, 2020 @03:33PM (#25191426)
More lanes on the freeway.
Re:Upgrade Raspberry Pi 4 with a NVMe boot drive by lifty on Monday November 23, 2020 @02:07PM (#25190378)
Yeah, that makes sense. I wouldn't expect the same price point as an RPi and would love a higher performance CPU, but I think they are not out there at the moment. Wouldn't mind having something like 8 graviton2 cores and an nvme slot :)
Re:Upgrade Raspberry Pi 4 with a NVMe boot drive by m-p-3 on Monday November 23, 2020 @01:57PM (#25190246)
Maybe there's something out there, but I don't know of any other SBCs than the Pi4 having more or equal to 8GB.

If you can settle for 4GB, there's tye Rock Pi 4 which has a variant with on-board eMMC or an m.2 slot.

Re:Upgrade Raspberry Pi 4 with a NVMe boot drive by tuatoru on Monday November 23, 2020 @03:10PM (#25191148)
Also Friendlyarm's NanoPC T4.

M.2 PCIe x4, 4GB LPDDR3 (a bit old perhaps).

https://www.friendlyarm.com/index.php?route=product/product&...

Re:Upgrade Raspberry Pi 4 with a NVMe boot drive by mceachen on Monday November 23, 2020 @11:54PM (#25195384)
Odroid has a 4gb with sata ports: https://www.hardkernel.com/shop/odroid-hc4/

The new pi compute module has an 8gb model with a pci-express slot that can take nvme: https://www.raspberrypi.org/products/compute-module-4-io-boa...

Re:Upgrade Raspberry Pi 4 with a NVMe boot drive by myhf on Tuesday November 24, 2020 @07:06AM (#25197680)
Many systems based on Rockchip RK3399 have a native SATA/nvme interface, but only go up to 4GB ram.

Comparison of "Model B" single-board computers: https://docs.google.com/spreadsheets/d/1jWMaK-26EEAKMhmp6SLh...

Re:Upgrade Raspberry Pi 4 with a NVMe boot drive by shorts_theory on Monday November 23, 2020 @02:32PM (#25190684)
Considerably more powerful and expensive, but the Jetson TX2 or Xavier NX fits this niche quite well.
Re:Upgrade Raspberry Pi 4 with a NVMe boot drive by unnouinceput on Monday November 23, 2020 @03:54PM (#25191714)
If you're going to spend $400 for a Jetson, you might add another $100 and just get a powerful tablet and bet better performance
Re:Upgrade Raspberry Pi 4 with a NVMe boot drive by pstadler on Monday November 23, 2020 @02:50PM (#25190905)
Check out the upcoming Turing Pi 2. Seems very promising in every regard.

https://turingpi.com/

Re:Upgrade Raspberry Pi 4 with a NVMe boot drive by nuker on Tuesday November 24, 2020 @02:09AM (#25196080)
Seeedstudio ODYSSEY X86J4105800, $190. It has 2x M.2 slots and they have 5x SATA M.2 card too.
Re:Upgrade Raspberry Pi 4 with a NVMe boot drive by 1996 on Monday November 23, 2020 @02:52PM (#25190939)
Rockpi M4V2, not ideal on RAM but does the job with eMMC or SD or NVMEe boot after reflash
Re:Upgrade Raspberry Pi 4 with a NVMe boot drive by xuhu on Monday November 23, 2020 @03:43PM (#25191562)
> Go to ... GPU Memory and change it from 16MB to 64MB

... should be "64MB to 16MB".

Re:Upgrade Raspberry Pi 4 with a NVMe boot drive by dheera on Monday November 23, 2020 @03:50PM (#25191661)
Honestly I'd get rid of the USB and use the Pi 4 compute module with NVMe next year.

USB connectors suck balls, one bump or connector dangling over the edge of your desk that gets hit by a hip and you have a device reenumeration, no idea what havoc that would have on the kernel that's running off it.

USB is evil. Never use it for anything mission critical.

Re:Upgrade Raspberry Pi 4 with a NVMe boot drive by justin66 on Monday November 23, 2020 @06:03PM (#25192969)
> one bump or connector dangling over the edge of your desk that gets hit by a hip and you have a device reenumeration

It’s fun to think about the horrors which might result with similar mistreatment of old school external SCSI hardware. USB is fine; use quality cables and don’t run your computer in a disco if you can help it.

Re:Upgrade Raspberry Pi 4 with a NVMe boot drive by dheera on Monday November 23, 2020 @11:10PM (#25195197)
USB cables are some of the worst designed crap I have ever seen in the history of computing. When you plug the cable in, it doesn't make a firm, snug fit, and jiggles around in place. If you press down on it it can even torque the connector right off the PCB.

I often have to design 3D printed housing to go around the USB plug housing to hold and lock the plug snugly in place, because the designers of both the USB ports and plugs are incompetent at designing something industrial grade that locks down firmly.

SCSI cables were fine, their ports were secured to the housing and they had nice screw locks so the cables wouldn't go anywhere. Any cantilever forces were absorbed by metal casing, not PCB. Super reliable.

Re:Upgrade Raspberry Pi 4 with a NVMe boot drive by justin66 on Tuesday November 24, 2020 @01:41AM (#25195942)
> jiggles around in place

I don't want to defend USB too heavily (as you say, it is certainly not "industrial grade," but I don't know what the equivalent of something simple and very strong like a Hubbell twist-lock connector would be in data transfer terms, and that's something to contemplate) but this really shouldn't happen with any halfway decent cables or hardware. It doesn't apply to the Raspberry Pi 4 in my experience, or any of my laptops or PCs. Phones and micro-USB are, of course, a special case and uniquely horrible.

> SCSI cables were fine

Except when they weren't, and then you'd have to spend fifty bucks (whatever that equals in 2020 dollars) to test and see if the cable was what was failing you, or the termination, or the jumper settings...

Re:Upgrade Raspberry Pi 4 with a NVMe boot drive by dheera on Tuesday November 24, 2020 @01:49PM (#25201581)
> but this really shouldn't happen with any halfway decent cables or hardware

Well, the best brand cables jiggle around. I'm talking Pi's, Macbooks, Pixel phones, you name it, they all jiggle around.

I've had RealSense cameras, StarTech USB hubs fail because of cable jiggling around in the port, and had to make 3D printed add-ons to grip the housing and prevent cable jiggling.

I've personally had WAY more problems with USB that SCSI cables, honestly. Also I break an average of about 1 USB cable a week; SCSI, DB25, DB9, DB15, BNC, and those cables never break.

Re:Upgrade Raspberry Pi 4 with a NVMe boot drive by justin66 on Tuesday November 24, 2020 @04:21PM (#25203126)
BNC has always been trouble-free for you? That's interesting.

I think the only cable type that was entirely trouble-free for me over the years was the parallel printer cable with the truly awful Centronics connector. I don't remember ever throwing one of those away. Of course, that's not a cable that you'd plug and unplug much, which certainly helps.

Re:Upgrade Raspberry Pi 4 with a NVMe boot drive by johnchristopher on Monday November 23, 2020 @06:20PM (#25193109)
Depending on what you want to do you can get good results using tmpfs ram disk in combination with a non volatile USB plugged storage.

Eg: I convert some RTSP stream from a pi zero to HLS on a pi4 by ffmpegging the RTSP stream to HLS files in the RAM disk. I use bindfs to make this mountpoint available as a www-data folder in /home/pi/ssd/web/hls (which is actually on an USB plugged SSD) for HTML viewing in the browser. Motion triggers events, those events can be recorded from the RTSP stream or the ramdisk (holding HLS files) to the attached SSD. The HLS conversion adds a 30 second buffer so any triggers on the RTSP stream has an hls capture starting 30 seconds before the event and the SD card is never touched and I could use a spinning disk, it wouldn't be a bottleneck (but I am somehow more confident the SSD will be more stable power wise).

Re:Upgrade Raspberry Pi 4 with a NVMe boot drive by snthd on Monday November 23, 2020 @05:38PM (#25192798)
Related: "Raspberry Pi USB Boot - UASP, TRIM, and performance" - https://www.jeffgeerling.com/blog/2020/raspberry-pi-usb-boot...
Re:Upgrade Raspberry Pi 4 with a NVMe boot drive by smcleod on Tuesday November 24, 2020 @08:32AM (#25198253)
I wouldn't suggest using hdparm for benchmarking, have a look at fio, it's easy to use and revised very detailed and accurate information - https://smcleod.net/tech/2016/04/29/benchmarking-io/
Re:Upgrade Raspberry Pi 4 with a NVMe boot drive by nominated1 on Monday November 23, 2020 @12:57PM (#25189529)
These sorts of posts come up often and I cringe every time I see dongle attached storage. An unnecessary additional failure point seems counterproductive.

I have a Raspberry Pi and I use an SD card because what I’m using it for doesn’t require anything more. If you need fast storage I believe you should buy an appropriate device and maybe petition the Foundation to add it in a future model.

Right tool for the job and all that.

Re:Upgrade Raspberry Pi 4 with a NVMe boot drive by gmiller123456 on Monday November 23, 2020 @01:46PM (#25190109)
> I cringe every time I see dongle attached storage

I'm quite curious as to how this is "cringe"worthy. I can certainly see how mechanically stable attached storage is preferable in a lot of situations, but people use Pi's for a vast array of uses, and I cannot imagine that every use case, or even a significant majority of them should be barred from USB attached storage.

Re:Upgrade Raspberry Pi 4 with a NVMe boot drive by timthorn on Monday November 23, 2020 @01:13PM (#25189709)
> An unnecessary additional failure point seems counterproductive

One of the leading reasons for using USB attached storage on the Pi is to avoid SD card corruption issues.

Re:Upgrade Raspberry Pi 4 with a NVMe boot drive by mmastrac on Monday November 23, 2020 @01:14PM (#25189733)
FWIW I have not had any SD corruption issues after 1) using name-branded cards and 2) ensuring that I feed each Pi w/5.2V. In the end I bought a commercial 5V power supply, tweaked it up 5% and wired directly to the 5V pins on the Pi.
Re:Upgrade Raspberry Pi 4 with a NVMe boot drive by magicalhippo on Monday November 23, 2020 @02:35PM (#25190718)
I'm running several Pi's from SD card, some for years, and the only issue I had was with one that randomly crashed.

Measured the resistance of the "USB charging cable" I had used for it and found it was 1 Ohm! So when the Pi peaked at 1A current draw, the cable dropped 1V.

Swapped it out for something proper (<0.1 Ohm), and haven't had issues since.

Re:Upgrade Raspberry Pi 4 with a NVMe boot drive by mmastrac on Monday November 23, 2020 @02:45PM (#25190831)
Same here. I even went as far as finding barrel-jack to USB connectors so I could wire thicker-gauge cables to the Pi.

In the end I gave up on trying to find low-ohm cables and just wired directly to the power supply. It's surprising how many cables just plain suck.

Re:Upgrade Raspberry Pi 4 with a NVMe boot drive by adriancr on Monday November 23, 2020 @01:16PM (#25189753)
You can get the same corruption on ssds if power draw is more then pi allows or if power goes down.

With an SSD you are increasing power consumption on USB which is limited to around 1.2A or however much power supply allows.

Note: I havent had any corruptions past year on pi3... all I changed was power supply, sd card and using aarch64

Re:Upgrade Raspberry Pi 4 with a NVMe boot drive by wtallis on Monday November 23, 2020 @10:05PM (#25194839)
Presumably using an enterprise-grade NVMe SSD with power loss protection capacitors would avoid such trouble. Some of those have reasonably low power consumption under load, but they're all bad at idle compared to client/consumer SSDs. But now you also have me wondering about Intel's Optane cache SSD modules, which like enterprise SSDs don't have any volatile caching, and they're also cheap enough to make some sense in an RPi context. I'm tempted to do some voltage margin testing on one to see where it browns out compared to a typical consumer SSD.
Re:Upgrade Raspberry Pi 4 with a NVMe boot drive by kelnos on Monday November 23, 2020 @06:30PM (#25193211)
I disagree. The RPi is a pretty versatile little machine. Yes, it does have some limitations, and the workarounds for those (like NVMe-over-USB) are not particularly optimal, but by sticking with RPi (rather than one of the other myriad SBCs), you get consistency and a reasonable expectation that the board is still going to be supported with an up-to-date userland 10 years from now.

I've been wanting to build a 4-bay SBC NAS for years now, but I haven't been able to bring myself to trust the community and support for some of the other boards that do give you direct access to the PCIe bus so you can actually get decent performance.

Now I'm waiting for someone to come up with something based on the Compute Module 4... (There was a post about someone designing a PCB for something that would do the trick the other day, but it requires some 0.4mm pitch soldering skills that I just don't have the equipment for.)

Re:Upgrade Raspberry Pi 4 with a NVMe boot drive by GeorgeTirebiter on Monday November 23, 2020 @02:20PM (#25190556)
I have found that the SD card tends to 'wear out' after a few years. Agreed USB is suboptimal; but it can work OK.
Re:Upgrade Raspberry Pi 4 with a NVMe boot drive by lukifer on Monday November 23, 2020 @03:26PM (#25191329)
Quick plug for log2ram, which greatly reduces the write cycles on the boot SD, especially for Pi's that run 24/7: https://github.com/azlux/log2ram
Re:Upgrade Raspberry Pi 4 with a NVMe boot drive by FpUser on Monday November 23, 2020 @02:09PM (#25190398)
>"...I cringe every time I see dongle attached storage..."

>"...If you need fast storage I believe you should buy an appropriate device"

Frankly you can cringe all you want but it is really up to the owner to decide how they use their hardware. Your opinion about it is irrelevant as people have their unique situation and are quite capable to weigh all pros and cons of whatever they decide to do.

Re:Upgrade Raspberry Pi 4 with a NVMe boot drive by mschuster91 on Monday November 23, 2020 @12:39PM (#25189312)
I'd be interested if one of the various hacks for PCIe (https://hackaday.com/2019/07/10/giving-the-pi-4-pci-express/) to plug it in natively would work and, if yes, at what speed.
Re:Upgrade Raspberry Pi 4 with a NVMe boot drive by Asmod4n on Monday November 23, 2020 @12:51PM (#25189457)
Afaik its limited to 3 gigabyte per second, so just plugging it into the usb 3 port should give the same speed.
Re:Upgrade Raspberry Pi 4 with a NVMe boot drive by q3k on Monday November 23, 2020 @03:59PM (#25191801)
Closer to 3 gigabits than 3 gigabytes.
Re:Upgrade Raspberry Pi 4 with a NVMe boot drive by djsumdog on Monday November 23, 2020 @09:06PM (#25194473)
Does nvme actually mean anything here over m.2/sata? Is the Pi able to really use all that bandwidth?

Also, plugging in the NVME over USB3 makes them show up as /dev/sdx devices (not /dev/nvme0x)? Is USB3 still allowing a PCI bus lane connection? I thought you needed a thunderbolt connect for that.

Re:Upgrade Raspberry Pi 4 with a NVMe boot drive by nottorp on Monday November 23, 2020 @03:58PM (#25191784)
... with a usb boot drive. He just happens to use an USB to NVME adapter but don't expect real NVMe speeds.
Re:Upgrade Raspberry Pi 4 with a NVMe boot drive by protoman3000 on Monday November 23, 2020 @04:37PM (#25192245)
Another neat trick is to use the 8GB Raspberry Pi 4 and load the whole OS into the RAM at boot time. This makes booting take much longer but after that the system runs very fast and responsive.

Of course eventually the logs will eat everything to you have to write back to USB or SD from time to time.

Re:Upgrade Raspberry Pi 4 with a NVMe boot drive by FpUser on Monday November 23, 2020 @05:05PM (#25192504)
One step in this description is not really needed. One can do diskdup from SD card to SSD right from inside the same Pi booted originally for SD card.
Re:Upgrade Raspberry Pi 4 with a NVMe boot drive by kelnos on Monday November 23, 2020 @08:54PM (#25194391)
Usually not a great idea to make an image of a disk when filesystems on it are mounted writable.
Re:Upgrade Raspberry Pi 4 with a NVMe boot drive by FpUser on Monday November 23, 2020 @11:58PM (#25195415)
100% agree but I did on Pi few times anyways out of convenience and it worked. For production I will of course use the off-line method.
Re:Upgrade Raspberry Pi 4 with a NVMe boot drive by ur-whale on Monday November 23, 2020 @04:43PM (#25192298)
Re:Upgrade Raspberry Pi 4 with a NVMe boot drive by adriancr on Monday November 23, 2020 @12:56PM (#25189524)
curios what the power draw is and if I need a powered USB hub for this.
Re:Upgrade Raspberry Pi 4 with a NVMe boot drive by rektide on Monday November 23, 2020 @02:21PM (#25190575)
Author may have gotten lucky in their Western Digital Blue SN550 selection. It's a fairly low power drive. WD has been making their own controllers, & they have a history of being fairly power friendly. This is a very new drive too. This review[1] shows it using 2.62 watts during a large file copy and on-idling at 0.96 watts.

The best drive shown is a Crucial MX500, using 2.32 watts during cpy and 0.52 watts at on-idle.

There will be some additional power consumption from the usb adapter too but i'd expect no more than 0.2 watts.

[1] https://www.tomshardware.com/reviews/wd-blue-sn550-m2-nvme-s...