Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

It has to do with the way flash does writes. In flash it actually takes longer to overwrite a bit of data, than to write that bit on a 'blank', or previously initialized cell.

Furthermore if you are going to overwrite something in flash it usually behooves you to overwrite an entire block at a time. For these reasons flash systems tend to try to often write changes in a log manner, wait for a lot of changes to pile up and then incorporate those changes back into the original by rewriting entire blocks. The log can be placed in an initialized section of the memory where overwrites are not necessary.



> Furthermore if you are going to overwrite something in flash it usually behooves you to overwrite an entire block at a time.

Well, all block devices are written a block at a time. The way flash differs is that there are two internal block sizes -- called pages (4-8kB), and eraseblocks (256kB-4MB).

There are two states a page can be in: clear, or used. You can write at a page granularity, but only to clear pages. To clear used pages, you need to clear the entire eraseblock at a time. Eraseblock sizes are now limited by fundamental physical limits -- on every NAND node shrink from now, the eraseblocks are going to double in size. And they are already really huge in modern devices.




Consider applying for YC's Fall 2026 batch! Applications are open till July 27.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: