On Mon, Apr 23, 2012 at 06:51:28PM +0300, Touko Korpela wrote: > USB sticks and other flash media are optimised for FAT (using big blocks). > Most of my information comes from LWN article "Optimizing Linux with cheap > flash drives" https://lwn.net/Articles/428584/ > I don't know if linear reads during boot are affected but other usage is > much slower when reads/writes aren't aligned. > Fdisk has already fixed its default partition layout.
Read that article more closely. Flash page sizes are well beyond 4k; with modern flash they are 32k and 64k. Hence, any read *smaller* than the page size (32k or 64k) will take the same amount of time as a page read. It's not going matter whether it is 512-byte aligned or 4k aligned. And if you do a nice big contiguous read (i.e., reading in a 4MB kernel image), it might make a small amount of difference, but only at the beginning and the end of the file, which might result in a performance hit of just under 0.2% --- i.e., reading in a 4MB kernel, which might take 1.100 millseconds, might end up taking 1.102 millseconds instead. Good luck measuring that. For writes, to get optimal speeds, you need to be doing 4MB aligned writes. Will there be a difference between 512 byte and 4k random writes? It depends on the SSD. For good SSD's it won't matter at all. For bad ones, there may be some difference, but the big breakpoint happens with 4MB writes (or whatever the erase block size happens to be --- for newer devices, they might be 8MB at this point). And again, for /boot, it's really not going to matter. Heck, on my systems /boot is generally well larger than 512MB anyway (but that's because I'm a kernel developer :-). - Ted -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org