Help Understanding Total Size of Blobs wrote to NVS ?
Posted: Sun May 07, 2023 3:39 pm
Hello,
I have started the process of working with NVS and have a question related to BLOBS.
I have a Array of 140bytes that I write into NVS as a blob.
When I use nvs_get_stats() I expected to see 6 entries equalling around 192 bytes but instead I see 7 entries taking 224 bytes.
My Understanding after reading the NVS Structure Entry information https://docs.espressif.com/projects/esp ... flash.html is that I should have 1 entry that contains 32 bytes that has that info about the Variable Blob. Then I should have my 140 byte array wrote to 5 entries at 32byte each (160bytes of NVS).
Can someone help me understand why I am instead seeing 7 entries taking up 224bytes of NVS? Looking at the NVS documentation I concluded that Either the Page Header is being reported as a entry when i do the nvs_get_stats() or to write a blob it requires TWO key-value pairs.
Because in those two scenarios I get 64 bytes of data used for over head and that leaves me with the 160bytes I expected that my array would be put into.. IE 5 entries at 32bytes of NVS.
Appreciate any help thanks.
I have started the process of working with NVS and have a question related to BLOBS.
I have a Array of 140bytes that I write into NVS as a blob.
When I use nvs_get_stats() I expected to see 6 entries equalling around 192 bytes but instead I see 7 entries taking 224 bytes.
My Understanding after reading the NVS Structure Entry information https://docs.espressif.com/projects/esp ... flash.html is that I should have 1 entry that contains 32 bytes that has that info about the Variable Blob. Then I should have my 140 byte array wrote to 5 entries at 32byte each (160bytes of NVS).
Can someone help me understand why I am instead seeing 7 entries taking up 224bytes of NVS? Looking at the NVS documentation I concluded that Either the Page Header is being reported as a entry when i do the nvs_get_stats() or to write a blob it requires TWO key-value pairs.
Because in those two scenarios I get 64 bytes of data used for over head and that leaves me with the 160bytes I expected that my array would be put into.. IE 5 entries at 32bytes of NVS.
Appreciate any help thanks.