If you have on some few GB, is it better to let AI shuffle data after each write and let it move and re-write data randomly or after each cca 1 month write whole card again, so written places "move around" more?
Pls advice! Thx!
That's where the wear-leveling on the SD card comes into things. The card's controller keeps track of how many times a particular page has been written to. Every now and then it swaps data from a block that has been used a lot to a block that hasn't been used much. So even if you have a file that never gets written to, it could move around the card. But because the blocks on the card get remapped internally it doesn't appear to have moved for the OS.
SD cards do not know anything about your partitions or your file systems or your files...if I only need a fraction of the space on a given card, is it better to leave some space unpartitioned, or should my partitions take up 100% of what's available? Maybe it makes no difference?
well it depends on the controller on the card
pica200 wrote: ↑Tue Sep 10, 2019 10:21 amYou don't want to do more writes than necessary! Just leave the controller alone doing wear leveling for you. There is a rule of thumb to leave at least 10% of the capacity free to avoid slowdowns and early failure. If you need more space it's time for an upgrade.
pica200 wrote: ↑Tue Sep 10, 2019 10:21 amAnother thing you can do is add the "discard" mount option for the root partition. discard makes the filesystem driver in the kernel send block erase commands to the SD whenever you "delete" files. This is also known as TRIM for SSDs (the idea is the same but different names). This will give the controller infos about what space is used or not and it can increase speed aswell because it can pre-erase unused flash pages skipping a step when data is next written to it.
Code: Select all
PARTUUID=892be571-02 / ext4 defaults,noatime,discard 0 1