lp-mu-nvme-benchmark.sh
Using fio to measure sequential throughput and random IOPS.
Ensure the NVMe drive is mounted or accessible. The script creates a temporary 1GB file for tests. Results depend on the quality of the installed M.2 NVMe SSD and the module's cooling.
lp-mu-nvme-benchmark.sh
#!/bin/bash
# Benchmark de stockage NVMe pour LattePanda Mu Ultra
# Nécessite fio : sudo apt install fio
DEVICE="/dev/nvme0n1" # Ajustez selon votre disque
TEST_FILE="/tmp/nvme_test.bin"
SIZE="1G"
echo "Test de séquentiel écriture..."
fio --name=seqwrite --filename=$TEST_FILE --rw=write --bs=1M --size=$SIZE --numjobs=1 --direct=1 --group_reporting
echo "Test de séquentiel lecture..."
fio --name=seqread --filename=$TEST_FILE --rw=read --bs=1M --size=$SIZE --numjobs=1 --direct=1 --group_reporting
echo "Test aléatoire 4K (IOPS)..."
fio --name=randread --filename=$TEST_FILE --rw=randread --bs=4k --size=$SIZE --numjobs=4 --direct=1 --group_reporting
rm $TEST_FILE
echo "Benchmark terminé."