Hello,
I am using a Cubepilot Cubeorange flight controller and after enabling some more data to be logged with SDLOG_PROFILE in get lots of dropouts in my logfile.
When running the microSD card benchmark with sd_bench -r 50
I see a pattern of big hickups in the logging, probably where the dropouts come from (Run 4 and 10).
INFO [sd_bench] Run 0: 319.93 KB/s, max write time: 185 ms (= 21.62 KB/s), fsync: 6 ms
INFO [sd_bench] Run 1: 319.47 KB/s, max write time: 157 ms (= 25.48 KB/s), fsync: 6 ms
INFO [sd_bench] Run 2: 330.34 KB/s, max write time: 129 ms (= 31.01 KB/s), fsync: 6 ms
INFO [sd_bench] Run 3: 307.30 KB/s, max write time: 204 ms (= 19.61 KB/s), fsync: 12 ms
INFO [sd_bench] Run 4: 138.95 KB/s, max write time: 1625 ms (= 2.46 KB/s), fsync: 85 ms
INFO [sd_bench] Run 5: 337.34 KB/s, max write time: 88 ms (= 45.45 KB/s), fsync: 6 ms
INFO [sd_bench] Run 6: 356.05 KB/s, max write time: 37 ms (= 108.11 KB/s), fsync: 6 ms
INFO [sd_bench] Run 7: 342.80 KB/s, max write time: 36 ms (= 111.11 KB/s), fsync: 6 ms
INFO [sd_bench] Run 8: 345.92 KB/s, max write time: 29 ms (= 137.93 KB/s), fsync: 6 ms
INFO [sd_bench] Run 9: 350.31 KB/s, max write time: 27 ms (= 148.15 KB/s), fsync: 7 ms
INFO [sd_bench] Run 10: 170.73 KB/s, max write time: 1011 ms (= 3.96 KB/s), fsync: 95 ms
Therefore we decided to get a new, better microSD card and after looking at this github benchmark collection and the official PX4 docs we bought a SanDisk Extreme U3 card from Amazon expecting better results. However, the overall speed was much slower than the previous default card (SanDisk EDGE 16GB microSDHC I Class 4).
INFO [sd_bench] Run 0: 108.86 KB/s, max write time: 86 ms (= 46.51 KB/s), fsync: 55 ms
INFO [sd_bench] Run 1: 115.36 KB/s, max write time: 68 ms (= 58.82 KB/s), fsync: 21 ms
INFO [sd_bench] Run 2: 114.26 KB/s, max write time: 67 ms (= 59.70 KB/s), fsync: 53 ms
INFO [sd_bench] Run 3: 114.75 KB/s, max write time: 83 ms (= 48.19 KB/s), fsync: 14 ms
INFO [sd_bench] Run 4: 114.90 KB/s, max write time: 62 ms (= 64.52 KB/s), fsync: 16 ms
INFO [sd_bench] Run 5: 113.43 KB/s, max write time: 83 ms (= 48.19 KB/s), fsync: 40 ms
INFO [sd_bench] Run 6: 117.41 KB/s, max write time: 68 ms (= 58.82 KB/s), fsync: 17 ms
INFO [sd_bench] Run 7: 112.85 KB/s, max write time: 83 ms (= 48.19 KB/s), fsync: 11 ms
INFO [sd_bench] Run 8: 114.45 KB/s, max write time: 77 ms (= 51.95 KB/s), fsync: 17 ms
INFO [sd_bench] Run 9: 117.69 KB/s, max write time: 69 ms (= 57.97 KB/s), fsync: 11 ms
INFO [sd_bench] Run 10: 114.27 KB/s, max write time: 71 ms (= 56.34 KB/s), fsync: 36 ms
Even though the logging is much more consistent, the overall speed is much worse and not comparable to others using the same/similar microSD card.
After i commented my speeds on GitHub i was recommended to check if SDMMC1 or SDMMC2 is used. The only information I found about that was a discussion point at a Dev Call, but I don’t know what the result/talking point was exactly. How/where can I find more information about this?
Overall I expected the new microSD card to outperform the old, default Cubeorange card, but it does not seem the case. Is there anything I am doing wrong? How can I further test why my speeds are so much slower?