You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am running SPIFFS on an ARM M4F processor connected to an 8MB MX25R6435F SPI flash. SPIFFS is allocated 6MB of the external flash, and has been configured for 64KB blocks with 256B pages.
As the flash fills up, write performance degrades. I can improve write performance by manually running garbage collection, but SPIFFS_gc often requires several seconds to run when the flash is ~85% full and SPIFFS_GC_MAX_RUNS=1. I would like to run garbage collection in the background, but 3 seconds is far too long to block all IO in my application.
My question is thus: Is it possible to split up garbage collection into smaller chunks that can be interspersed between other, more important operations? A quick look at SPIFFS_gc shows that SPIFFS_LOCK is held during the entirety of spiffs_gc_check, which leads me to believe the that garbage collection must be done atomically.
I'd be interested to hear from anyone else who has encountered similar performance problems and found a way to run garbage collection in the background without blocking other filesystem IO for an extended period.
Thanks for the help!
The text was updated successfully, but these errors were encountered:
Hello,
I am running SPIFFS on an ARM M4F processor connected to an 8MB MX25R6435F SPI flash. SPIFFS is allocated 6MB of the external flash, and has been configured for 64KB blocks with 256B pages.
As the flash fills up, write performance degrades. I can improve write performance by manually running garbage collection, but
SPIFFS_gc
often requires several seconds to run when the flash is ~85% full andSPIFFS_GC_MAX_RUNS=1
. I would like to run garbage collection in the background, but 3 seconds is far too long to block all IO in my application.My question is thus: Is it possible to split up garbage collection into smaller chunks that can be interspersed between other, more important operations? A quick look at
SPIFFS_gc
shows thatSPIFFS_LOCK
is held during the entirety ofspiffs_gc_check
, which leads me to believe the that garbage collection must be done atomically.I'd be interested to hear from anyone else who has encountered similar performance problems and found a way to run garbage collection in the background without blocking other filesystem IO for an extended period.
Thanks for the help!
The text was updated successfully, but these errors were encountered: