Andybp
Posts: 27
Joined: Mon Oct 01, 2012 5:03 pm

running the system (a pi4b) off of ssd, will it give speed improvements?

Sat Sep 28, 2019 9:50 am

Hi. I’m toying with the idea of running the system (a pi4b) off of ssd. Just wondered what people’s views were of the general speed improvements are within raspbian. I know it’s dependant on the application. I mainly use it for scratch, chromium(bit of browsing, bit of YouTube), and toying with python.

Any views from others on general usability improvements would be great to hear, if indeed there are any.

Thanks

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

Re: Ssd

Sat Sep 28, 2019 10:30 am

It makes visible difference.

fruitoftheloom
Posts: 21982
Joined: Tue Mar 25, 2014 12:40 pm
Location: Delightful Dorset

Re: Ssd

Sat Sep 28, 2019 10:53 am

Andybp wrote:
Sat Sep 28, 2019 9:50 am
Hi. I’m toying with the idea of running the system (a pi4b) off of ssd. Just wondered what people’s views were of the general speed improvements are within raspbian. I know it’s dependant on the application. I mainly use it for scratch, chromium(bit of browsing, bit of YouTube), and toying with python.

Any views from others on general usability improvements would be great to hear, if indeed there are any.

Thanks

You will need a USB3 Caddy or similar to use a SSD Drive.


At present boot from a USB Mass Storage Device is not yet supported, though can boot off the SD Card and hand off to the USB MSD.


Many posts on this subject, but yes a USB MSD should make a noticeable improvement.
Retired disgracefully.....
......to an uncomplicated life !

Rather than negativity think outside the box !

Kendek
Posts: 145
Joined: Thu Jul 25, 2019 4:39 pm
Location: Kaposvár, Hungary

Re: Ssd

Sat Sep 28, 2019 10:55 am

A good SSD is much faster than an SD card in Pi, if connected through USB 3.x. Especially with UASP and TRIM/UNMAP support.

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

Re: running the system (a pi4b) off of ssd, will it give speed improvements?

Sat Sep 28, 2019 12:20 pm

Oh, forgot to include statistics:

Code: Select all

$ sudo hdparm -t /dev/sda

/dev/sda:
 Timing buffered disk reads: 1050 MB in  3.00 seconds = 349.47 MB/sec
SSD ~ 2.7Gbit/s

Andybp
Posts: 27
Joined: Mon Oct 01, 2012 5:03 pm

Re: running the system (a pi4b) off of ssd, will it give speed improvements?

Sat Sep 28, 2019 1:23 pm

Thanks everyone. Over to amazon me thinks :-)

bjtheone
Posts: 463
Joined: Mon May 20, 2019 11:28 pm
Location: The Frozen North (AKA Canada)

Re: running the system (a pi4b) off of ssd, will it give speed improvements?

Sat Sep 28, 2019 1:33 pm

One note of caution, the Pi 4 does not seem to play nicely with some USB 3.0 - SATA adapters. It is worth while to either just buy one that others have claimed works or get it from somewhere with a decent return policy. Beyond that I would echo what everyone has already said, SSD provides a noticeable improvement, and is a more durable storage media.

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

Re: running the system (a pi4b) off of ssd, will it give speed improvements?

Sat Sep 28, 2019 3:11 pm

Due to RPi size I would recommend M.2 with an adapter. Also, there are B, B+M and M key M.2 adapters. It seems that B and B+M are cheaper than M key only. Also, M key are faster but I am not sure if you're going to see any improvements due to USB3 (and RPi USB3) limitations.

Andybp
Posts: 27
Joined: Mon Oct 01, 2012 5:03 pm

Re: running the system (a pi4b) off of ssd, will it give speed improvements?

Sun Sep 29, 2019 5:16 pm

I bought a wd 120gb ssd. Only cost twenty quid. Then another 6 quid for an enclosure and cable. I’ll be giving it a go later. Never even occurred to me to go the m.2 route.

Ssd’s have gotten sooo cheap. Well chuffed

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

Re: Ssd

Sun Sep 29, 2019 5:29 pm

Kendek wrote:
Sat Sep 28, 2019 10:55 am
A good SSD is much faster than an SD card in Pi, if connected through USB 3.x. Especially with UASP and TRIM/UNMAP support.
Have you found an USB3 adapter for the pi that supports both UASP and TRIM?

Kendek
Posts: 145
Joined: Thu Jul 25, 2019 4:39 pm
Location: Kaposvár, Hungary

Re: Ssd

Sun Sep 29, 2019 5:55 pm

jerrm wrote:
Sun Sep 29, 2019 5:29 pm
Have you found an USB3 adapter for the pi that supports both UASP and TRIM?
All StarTech products with ASMedia ASM1351 chip. Just install the firmware update.
I'm using cable-style adapters, and with the official firmware 150708B10103 the UASP and the TRIM/UNMAP are working well.

Lsusb:

Code: Select all

/:  Bus 02.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/4p, 5000M
    |__ Port 2: Dev 2, If 0, Class=Mass Storage, Driver=uas, 5000M
Udev rule:

Code: Select all

ACTION=="add|change", ATTRS{idVendor}=="174c", ATTRS{idProduct}=="55aa", SUBSYSTEM=="scsi_disk", ATTR{provisioning_mode}="unmap"
Trim:

Code: Select all

> dmsetup table --showkeys
data: 0 3906996400 crypt xchacha12,aes-adiantum-plain64 :32:logon:cryptsetup:c4368a29-28ae-4c6b-8746-1045619b272d-d0 0 8:0 32768 2 allow_discards sector_size:4096
> fstrim -av
/data: 0 B (0 bytes) trimmed on /dev/mapper/data

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

Re: Ssd

Sun Sep 29, 2019 6:58 pm

Kendek wrote:
Sun Sep 29, 2019 5:55 pm
All StarTech products with ASMedia ASM1351 chip. Just install the firmware update.
I'm using cable-style adapters, and with the official firmware 150708B10103 the UASP and the TRIM/UNMAP are working well.

Will it complete the a bonnie benchmark without any errors in syslog?

Code: Select all

sudo apt-get install bonnie++ 
sudo bonnie++ -u root -d /mnt/path/to/ssd
The "Rewriting" phase can break some adapters that otherwise seem OK.

Kendek
Posts: 145
Joined: Thu Jul 25, 2019 4:39 pm
Location: Kaposvár, Hungary

Re: Ssd

Sun Sep 29, 2019 7:28 pm

jerrm wrote:
Sun Sep 29, 2019 6:58 pm
Will it complete the a bonnie benchmark without any errors in syslog?

Code: Select all

sudo apt-get install bonnie++ 
sudo bonnie++ -u root -d /mnt/path/to/ssd
The "Rewriting" phase can break some adapters that otherwise seem OK.
It's an SMR HDD, 2.5" WD WD20SPZX:

Code: Select all

> bonnie++ -u root -d /data
Using uid:0, gid:0.
Writing a byte at a time...done
Writing intelligently...done
Rewriting...done
Reading a byte at a time...done
Reading intelligently...done
start 'em...done...done...done...done...done...
Create files in sequential order...done.
Stat files in sequential order...done.
Delete files in sequential order...done.
Create files in random order...done.
Stat files in random order...done.
Delete files in random order...done.
Version  1.98       ------Sequential Output------ --Sequential Input- --Random-
                    -Per Chr- --Block-- -Rewrite- -Per Chr- --Block-- --Seeks--
Name:Size etc        /sec %CP  /sec %CP  /sec %CP  /sec %CP  /sec %CP  /sec %CP
RPI4          7592M  180k  99 90.4m  39 45.6m  21  855k  92 96.3m  22 208.7  11
Latency             82638us    2725ms    4015ms     274ms   78567us    2034ms
Version  1.98       ------Sequential Create------ --------Random Create--------
RPI4                -Create-- --Read--- -Delete-- -Create-- --Read--- -Delete--
              files  /sec %CP  /sec %CP  /sec %CP  /sec %CP  /sec %CP  /sec %CP
                 16 -375137312  84 +++++ +++ -375137232  86 -375137192  87 +++++ +++ -375137112  86
Latency               293us     674us     936us    1306us      65us    1313us
1.98,1.98,RPI4,1,1569785861,7592M,,8192,5,180,99,92596,39,46669,21,855,92,98608,22,208.7,11,16,,,,,19228,84,+++++,+++,23974,86,20649,87,+++++,+++,22414,86,82638us,2725ms,4015ms,274ms,78567us,2034ms,293us,674us,936us,1306us,65us,1313us
I don't see any related error message in the syslog, only this:

Code: Select all

Sep 29 21:11:03 RPI4 smartd[333]: Device: /dev/sda [SAT], SMART Usage Attribute: 194 Temperature_Celsius changed from 108 to 106
Which is remind me to disable the smartd, thanks! :D

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

Re: Ssd

Sun Sep 29, 2019 10:45 pm

Kendek wrote:
Sun Sep 29, 2019 7:28 pm
I don't see any related error message in the syslog...
Good to know. I'll order one and see how it goes.

I had a another ASM1351 adapter sitting around that I tried the StarTech firmware on, but it the update utility wouldn't work on it. Didn't really expect it to - device id was 174c:1351 instead of 174c:55aa .

Been holding off the StarTech of because of the price premium. It's an additional $15-$20 narrowing the gap to an Atom or Celeron solution that "just works" with more adapters.

Kendek
Posts: 145
Joined: Thu Jul 25, 2019 4:39 pm
Location: Kaposvár, Hungary

Re: Ssd

Mon Sep 30, 2019 5:20 am

jerrm wrote:
Sun Sep 29, 2019 10:45 pm
I had a another ASM1351 adapter sitting around that I tried the StarTech firmware on, but it the update utility wouldn't work on it. Didn't really expect it to - device id was 174c:1351 instead of 174c:55aa .
The StarTech's updater doesn't work, but I've extracted the 150708_B1_0A_02.bin. You can download it from here, just use the MPTool_2.2.0.0.exe. Only thing, maybe your LED won't functional with this firmware.

Return to “General discussion”