Significantly more time when accessing encrypted littlefs

zliudr
Posts: 366
Joined: Thu Oct 03, 2019 5:15 am

Significantly more time when accessing encrypted littlefs

Postby zliudr » Fri May 01, 2026 5:26 am

I encrypted the littlefs partition that contains config and other files I read in during bootup. This has significantly increased the startup time from about 10 seconds to over a minute. Is this to be expected?

Maybe the way I created the file system was to be blamed? I am using MicroPython. It creates a littlefs file system upon first boot. I then copy files into the file system via Thonny. I wonder if this caused the files to be fragmented due to the nature of littlefs. Maybe there's a tool to generate non-fragmented littlefs partition? Thanks.

zliudr
Posts: 366
Joined: Thu Oct 03, 2019 5:15 am

Re: Significantly more time when accessing encrypted littlefs

Postby zliudr » Wed May 06, 2026 3:29 pm

I'm a bit disappointed at the lack of response to my recent posts. I used to be able to get some responses on various topics.
Anyway, I tested encrypted fatfs. It is much faster, faster than unencrypted littlefs, albeit having no protection against corruption. Just in case someone else had a similar question, I created the littlefs binary using mklittlefs from github by giving it the file directory that contains the files. I imagine that will not cause significant fragmentation. I also tried drag-drop files using Thonny. No clear difference between speeds.

ESP_rrtandler
Posts: 52
Joined: Wed May 31, 2023 6:54 pm

Re: Significantly more time when accessing encrypted littlefs

Postby ESP_rrtandler » Tue May 12, 2026 9:15 am

Hi @zliudr ,

When using the littlefs, the performance can be influenced by the available free space. You can try to change the size of the littlefs partition (incerease it) to figure out whether it helps the unencrypted performance.

You can also use the benchmark https://github.com/espressif/esp-idf/tr ... _benchmark
to evaluate the effect of other littlefs configurable options mentioned in the https://github.com/espressif/esp-idf/tr ... t-littlefs

Who is online

Users browsing this forum: Baidu [Spider], ChatGPT-User, PetalBot, Qwantbot and 9 guests