linux-nvme-benchmark.sh
Measures sequential and random read/write performance of the NVMe storage.
Uses the standard 'fio' tool. Ensure the SSD is not mounted for writing during the test to avoid corruption. The path /dev/nvme0n1 is typical for the first NVMe disk. Results depend on operating temperature (thermal throttling possible at full load).
linux-nvme-benchmark.sh
#!/bin/bash
# Installer fio si nécessaire
# sudo apt install fio
# Test de lecture séquentielle 1M block
fio --name=seqread --rw=read --bs=1M --size=1G --numjobs=1 --runtime=60 --group_reporting --filename=/dev/nvme0n1
# Test d'écriture séquentielle
fio --name=seqwrite --rw=write --bs=1M --size=1G --numjobs=1 --runtime=60 --group_reporting --filename=/dev/nvme0n1
# Test d'écriture aléatoire 4k (IOPS)
fio --name=randwrite --rw=randwrite --bs=4k --size=1G --numjobs=4 --runtime=60 --group_reporting --filename=/dev/nvme0n1