lattepanda-mu-ultra-benchmark-storage-nvme-7.ino

LattePanda Mu Ultra: x86 Compute Module for Embedded AI · File : lattepanda-mu-ultra-benchmark-storage-nvme-7.ino · Language : bash · Use case : Mesurer les performances séquentielles et aléatoires du stockage M.2 NVMe via fio.

Bash script automating disk speed tests with 'fio' to validate the bandwidth of the LattePanda Mu Ultra's M.2 NVMe port.

Hardware: LattePanda Mu Ultra with installed M.2 NVMe drive. Software: Ubuntu, 'fio'. Caution: Use a temporary file or non-critical drive. Execution: chmod +x script.sh && sudo ./script.sh.

lattepanda-mu-ultra-benchmark-storage-nvme-7.ino

#!/bin/bash

# Script de benchmark stockage NVMe pour LattePanda Mu Ultra
# Nécessite : sudo apt install fio

DEVICE="/dev/nvme0n1" # Ajuster selon votre disque (vérifier avec lsblk)
TEST_FILE="/tmp/fio_test.dat"
SIZE="1G" # Taille du fichier de test

if [ ! -b "$DEVICE" ]; then
    echo "Erreur : Le périphérique $DEVICE n'existe pas."
    echo "Utilisez 'lsblk' pour trouver le bon périphérique."
    exit 1
fi

echo "=== Benchmark Séquentiel (Lecture) ==="
sudo fio --filename=$TEST_FILE --direct=1 --rw=read --bs=1m --size=$SIZE --numjobs=1 --iodepth=32 --runtime=30 --time_based --name=seq-read --group_reporting

echo "=== Benchmark Séquentiel (Écriture) ==="
sudo fio --filename=$TEST_FILE --direct=1 --rw=write --bs=1m --size=$SIZE --numjobs=1 --iodepth=32 --runtime=30 --time_based --name=seq-write --group_reporting

echo "=== Benchmark Aléatoire 4K (Lecture) ==="
sudo fio --filename=$TEST_FILE --direct=1 --rw=randread --bs=4k --size=$SIZE --numjobs=4 --iodepth=128 --runtime=30 --time_based --name=rand-read --group_reporting

echo "=== Benchmark Aléatoire 4K (Écriture) ==="
sudo fio --filename=$TEST_FILE --direct=1 --rw=randwrite --bs=4k --size=$SIZE --numjobs=4 --iodepth=128 --runtime=30 --time_based --name=rand-write --group_reporting

# Nettoyage
rm -f $TEST_FILE
echo "Test terminé. Fichier de test supprimé."

← Back to the board