Skip to content

Commit 7f78170

Browse files
feat(video): Thought I Ran Out of PCIe Lanes... I Was Wrong
1 parent a7be2d5 commit 7f78170

File tree

1 file changed

+97
-3
lines changed

1 file changed

+97
-3
lines changed

_posts/2025-04-12-oculink-nvme.md

+97-3
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,107 @@ Today, I expand my home server with more NVMe storage, put a Samsung 990 Pro and
2222

2323
I decided to test each drive to be sure that I wasn't being throttled and that I was getting the highest speeds my motherboard would support.
2424

25+
## Finding Your Drives
26+
27+
First install the `nvme` utility
28+
29+
```console
30+
sudo apt update
31+
sudo apt install nvme-cli
32+
```
33+
34+
Then we can list all of our NVMe drives
35+
36+
```console
37+
nvme list
38+
```
39+
40+
You should see something like this
41+
42+
```console
43+
Node Generic SN Model Namespace Usage Format FW Rev
44+
--------------------- --------------------- -------------------- ---------------------------------------- --------- -------------------------- ---------------- --------
45+
/dev/nvme2n1 /dev/ng2n1 PHOC331301K11111 INTEL SSDPEK1A118GA 1 118.41 GB / 118.41 GB 512 B + 0 B U5110550
46+
/dev/nvme1n1 /dev/ng1n1 1846E1D22222 CT500P1SSD8 1 500.11 GB / 500.11 GB 512 B + 0 B P3CR013
47+
/dev/nvme0n1 /dev/ng0n1 S3EWNX0JA0YYYYY Samsung SSD 960 PRO 512GB 1 512.11 GB / 512.11 GB 512 B + 0 B 4B6QCXP7
48+
```
49+
50+
From there you can also check to see which lane it's in
51+
52+
```console
53+
lspci | grep -i nvme
54+
```
55+
56+
You should see something like this
57+
58+
```console
59+
01:00.0 Non-Volatile memory controller: Samsung Electronics Co Ltd NVMe SSD Controller SM961/PM961/SM963
60+
04:00.0 Non-Volatile memory controller: Micron/Crucial Technology P1 NVMe PCIe SSD (rev 03)
61+
69:00.0 Non-Volatile memory controller: Intel Corporation Optane NVME SSD P1600X Series
62+
```
63+
64+
## Checking PCIe Speeds
65+
66+
Then you can check to see what each drive is negotiated at (update with your lane assignment)
67+
68+
```console
69+
lspci -s 68:00.0 -vv | grep -iE 'LnkCap|LnkSta'
70+
```
71+
72+
You should see something like this (keep in mind, mine shows PCIe Gen 3 speeds)
73+
74+
```console
75+
LnkCap: Port #0, Speed 8GT/s, Width x4, ASPM L1, Exit Latency L1 unlimited
76+
LnkSta: Speed 8GT/s, Width x4
77+
LnkCap2: Supported Link Speeds: 2.5-8GT/s, Crosslink- Retimer- 2Retimers- DRS-
78+
LnkSta2: Current De-emphasis Level: -3.5dB, EqualizationComplete+ EqualizationPhase1+
79+
```
80+
81+
## Checking Drive Temps and Throttling
82+
83+
If you want to see the SMART log to check for throttling and temps you can run (updated with your drive path)
84+
85+
```console
86+
nvme smart-log /dev/ng0n1
87+
```
88+
89+
You should see something like this
90+
91+
```bash
92+
Smart Log for NVME device:ng0n1 namespace-id:ffffffff
93+
critical_warning : 0
94+
temperature : 32°C (305 Kelvin)
95+
available_spare : 100%
96+
available_spare_threshold : 10%
97+
percentage_used : 8%
98+
endurance group critical warning summary: 0
99+
Data Units Read : 127385723 (65.22 TB)
100+
Data Units Written : 186302952 (95.39 TB)
101+
host_read_commands : 1823391462
102+
host_write_commands : 3042922234
103+
controller_busy_time : 8341
104+
power_cycles : 4402
105+
power_on_hours : 11430
106+
unsafe_shutdowns : 348
107+
media_errors : 0
108+
num_err_log_entries : 13652
109+
Warning Temperature Time : 0
110+
Critical Composite Temperature Time : 0
111+
Temperature Sensor 1 : 32°C (305 Kelvin)
112+
Temperature Sensor 2 : 37°C (310 Kelvin)
113+
Thermal Management T1 Trans Count : 0
114+
Thermal Management T2 Trans Count : 0
115+
Thermal Management T1 Total Time : 0
116+
Thermal Management T2 Total Time : 0
117+
```
118+
25119
### Sequential Performance
26120

27121
Here is the command I ran to test sequential read and writes. Keep in mind that although the drives and adapter support PCIe gen 4, my board only supports gen 3.
28122

29123
### Sequential Read/Write (Large Files, 1MiB Block Size)
30124

31-
```bash
125+
```console
32126
fio --name=seqreadwrite \
33127
--filename=/dev/nvme3n1 \
34128
--ioengine=libaio \
@@ -53,7 +147,7 @@ Random 4K tests were using 4k block size, random read/write (`randrw`).
53147

54148
### Random Read/Write 4KiB (IOPS/Small Files Test)
55149

56-
```bash
150+
```console
57151
fio --name=random4k \
58152
--filename=/dev/nvme3n1 \
59153
--ioengine=libaio \
@@ -78,7 +172,7 @@ I then wanted to test latency, since that's where Intel Optane drives are claime
78172

79173
### Latency Focused Test (1 I/O at a Time, 4KiB Random Read)
80174

81-
```bash
175+
```console
82176
fio --name=latency_test \
83177
--filename=/dev/nvme3n1 \
84178
--ioengine=sync \

0 commit comments

Comments
 (0)