|
|
|
|
|
by bombela
806 days ago
|
|
But spinning hard drive and SSDs are not working at the byte level, but at a power of two block. 512B to 4kiB usually. You purchase a number of those blocks, and the total amount of byte is a power of two. The filesystem then stores everything in it's own blocks, composed of one or more disk/SSD blocks. Files on disk therefore consume a number of blocks, making their storage usage a power of two (the real size can by anything of course). And you might as well align blocks to memory pages when buffering/reading/writing the filesystem. Since you must align memory access for performances with CPU cache, RAM is loaded/stored itself in blocks of 256 or 512 bits those days (yes reading one byte from RAM will rapatriate that much) etc. That's a lot of power or two (you could argue power of 12 [4kiB]) designed everywhere. |
|