Raspberry Pi5の標準インストールでは、PCIは、PCIe Gen 2.0で設定されています。Raspberry Pi5のハードとしては、PCIe Gen 3.0でも動作します。設定をPCIe Gen3.0に切り替えたの時、どれぐらい早く動作するか実測します。
測定の為fioをインストール
下記コマンドでfioをインストールします。hdparamはキャッシュの影響を受けるので使っていません。
$ sudo apt-get install fio
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following additional packages will be installed:
ibverbs-providers libaio1t64 libboost-iostreams1.83.0 libdaxctl1 libgfapi0 libgfrpc0 libgfxdr0 libglusterfs0 libibverbs1 libnbd0 libndctl6 libnfs14 libpmem1 librados2 librbd1 librdmacm1t64
Suggested packages:
fio-examples gnuplot
The following NEW packages will be installed:
fio ibverbs-providers libaio1t64 libboost-iostreams1.83.0 libdaxctl1 libgfapi0 libgfrpc0 libgfxdr0 libglusterfs0 libibverbs1 libnbd0 libndctl6 libnfs14 libpmem1 librados2 librbd1 librdmacm1t64
0 upgraded, 17 newly installed, 0 to remove and 0 not upgraded.
Need to get 20.0 MB of archives.
After this operation, 45.5 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://deb.debian.org/debian trixie/main arm64 libaio1t64 arm64 0.3.113-8+b1 [15.0 kB]
Get:2 http://deb.debian.org/debian trixie/main arm64 libgfxdr0 arm64 11.1-6 [3,181 kB]
Get:3 http://deb.debian.org/debian trixie/main arm64 libglusterfs0 arm64 11.1-6 [3,391 kB]
Get:4 http://deb.debian.org/debian trixie/main arm64 libgfrpc0 arm64 11.1-6 [3,204 kB]
Get:5 http://deb.debian.org/debian trixie/main arm64 libgfapi0 arm64 11.1-6 [3,236 kB]
Get:6 http://deb.debian.org/debian trixie/main arm64 libibverbs1 arm64 56.1-1 [58.9 kB]
Get:7 http://deb.debian.org/debian trixie/main arm64 libnbd0 arm64 1.22.2-1+b1 [77.6 kB]
Get:8 http://deb.debian.org/debian trixie/main arm64 libnfs14 arm64 5.0.2-1+b2 [102 kB]
Get:9 http://deb.debian.org/debian trixie/main arm64 libdaxctl1 arm64 81-1 [20.6 kB]
Get:10 http://deb.debian.org/debian trixie/main arm64 libndctl6 arm64 81-1 [57.9 kB]
Get:11 http://deb.debian.org/debian trixie/main arm64 libpmem1 arm64 1.13.1-1.1+b1 [47.0 kB]
Get:12 http://deb.debian.org/debian trixie/main arm64 libboost-iostreams1.83.0 arm64 1.83.0-4.2 [252 kB]
Get:13 http://deb.debian.org/debian trixie/main arm64 librdmacm1t64 arm64 56.1-1 [67.2 kB]
Get:14 http://deb.debian.org/debian trixie/main arm64 librados2 arm64 18.2.7+ds-1 [3,162 kB]
Get:15 http://deb.debian.org/debian trixie/main arm64 librbd1 arm64 18.2.7+ds-1 [2,221 kB]
Get:16 http://deb.debian.org/debian trixie/main arm64 fio arm64 3.39-1 [550 kB]
Get:17 http://deb.debian.org/debian trixie/main arm64 ibverbs-providers arm64 56.1-1 [333 kB]
Fetched 20.0 MB in 2s (11.1 MB/s)
Selecting previously unselected package libaio1t64:arm64.
(Reading database ... 65992 files and directories currently installed.)
Preparing to unpack .../00-libaio1t64_0.3.113-8+b1_arm64.deb ...
Unpacking libaio1t64:arm64 (0.3.113-8+b1) ...
Selecting previously unselected package libgfxdr0:arm64.
Preparing to unpack .../01-libgfxdr0_11.1-6_arm64.deb ...
Unpacking libgfxdr0:arm64 (11.1-6) ...
Selecting previously unselected package libglusterfs0:arm64.
Preparing to unpack .../02-libglusterfs0_11.1-6_arm64.deb ...
Unpacking libglusterfs0:arm64 (11.1-6) ...
Selecting previously unselected package libgfrpc0:arm64.
Preparing to unpack .../03-libgfrpc0_11.1-6_arm64.deb ...
・
・
・
SSDの情報の確認
$ lsblk -ip
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS
/dev/loop0 7:0 0 2G 0 loop
/dev/zram0 254:0 0 2G 0 disk [SWAP]
/dev/nvme0n1 259:0 0 238.5G 0 disk
∟/dev/nvme0n1p1 259:1 0 512M 0 part /boot/firmware
∟/dev/nvme0n1p2 259:2 0 238G 0 part /
今回 赤字の通り /dev/nvme0n1
詳細の情報は
$ sudo fdisk -l -o +UUID
・
・
・
Disk /dev/nvme0n1: 238.47 GiB, 256060514304 bytes, 500118192 sectors
Disk model: SPCC M.2 PCIe SSD
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x764aa807
fdisk: dos unknown column: UUID
性能測定(PCIe Gen2.0)
下記コマンドで、性能を確認。
$ sudo fio --name=seqread --rw=read --bs=1M --size=2G --filename=/dev/nvme0n1 --direct=1 --ioengine=libaio --iodepth=32 --numjobs=1 --group_reporting --time_based=1 --runtime=20
seqread: (g=0): rw=read, bs=(R) 1024KiB-1024KiB, (W) 1024KiB-1024KiB, (T) 1024KiB-1024KiB, ioengine=libaio, iodepth=32
fio-3.39
Starting 1 process
Jobs: 1 (f=1): [R(1)][100.0%][r=433MiB/s][r=433 IOPS][eta 00m:00s]
seqread: (groupid=0, jobs=1): err= 0: pid=1461: Mon Feb 23 00:10:08 2026
read: IOPS=432, BW=433MiB/s (454MB/s)(8689MiB/20071msec)
slat (usec): min=23, max=224, avg=36.20, stdev=10.44
clat (msec): min=9, max=142, avg=73.86, stdev= 3.34
lat (msec): min=10, max=142, avg=73.90, stdev= 3.33
clat percentiles (msec):
| 1.00th=[ 72], 5.00th=[ 73], 10.00th=[ 73], 20.00th=[ 74],
| 30.00th=[ 74], 40.00th=[ 74], 50.00th=[ 74], 60.00th=[ 74],
| 70.00th=[ 74], 80.00th=[ 74], 90.00th=[ 74], 95.00th=[ 75],
| 99.00th=[ 77], 99.50th=[ 85], 99.90th=[ 124], 99.95th=[ 133],
| 99.99th=[ 142]
bw ( KiB/s): min=436224, max=446464, per=100.00%, avg=443289.60, stdev=1793.22, samples=40
iops : min= 426, max= 436, avg=432.90, stdev= 1.75, samples=40
lat (msec) : 10=0.01%, 20=0.05%, 50=0.16%, 100=99.56%, 250=0.22%
cpu : usr=0.09%, sys=1.87%, ctx=8640, majf=0, minf=2055
IO depths : 1=0.1%, 2=0.1%, 4=0.1%, 8=0.1%, 16=0.2%, 32=99.6%, >=64=0.0%
submit : 0=0.0%, 4=100.0%, 8=0.0%, 16=0.0%, 32=0.0%, 64=0.0%, >=64=0.0%
complete : 0=0.0%, 4=100.0%, 8=0.0%, 16=0.0%, 32=0.1%, 64=0.0%, >=64=0.0%
issued rwts: total=8689,0,0,0 short=0,0,0,0 dropped=0,0,0,0
latency : target=0, window=0, percentile=100.00%, depth=32
Run status group 0 (all jobs):
READ: bw=433MiB/s (454MB/s), 433MiB/s-433MiB/s (454MB/s-454MB/s), io=8689MiB (9111MB), run=20071-20071msec
Disk stats (read/write):
nvme0n1: ios=8613/0, sectors=17639424/0, merge=0/0, ticks=635280/0, in_queue=635280, util=99.52%
読み込みは、433MiB/sの性能が出ています。
PCIe Gen2.0をPCIe Gen3.0に変えて性能測定
Raspberry Pi 5は標準状態ではPCIe Gen 2.0で動作するようになっていますが、PCIe Gen 3.0に切り替えることも可能です。
$ sudo vi /boot/firmware/config.txt
下記の行を追加します。(既に登録されていれば不要です。)
dtparam=pciex1
dtparam=pciex1_gen=3
リブートします。
$ sudo reboot
再度性能測定します。
$ sudo fio --name=seqread --rw=read --bs=1M --size=2G --filename=/dev/nvme0n1 --direct=1 --ioengine=libaio --iodepth=32 --numjobs=1 --group_reporting --time_based=1 --runtime=20
seqread: (g=0): rw=read, bs=(R) 1024KiB-1024KiB, (W) 1024KiB-1024KiB, (T) 1024KiB-1024KiB, ioengine=libaio, iodepth=32
fio-3.39
Starting 1 process
Jobs: 1 (f=1): [R(1)][100.0%][r=850MiB/s][r=850 IOPS][eta 00m:00s]
seqread: (groupid=0, jobs=1): err= 0: pid=1105: Mon Feb 23 00:15:37 2026
read: IOPS=850, BW=850MiB/s (891MB/s)(16.6GiB/20038msec)
slat (usec): min=23, max=219, avg=25.18, stdev= 6.73
clat (usec): min=8656, max=72681, avg=37609.02, stdev=1293.05
lat (usec): min=8876, max=72716, avg=37634.21, stdev=1290.61
clat percentiles (usec):
| 1.00th=[36439], 5.00th=[37487], 10.00th=[37487], 20.00th=[37487],
| 30.00th=[37487], 40.00th=[37487], 50.00th=[37487], 60.00th=[37487],
| 70.00th=[37487], 80.00th=[37487], 90.00th=[37487], 95.00th=[38536],
| 99.00th=[40109], 99.50th=[42206], 99.90th=[52691], 99.95th=[63177],
| 99.99th=[71828]
bw ( KiB/s): min=860160, max=874496, per=100.00%, avg=870553.60, stdev=2514.17, samples=40
iops : min= 840, max= 854, avg=850.15, stdev= 2.46, samples=40
lat (msec) : 10=0.01%, 20=0.06%, 50=99.81%, 100=0.12%
cpu : usr=0.22%, sys=2.44%, ctx=16924, majf=0, minf=2055
IO depths : 1=0.1%, 2=0.1%, 4=0.1%, 8=0.1%, 16=0.1%, 32=99.8%, >=64=0.0%
submit : 0=0.0%, 4=100.0%, 8=0.0%, 16=0.0%, 32=0.0%, 64=0.0%, >=64=0.0%
complete : 0=0.0%, 4=100.0%, 8=0.0%, 16=0.0%, 32=0.1%, 64=0.0%, >=64=0.0%
issued rwts: total=17034,0,0,0 short=0,0,0,0 dropped=0,0,0,0
latency : target=0, window=0, percentile=100.00%, depth=32
Run status group 0 (all jobs):
READ: bw=850MiB/s (891MB/s), 850MiB/s-850MiB/s (891MB/s-891MB/s), io=16.6GiB (17.9GB), run=20038-20038msec
Disk stats (read/write):
nvme0n1: ios=16914/8, sectors=34639872/64, merge=0/0, ticks=635817/288, in_queue=636104, util=99.52%
読み込みは、850MiB/sと、PCIe Gen2.0の約2倍の性能が出ています。
なので、Raspberry Pi5では必ずPCIe Gen3.0の設定を行いましょう。

