Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rename operation is too heavy (experiencing a 12s FS/system lock ) #619

Closed
invoxiaamo opened this issue Nov 26, 2021 · 1 comment
Closed

Comments

@invoxiaamo
Copy link
Contributor

We experience very long locking of the FS if we perform a single rename (more 12s)

The hardware is pretty solid:

  • ARM @ 250+ MHz
  • NOR spi @ 100 Mhz bus (octo SPI) - sector size in 4KB
  • FS size : 32 MB

littlefs version 2.4.1 (issue also existing on 2.2.0)
Zephyr OS (but doesn't matter here)

Too simplify the issue and reproduce easily.

  • erase the whole flash
  • mount littlefs
  • create 100 small files (256 bytes each)

Then in loop

  • open("test", FS_O_CREATE | FS_O_WRITE)
  • write(1024 bytes)
  • close()
  • rename("test", "test_rename")

Usually each rename of the loop requires 4000+ flash read operations (96K of data) and a single write, no erase.
BUT: every 33 loop, a single rename last 2s, requires ~300K flash read operations (4.7MB of data), a single sector erase, 7 writes.

... It looks to be a lot for a FS filled with 100 files and 26KB of data (the more files and/or data, the longer is the lock)

I will try to analyze what is done, but this scenario may sound a bell to the littlefs developers.
Arnaud

@invoxiaamo
Copy link
Contributor Author

I miss the issue #327 .
Closing this one since look to be a duplicate o

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant