I did not find any comprehensive overview of the expected read on write speeds of the different Arduino SD APIs that are provided to access the SD drive. I also expected to see a difference depending on the read/write size.
I tested the SD and SDMMC libraries, that are provided by the ESP32 Arduino core.
I also wanted to include the SDFAT library, but unfortunately it was crashing with different read or write sizes, so I excluded it from my tests. I was including my own VFS implementations however that are provided by the AudioTools library, to support the different audio scenarios using purely the Espressif IDF.
In this Blog, I am posting my results, that were measured using an AI Thinker AudioKit Board which has an ESP32 and a buit-in SD drive.
I did not perform any optimizations and was using the proposed standard settings. The presented values are measured in thruput of MB per seconds: so the higher, the better!
SD
Here are the values using the SD library that is provided by the ESP32 Arduino core:
The thruput both for reading and writing depends on the write size. Sizes below 100 bytes lead to an extensive overhead and the thruput is is maxing out at slightly above 0.4 MB/sec.
SDMMC
Here are the values using the SDMMC library that is provided by the ESP32 Arduino core. I was using it with 4 bits:
SDMMC has a much higher thruput that increase with the read and write size!
VFS_SDSPI
This is my custom VFS SDSPI driver for the ESP32 that is part of my AudioTools library to provide the Stream API access the SD from pure IDF.
The write size is constant: the read thruput however increases with the read size! The read performance is better then the provided Arduino implementation.
VFS_SDMMC
This is my custom VFS SDMMC driver for the ESP32 that is part of my AudioTools library to provide the Stream API access the SD from pure IDF.
The write size is constant: the read thruput however increases with the read size! The read performance is better then the provided Arduino implementation.
Summary: Write Speed Comparison
The standard Arduino SDMMC provides the best performance (except for very small write sizes) !
Summary: Read Speed Comparison
The standard Arduino SDMMC provides the best performance (except for very small and veriy big write sizes) !
1 Comment
Ravi · 25. March 2025 at 11:51
Thanks for this! 🙂