techskies11
Posts: 73
Joined: Sat Apr 02, 2016 8:45 am

USB to m.2 on pi 4

Sun Jun 30, 2019 2:40 am

I wonder if the USB in the new pi 4 can get really good m.2 ssd speeds via the USB 3 port

User avatar
Gavinmc42
Posts: 3617
Joined: Wed Aug 28, 2013 3:31 am

Re: USB to m.2 on pi 4

Sun Jun 30, 2019 2:54 am

Yes.
There are some benchmarks and YT's showing about 3-6 times faster speeds.
There is no booting from USB yet, that needs work and an update to the secondary boot EEPROM.
In the meantime boot from USB and have Home on the USB drive?
I'm dancing on Rainbows.
Raspberries are not Apples or Oranges

User avatar
HawaiianPi
Posts: 4531
Joined: Mon Apr 08, 2013 4:53 am
Location: Aloha, Oregon USA

Re: USB to m.2 on pi 4

Sun Jun 30, 2019 3:00 am

Depends on what you mean by "really good speeds" ...

USB 3 on the Pi4 is actually a little slower than the USB 3.0 spec (4Gbps vs 5Gbps), and all 4 USB ports share that bandwidth. So an M.2 SSD, or any SSD for that matter, will be a little slower than it would be on a 5Gbps port, but will be MUCH faster than it was on older Pi models USB 2.0.
My mind is like a browser. 27 tabs are open, 9 aren't responding,
lots of pop-ups...and where is that annoying music coming from?

techskies11
Posts: 73
Joined: Sat Apr 02, 2016 8:45 am

Re: USB to m.2 on pi 4

Sun Jun 30, 2019 3:14 am

That’s good to know, wanted to boot the OS from a USB m.2 but maybe I’ll get a fast micro SD for now, I wonder if it supports the fast micro SD, UHS 2 or 3 I think. Will the ever be able to boot from USB.

jerrm
Posts: 166
Joined: Wed May 02, 2018 7:35 pm

Re: USB to m.2 on pi 4

Sun Jun 30, 2019 3:21 am

It depends on what you consider "really good."

A SATA m.2 drive is capable of 6Gbps, and good drives can saturate that bandwidth.

The USB interface itself is a 5Gpbs interface, so less than the SATA max.

The bandwidth available on the Pi4 to from the CPU to the USB chip is "only" 4Gbps, a further reduction speed.

So if "really good" means as fast as an internal drive on a PC - then no. The available bandwidth is only 66% of what a native SATA connection in a PC is likely to be.

If "really good" means running rings around USB2 speeds, then yeah - the Pi4 is a HUGE improvement and for many real world workloads is likely comparable to native SATA. Where you will most note the difference would be long sequential transfers.

User avatar
HawaiianPi
Posts: 4531
Joined: Mon Apr 08, 2013 4:53 am
Location: Aloha, Oregon USA

Re: USB to m.2 on pi 4

Sun Jun 30, 2019 3:48 am

techskies11 wrote:
Sun Jun 30, 2019 3:14 am
That’s good to know, wanted to boot the OS from a USB m.2 but maybe I’ll get a fast micro SD for now, I wonder if it supports the fast micro SD, UHS 2 or 3 I think. Will the ever be able to boot from USB.
You should get a fast A1 rated micro SD card for now, because USB booting has not been enabled in the Pi4 firmware yet. SD card performance has been improved as well (compared to older models), but the Pi computers don't officially support any of the UHS standards, as far as I know.

So faster, yes, but UHS 2 or 3, no.

Also, the form factor of an SSD makes no different in performance. A 2.5 inch SATA SSD will be just as fast as an M.2 SATA SSD, but cost less. There are faster M.2 NVMe SSD models, but putting those into a USB 3.0 enclosure will negate any performance advantage (and cost a whole lot more for no gain).
My mind is like a browser. 27 tabs are open, 9 aren't responding,
lots of pop-ups...and where is that annoying music coming from?

techskies11
Posts: 73
Joined: Sat Apr 02, 2016 8:45 am

Re: USB to m.2 on pi 4

Sun Jun 30, 2019 4:32 am

So then I won’t get those 1 or 2 GBPS speeds from m.2 cards then :( oh well, probably overkill but ya just wanted a fast drive but not nessessary, I wonder how fast micro SD cards can get in terms of read and write speeds if it’s only supported for boot.

User avatar
HawaiianPi
Posts: 4531
Joined: Mon Apr 08, 2013 4:53 am
Location: Aloha, Oregon USA

Re: USB to m.2 on pi 4

Sun Jun 30, 2019 6:30 am

To get higher 10Gbps speeds you would need an NVMe SSD and a USB 3.1 Gen 2 NVMe enclosure (expensive) and, of course, you'd need a USB 3.1 Gen 2 device to plug it into. The whole chain (drive, enclosure, cable and device) all have to support the faster standard.

USB 3.0 is USB 3.0 (well, technically it's also USB 3.1 Gen 1 and USB 3.2 Gen 1×1). Plugging a faster drive into a USB 3.0 port isn't going to make the port faster. When the USB boot firmware is ready, get a SATA SSD and USB 3.0 enclosure or adapter cable and save some money. It will still be a very fast boot and OS drive.

In the meantime, get a SanDisk Ultra A1 micro SD card. They are affordable and fast.
My mind is like a browser. 27 tabs are open, 9 aren't responding,
lots of pop-ups...and where is that annoying music coming from?

techskies11
Posts: 73
Joined: Sat Apr 02, 2016 8:45 am

Re: USB to m.2 on pi 4

Sun Jun 30, 2019 9:08 am

Thanks ill check it out when I get my hands on a pi 4

chwe
Posts: 116
Joined: Tue Jul 31, 2018 1:35 pm

Re: USB to m.2 on pi 4

Sun Jun 30, 2019 11:00 am

HawaiianPi wrote:
Sun Jun 30, 2019 6:30 am
To get higher 10Gbps speeds you would need an NVMe SSD and a USB 3.1 Gen 2 NVMe enclosure (expensive) and, of course, you'd need a USB 3.1 Gen 2 device to plug it into. The whole chain (drive, enclosure, cable and device) all have to support the faster standard.
Or you opt for an SBC which just offers native NVMe support? :P

I 'love' all the theoretical discussion about RPi and it's speed, but what about feeding this theory with numbers?
https://www.cnx-software.com/2019/06/24 ... ent-564077

Also the fact that randomIO matters more for an OS than the max seq. writespeeds is a bit underestimated here.. :P

User avatar
clicky
Posts: 332
Joined: Thu Oct 25, 2012 7:34 am

Re: USB to m.2 on pi 4

Sun Jun 30, 2019 11:44 am

I cannot see real figures here. I've attached some cheap USB3<->SATA caddy + old 80GB SSD (Intel320 Series) which is marked as 3Gb/s and run

Code: Select all

sudo hdparm -tT /dev/sda1

/dev/sda1:
 Timing cached reads:   1308 MB in  2.00 seconds = 653.88 MB/sec
 Timing buffered disk reads: 730 MB in  3.00 seconds = 243.18 MB/sec
which, if you multiply it with 8 (bits) you get ~ 2Gbit/s

So, we now know that at least 2Gbit a second is possible (realistic, confirmed, etc). I am not sure why that low: SSD's speed itself, my old and cheap (it is at least 3 years old and bought as the cheapest on ebay) USB3 caddy or Pi4's bandwidth caused it

Still - 2Gbit/s for this little computer is already quite a something and I really enjoy it (using it right now as desktop while writing this on Raspbian with KDE plasma and chrome, gimp/pycharm/thunderbird - pretty much all I normally use on my MBP as well - and all is reasonable speed/usability) :)

HTH

chwe
Posts: 116
Joined: Tue Jul 31, 2018 1:35 pm

Re: USB to m.2 on pi 4

Sun Jun 30, 2019 2:21 pm

I don't see much negative stuff here.. :D The USB attached storage numbers for the RPi4 are decent and the best part of it, you don't even need a (more expensive) NVMe SSD, a 'normal' USB-SATA bridge will do it. Whereas I thought (and still think) such SATA SSD setups for all previous RPi models to be a waste of money, it actually makes kind of sense for the Pi4. You get a similar performance to all the other USB3 capable SBCs, even more once USB boot is fully implemented. Given the local availability (in the future), the price and the assumed long term vendor support I would say it's not a bad pick (still not perfect, but a good balance between price and what you get for).

FYI: I bought the RPi4 and its official PSU, cause I can imagine a few of my use-cases might fit well with it. :P But pssssst.. Don't tell.. my evilness against RPis will suffer if others know that I own one.. :lol: :lol: :roll:

Edit: lol the post it refers to is gone..

Return to “General discussion”