Description
Description
- Target : STM32F103RCT6
- Toolchain : GNU ARM 7-2017-q4-major
- Tools : mbed-cli 1.7.3
- Mbed OS : e1bea44 (HEAD -> mbed-os-5.10, tag: mbed-os-5.10.2, tag: latest)
I encounter a problem, which I think is mostly a configuration problem with LittleFS. In my application, I store some small files on a NOR Flash and I realized today that those write are quite slow. It's two files, around 10 bytes each, and the write takes ~3s to write both on the file system. The thing that makes me thing it's mostly a configuration problem, is that saving only one takes around 2.9s, so there's not a huge difference between one or two files write. And I guess that reusing the file system object to write on another sets of files, after these initial writes, would be quite fast too (though not tested, since not needed in my application).
To be very specific :
- Flash ref is W25Q64JVSSIQ
- I'm using SPIFBlockDevice as block device (mbed-spiffs 8f4aaec (HEAD -> master, origin/master, origin/HEAD, spif-driver 5c49300 (HEAD -> master) )
- SPI clock frequency is 16MHz
- I use default configuration for LittleFS, so : MBED_LFS_READ_SIZE=64, MBED_LFS_PROG_SIZE=64, MBED_LFS_BLOCK_SIZE=512, MBED_LFS_LOOKAHEAD=512 and MBED_LFS_INTRINSICS=true
So I think I should tweak those, but haven't found any short read (reading quickly design.md and spec.md did not give me any info on that) that would give some insights on how to quickly do that for my application, and I feel that it could be a nice addition to the documentation. My gut feeling is telling me I probably should decrease the lookahead parameter, but with no certitude (though I will test that tomorrow). A small rule of thumb would be nice to cover the most common cases.
Issue request type
[X] Question
[ ] Enhancement
[ ] Bug