jetson-m2-nvme-benchmark-7.ino
Evaluates sequential read/write speeds on the M.2 NVMe slot, utilizing the available PCIe Gen3 lanes.
This script uses 'dd' to measure M.2 storage bandwidth. Ensure your NVMe SSD is properly inserted into the slot under the Jetson module. Cache is disabled ('oflag=direct') to reflect actual hardware performance. Adjust the TARGET_DEVICE variable according to 'lsblk' output.
jetson-m2-nvme-benchmark-7.ino
#!/bin/bash
# Benchmark disque M.2 pour Xerxes Nano
# Nécessite 'iozone' ou 'fio'. Ici utilisation de dd pour simplicité et fiabilité.
TARGET_DEVICE="/dev/nvme0n1" # Ajustez selon lsblk
TEST_FILE="/tmp/testfile.bin"
SIZE="1G"
echo "=== Benchmark Stockage M.2 PCIe Gen3 ==="
# Vérification de la présence du disque
if [ ! -b "$TARGET_DEVICE" ]; then
echo "Disque NVMe non détecté. Vérifiez l'installation mécanique M.2."
exit 1
fi
# Test d'écriture séquentielle
start=$(date +%s.%N)
dd if=/dev/zero of=$TEST_FILE bs=1M count=1024 oflag=direct status=none
end=$(date +%s.%N)
echo "Écriture Séquentielle (1GB):"
dd if=/dev/zero of=$TEST_FILE bs=1M count=1024 oflag=direct | tail -n 1
# Test de lecture séquentielle
echo "Lecture Séquentielle (1GB):"
dd if=$TEST_FILE of=/dev/null bs=1M iflag=direct | tail -n 1
rm $TEST_FILE
echo "Test terminé."