There are 8 configuration settings for littleFS and I see a wide range of devices being used, but I have not found any recommendations on how to tune these settings
cfg.read_size = READ_SIZE; cfg.prog_size = WRITE_SIZE; cfg.block_size = BLOCK_SIZE; cfg.block_count = BLOCK_COUNT; cfg.cache_size = CACHE_SIZE; cfg.lookahead_size = LOOKAHEAD_SIZE; cfg.block_cycles = BLOCK_CYCLES;
I am using a NAND Flash, so:
READ/WRITE size is likely my Page size (2048)
BLOCK_SIZE would be well, my Block size (64 pages)
BLOCK_SIZE would be the number of blocks that are assigned to littleFS
Those were the easy ones.
CACHE_SIZE - what makes littleFS run best? Page Size? Block Size? a few Blocks?
LOOKAHEAD - ditto
BLOCK_CYCLES - I did see:
// block_cycles is the number of erase cycles before littlefs evicts
// metadata logs as a part of wear leveling. Suggested values are in the
// range of 100-1000, or set block_cycles to -1 to disable block-level
What are the trade offs of -1, 100 or 1000?