block size question
Hallo,
What would be the optimal block size in case if physical block sizes different for cache and backing devices? Can I use different block sizes for cache and backing devices, like:
make-bcache --block 4k -B /dev/sdc
make-bcache --block 512 -C /dev/sda
I have a feeling that the block size should be the same and the biggest block size should be used, but I'd appreciate any thoughts about that.
Thanks in advance,
Vlad.
The blocksize should be equal or bigger then the blocking device.
Otherwise you risk writing multiple blocks 512 for 1 1k sector, resulting in read-modify-write transaction on 4k disks.
But for some reason I didn't do this on my desktop. (I might need to reformat if i'm right about this :( )
Killian De Volder
Quoted 18 lines · Vlad
Hallo,
What would be the optimal block size in case if physical block sizes different for cache and backing devices? Can I use different block sizes for cache and backing devices, like:
make-bcache --block 4k -B/dev/sdc
make-bcache --block 512 -C/dev/sdaI have a feeling that the block size should be the same and the biggest block size should be used, but I'd appreciate any thoughts about that.
Thanks in advance,
Vlad.
--
To unsubscribe from this list: send the line "unsubscribe linux-bcache" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
PS you wish to use the real sector size of the SSD if applicaple according to make-bache -?
-w, --block block size (hard sector size of SSD, often 2k
This also implies you should set the block-size of a backing device to 4K.
Killian De Volder
Quoted 18 lines · Vlad
Hallo,
What would be the optimal block size in case if physical block sizes different for cache and backing devices? Can I use different block sizes for cache and backing devices, like:
make-bcache --block 4k -B/dev/sdc
make-bcache --block 512 -C/dev/sdaI have a feeling that the block size should be the same and the biggest block size should be used, but I'd appreciate any thoughts about that.
Thanks in advance,
Vlad.
--
To unsubscribe from this list: send the line "unsubscribe linux-bcache" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Done some testing for you:
The -B --block size has to be a a power2 of -C --block size.
(Note: all information is about bcache1 not bcachefs if that is what you are talking about)
Killian De Volder
Quoted 18 lines · Vlad
Hallo,
What would be the optimal block size in case if physical block sizes different for cache and backing devices? Can I use different block sizes for cache and backing devices, like:
make-bcache --block 4k -B/dev/sdc
make-bcache --block 512 -C/dev/sdaI have a feeling that the block size should be the same and the biggest block size should be used, but I'd appreciate any thoughts about that.
Thanks in advance,
Vlad.
--
To unsubscribe from this list: send the line "unsubscribe linux-bcache" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Killian,
Thanks for your help! I think it's the best to reformat both bcache devices with block size of 4k in my case where cached device has block size of 512 and backing device 4k.
Regards,
Vlad.
Quoted 31 lines · Killian De Volder
Done some testing for you:
The -B --block size has to be a a power2 of -C --block size.(Note: all information is about bcache1 not bcachefs if that is what you are talking about)
Killian De Volder
Quoted 11 lines · Vlad
Hallo,
What would be the optimal block size in case if physical block sizes different for cache and backing devices? Can I use different block sizes for cache and backing devices, like:
make-bcache --block 4k -B/dev/sdc
make-bcache --block 512 -C/dev/sdaI have a feeling that the block size should be the same and the biggest block size should be used, but I'd appreciate any thoughts about that.
Quoted 7 lines
Thanks in advance,
Vlad.
--
To unsubscribe from this list: send the line "unsubscribe linux-bcache" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html--
To unsubscribe from this list: send the line "unsubscribe linux-bcache" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html