Skip to content

database stored in Littlefs in esp32 s3 taking too much time in insert and update #72

Description

@ankitmittal1402

I am using an ESP32-S3 device and have created a .db file in the LittleFS partition for logging records. Initially, logging records is fast, but after around 1,000 records, it starts taking approximately 5 seconds to write a record. By the time it reaches 40,000 records, each write operation takes around 2 minutes.

My Configuration are:-
Screenshot 2024-10-16 111737

And i am using custom partition and my partition is as follows:

Name Type SubType Offset Size
nvs, data, nvs, 0x9000, 0x5000,
otadata, data, ota, 0xe000, 0x2000,
app0, app, ota_0, 0x10000, 0x300000,
app1, app, ota_1, 0x310000, 0x300000,
spiffs, data, spiffs, 0x610000, 0x9E0000,
coredump, data, coredump,0xFF0000, 0x10000,

And my littleFS details is:
#define CONFIG_LITTLEFS_MAX_PARTITIONS 1
#define CONFIG_LITTLEFS_PAGE_SIZE 4096
#define CONFIG_LITTLEFS_OBJ_NAME_LEN 64
#define CONFIG_LITTLEFS_READ_SIZE 128
#define CONFIG_LITTLEFS_WRITE_SIZE 128
#define CONFIG_LITTLEFS_LOOKAHEAD_SIZE 256
#define CONFIG_LITTLEFS_CACHE_SIZE 512
#define CONFIG_LITTLEFS_BLOCK_CYCLES 512
#define CONFIG_LITTLEFS_USE_MTIME 1
#define CONFIG_LITTLEFS_MTIME_USE_SECONDS 1
#define CONFIG_LITTLEFS_MALLOC_STRATEGY_DEFAULT 1
#define CONFIG_LITTLEFS_ASSERTS 1

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions