Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Raspberry Pi SSD #679

Open
geerlingguy opened this issue Oct 24, 2024 · 7 comments
Open

Raspberry Pi SSD #679

geerlingguy opened this issue Oct 24, 2024 · 7 comments

Comments

@geerlingguy
Copy link
Owner

Raspberry Pi is now selling the Raspberry Pi SSD, a 2230-size NVMe SSD rated at PCIe Gen 3 speed.

raspberry-pi-ssd

I have a 256 GB model to test, and they are also releasing a 512 GB model. The product data sheet doesn't list certain specs like MTBF, TBW, shock ratings, or how many lanes of PCIe Gen 3 are supported (assuming you put it on a device other than a Pi 5).

I would like very much to find those things out, so once I get it hooked up, I'll post the full lspci output here.

geerlingguy added a commit that referenced this issue Oct 24, 2024
@geerlingguy
Copy link
Owner Author

@geerlingguy
Copy link
Owner Author

lspci output:

0000:01:00.0 Non-Volatile memory controller: Samsung Electronics Co Ltd NVMe SSD Controller 980 (prog-if 02 [NVM Express])
	Subsystem: Samsung Electronics Co Ltd NVMe SSD Controller 980 (DRAM-less)
	Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx+
	Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
	Latency: 0
	Interrupt: pin A routed to IRQ 38
	Region 0: Memory at 1b80000000 (64-bit, non-prefetchable) [size=16K]
	Capabilities: [40] Power Management version 3
		Flags: PMEClk- DSI- D1- D2- AuxCurrent=0mA PME(D0-,D1-,D2-,D3hot-,D3cold-)
		Status: D0 NoSoftRst+ PME-Enable- DSel=0 DScale=0 PME-
	Capabilities: [50] MSI: Enable- Count=1/32 Maskable- 64bit+
		Address: 0000000000000000  Data: 0000
	Capabilities: [70] Express (v2) Endpoint, MSI 00
		DevCap:	MaxPayload 256 bytes, PhantFunc 0, Latency L0s unlimited, L1 unlimited
			ExtTag- AttnBtn- AttnInd- PwrInd- RBE+ FLReset+ SlotPowerLimit 0W
		DevCtl:	CorrErr+ NonFatalErr+ FatalErr+ UnsupReq+
			RlxdOrd+ ExtTag- PhantFunc- AuxPwr- NoSnoop+ FLReset-
			MaxPayload 256 bytes, MaxReadReq 512 bytes
		DevSta:	CorrErr- NonFatalErr- FatalErr- UnsupReq- AuxPwr- TransPend-
		LnkCap:	Port #0, Speed 8GT/s, Width x4, ASPM L1, Exit Latency L1 <64us
			ClockPM+ Surprise- LLActRep- BwNot- ASPMOptComp+
		LnkCtl:	ASPM L1 Enabled; RCB 64 bytes, Disabled- CommClk+
			ExtSynch- ClockPM+ AutWidDis- BWInt- AutBWInt-
		LnkSta:	Speed 8GT/s, Width x1 (downgraded)
			TrErr- Train- SlotClk+ DLActive- BWMgmt- ABWMgmt-
		DevCap2: Completion Timeout: Range ABCD, TimeoutDis+ NROPrPrP- LTR+
			 10BitTagComp- 10BitTagReq- OBFF Not Supported, ExtFmt- EETLPPrefix-
			 EmergencyPowerReduction Not Supported, EmergencyPowerReductionInit-
			 FRS- TPHComp- ExtTPHComp-
			 AtomicOpsCap: 32bit- 64bit- 128bitCAS-
		DevCtl2: Completion Timeout: 50us to 50ms, TimeoutDis- LTR+ 10BitTagReq- OBFF Disabled,
			 AtomicOpsCtl: ReqEn-
		LnkCap2: Supported Link Speeds: 2.5-8GT/s, Crosslink- Retimer- 2Retimers- DRS-
		LnkCtl2: Target Link Speed: 8GT/s, EnterCompliance- SpeedDis-
			 Transmit Margin: Normal Operating Range, EnterModifiedCompliance- ComplianceSOS-
			 Compliance Preset/De-emphasis: -6dB de-emphasis, 0dB preshoot
		LnkSta2: Current De-emphasis Level: -6dB, EqualizationComplete+ EqualizationPhase1+
			 EqualizationPhase2+ EqualizationPhase3+ LinkEqualizationRequest-
			 Retimer- 2Retimers- CrosslinkRes: unsupported
	Capabilities: [b0] MSI-X: Enable+ Count=13 Masked-
		Vector table: BAR=0 offset=00003000
		PBA: BAR=0 offset=00002000
	Capabilities: [100 v2] Advanced Error Reporting
		UESta:	DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq- ACSViol-
		UEMsk:	DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq- ACSViol-
		UESvrt:	DLP+ SDES+ TLP- FCP+ CmpltTO- CmpltAbrt- UnxCmplt- RxOF+ MalfTLP+ ECRC- UnsupReq- ACSViol-
		CESta:	RxErr- BadTLP- BadDLLP- Rollover- Timeout- AdvNonFatalErr-
		CEMsk:	RxErr- BadTLP- BadDLLP- Rollover- Timeout- AdvNonFatalErr+
		AERCap:	First Error Pointer: 00, ECRCGenCap+ ECRCGenEn- ECRCChkCap+ ECRCChkEn-
			MultHdrRecCap+ MultHdrRecEn- TLPPfxPres- HdrLogCap-
		HeaderLog: 00000000 00000000 00000000 00000000
	Capabilities: [148 v1] Device Serial Number 00-00-00-00-00-00-00-00
	Capabilities: [158 v1] Power Budgeting <?>
	Capabilities: [168 v1] Secondary PCI Express
		LnkCtl3: LnkEquIntrruptEn- PerformEqu-
		LaneErrStat: 0
	Capabilities: [188 v1] Latency Tolerance Reporting
		Max snoop latency: 0ns
		Max no snoop latency: 0ns
	Capabilities: [190 v1] L1 PM Substates
		L1SubCap: PCI-PM_L1.2+ PCI-PM_L1.1+ ASPM_L1.2+ ASPM_L1.1+ L1_PM_Substates+
			  PortCommonModeRestoreTime=10us PortTPowerOnTime=10us
		L1SubCtl1: PCI-PM_L1.2- PCI-PM_L1.1- ASPM_L1.2- ASPM_L1.1-
			   T_CommonMode=0us LTR1.2_Threshold=26016ns
		L1SubCtl2: T_PwrOn=10us
	Kernel driver in use: nvme

It looks like it's a Samsung NVMe controller, and here are more details:

pi@pi5:~ $ sudo apt install nvme-cli

pi@pi5:~ $ sudo nvme list
Node                  Generic               SN                   Model                                    Namespace Usage                      Format           FW Rev  
--------------------- --------------------- -------------------- ---------------------------------------- --------- -------------------------- ---------------- --------
/dev/nvme0n1          /dev/ng0n1            S73YNX0X234088       SAMSUNG MZ9LQ256HBJD-00BVL               1           0.00   B / 256.06  GB    512   B +  0 B   FXM71V1Q

pi@pi5:~ $ sudo nvme id-ctrl /dev/nvme0n1
NVME Identify Controller:
vid       : 0x144d
ssvid     : 0x144d
sn        : S73YNX0X234088      
mn        : SAMSUNG MZ9LQ256HBJD-00BVL              
fr        : FXM71V1Q
rab       : 2
ieee      : 002538
cmic      : 0
mdts      : 9
cntlid    : 0x5
ver       : 0x10400
rtd3r     : 0x7a120
rtd3e     : 0x7a1200
oaes      : 0x200
ctratt    : 0x10
rrls      : 0
cntrltype : 1
fguid     : 00000000-0000-0000-0000-000000000000
crdt1     : 0
crdt2     : 0
crdt3     : 0
nvmsr     : 0
vwci      : 0
mec       : 0
oacs      : 0x17
acl       : 7
aerl      : 3
frmw      : 0x16
lpa       : 0xf
elpe      : 63
npss      : 4
avscc     : 0x1
apsta     : 0x1
wctemp    : 356
cctemp    : 358
mtfa      : 0
hmpre     : 16384
hmmin     : 4096
tnvmcap   : 256,060,514,304
unvmcap   : 0
rpmbs     : 0
edstt     : 35
dsto      : 0
fwug      : 4
kas       : 0
hctma     : 0x1
mntmt     : 318
mxtmt     : 356
sanicap   : 0x60000002
hmminds   : 16
hmmaxd    : 1024
nsetidmax : 0
endgidmax : 1
anatt     : 0
anacap    : 0
anagrpmax : 0
nanagrpid : 0
pels      : 0
domainid  : 0
megcap    : 0
sqes      : 0x66
cqes      : 0x44
maxcmd    : 0
nn        : 1
oncs      : 0x57
fuses     : 0
fna       : 0
vwc       : 0x7
awun      : 1023
awupf     : 0
icsvscc   : 1
nwpc      : 0
acwu      : 0
ocfs      : 0
sgls      : 0
mnan      : 0
maxdna    : 0
maxcna    : 0
subnqn    : nqn.1994-11.com.samsung:nvme:PM991a:M.2:S73YNX0X234088      
ioccsz    : 0
iorcsz    : 0
icdoff    : 0
fcatt     : 0
msdbd     : 0
ofcs      : 0
ps      0 : mp:5.36W operational enlat:0 exlat:0 rrt:0 rrl:0
            rwt:0 rwl:0 idle_power:- active_power:-
            active_power_workload:-
ps      1 : mp:4.47W operational enlat:0 exlat:0 rrt:1 rrl:1
            rwt:1 rwl:1 idle_power:- active_power:-
            active_power_workload:-
ps      2 : mp:2.23W operational enlat:0 exlat:500 rrt:2 rrl:2
            rwt:2 rwl:2 idle_power:- active_power:-
            active_power_workload:-
ps      3 : mp:0.0500W non-operational enlat:210 exlat:1200 rrt:3 rrl:3
            rwt:3 rwl:3 idle_power:- active_power:-
            active_power_workload:-
ps      4 : mp:0.0050W non-operational enlat:1000 exlat:9000 rrt:4 rrl:4
            rwt:4 rwl:4 idle_power:- active_power:-
            active_power_workload:-

pi@pi5:~ $ sudo nvme smart-log /dev/nvme0n1
Smart Log for NVME device:nvme0n1 namespace-id:ffffffff
critical_warning			: 0
temperature				: 25°C (298 Kelvin)
available_spare				: 100%
available_spare_threshold		: 10%
percentage_used				: 0%
endurance group critical warning summary: 0
Data Units Read				: 10 (5.12 MB)
Data Units Written			: 0 (0.00 B)
host_read_commands			: 138
host_write_commands			: 0
controller_busy_time			: 0
power_cycles				: 2
power_on_hours				: 0
unsafe_shutdowns			: 0
media_errors				: 0
num_err_log_entries			: 0
Warning Temperature Time		: 0
Critical Composite Temperature Time	: 0
Temperature Sensor 1           : 25°C (298 Kelvin)
Thermal Management T1 Trans Count	: 0
Thermal Management T2 Trans Count	: 0
Thermal Management T1 Total Time	: 0
Thermal Management T2 Total Time	: 0

@geerlingguy
Copy link
Owner Author

geerlingguy commented Oct 24, 2024

Benchmarking... here's a listing on harddrivebenchmark.com for the Samsung.

And on the Pi 5, running my disk-benchmark.sh:

Benchmark Result
iozone 4K random read 58.76 MB/s
iozone 4K random write 186.04 MB/s
iozone 1M random read 748.70 MB/s
iozone 1M random write 724.94 MB/s
iozone 1M sequential read 800.15 MB/s
iozone 1M sequential write 728.29 MB/s

Also running PiBenchmarks.com:

     Category                  Test                      Result      
HDParm                    Disk Read                 805.98 MB/sec            
HDParm                    Cached Disk Read          752.55 MB/sec            
DD                        Disk Write                511 MB/s                 
FIO                       4k random read            182857 IOPS (731428 KB/s)
FIO                       4k random write           90220 IOPS (360881 KB/s) 
IOZone                    4k read                   223680 KB/s              
IOZone                    4k write                  169696 KB/s              
IOZone                    4k random read            61596 KB/s               
IOZone                    4k random write           188887 KB/s              

                          Score: 46855                                       

@geerlingguy
Copy link
Owner Author

@Steve-Tech
Copy link

Hey Jeff, I was just curious if this supported 4K Native Advanced Format.

You can check using either nvme id-ns -H /dev/nvme0n1 or smartctl -c /dev/nvme0n1, and it'll be down the bottom as LBA Format or Sizes.

For example my WD Black (which does) has this:

LBA Format  0 : Metadata Size: 0   bytes - Data Size: 512 bytes - Relative Performance: 0x2 Good
LBA Format  1 : Metadata Size: 0   bytes - Data Size: 4096 bytes - Relative Performance: 0x1 Better (in use)

@leander091
Copy link

hi @Steve-Tech,

Have some RPI SSD's myself and it does not like it support 4k blocks as shown below:
LBA Format 0 : Metadata Size: 0 bytes - Data Size: 512 bytes - Relative Performance: 0 Best (in use)

@Steve-Tech
Copy link

Hi @leander091, alright, thanks for checking!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants