Post topics, source code that relate to the Arduino Platform

User avatar
By diffstorm
#55610 Hi All,

I'm using es8266 arduino with spiffs (FS.h) (1M Flash with 256K SPIFFS) and I noticed that every file allocates 502 bytes memory even if the file is 8 bytes long.
I have 8 bytes long files but every single file covers 502 bytes.

How to reduce that offset or configure for the best?

2 files -> "usedBytes":"1004"
4 files -> "usedBytes":"2008"
6 files -> "usedBytes":"3012"
8 files -> "usedBytes":"4016"
10 files->"usedBytes":"5020"



The "usedBytes" comes from;
Code: Select allFSInfo fs_info;
SPIFFS.info(fs_info);



The other parameters of FSInfo with 10 files in FS is like below:
Code: Select all{"totalBytes":"233681","usedBytes":"5020","blockSize":"4096","pageSize":"256","maxOpenFiles":"5","maxPathLength":"32","FreeSketchSpace":"458752"}
User avatar
By mrburnette
#57060 All common file systems have a default minimum: Linux, DOS, Windows, etc. work the same way... Windows typically use a 4K size as the NTFS minimum.

There is a concept of "sparse" storage but it too has large overhead when compared to the microcontroller world.

Ray