nvme_storage_benchmark-6.ino

Xerxes Pi 2026 Carrier Board for Raspberry Pi CM4/CM5 Modules · File : nvme_storage_benchmark-6.ino · Language : bash · Use case : Benchmark de performance et vérification de l'intégrité du stockage NVMe M.2

Bash script using fio to measure sequential read and write throughput on the integrated NVMe storage via the M.2 slot.

Ensure an NVMe SSD is inserted into the M.2 M-key connector under the board. Install fio with 'sudo apt install fio'. The script accesses the raw device /dev/nvme0n1 directly; do not run if important data exists without backup. Check root permissions if needed.

nvme_storage_benchmark-6.ino

#!/bin/bash
# Benchmark NVMe sur Xerxes Pi 2026
# Vérifie la présence du disque NVMe (M.2 M-key)
if [ ! -e /dev/nvme0n1 ]; then
    echo "Erreur : Aucun disque NVMe détecté sur /dev/nvme0n1"
    exit 1
fi

echo "--- Identification du disque ---"
lsblk -d -o NAME,SIZE,MODEL,TRAN | grep nvme

echo "--- Test de lecture séquentielle (fio) ---"
# Installation nécessaire : sudo apt install fio
fio --name=seqread --ioengine=libaio --direct=1 --bs=1M --size=1G --numjobs=1 --read --runtime=10 --time_based --group_reporting --filename=/dev/nvme0n1

echo "--- Test d'écriture séquentielle (fio) ---"
fio --name=seqwrite --ioengine=libaio --direct=1 --bs=1M --size=1G --numjobs=1 --write --runtime=10 --time_based --group_reporting --filename=/dev/nvme0n1

← Back to the board