* block size question
@ 2016-05-18 5:50 Vlad
2016-05-18 7:11 ` Killian De Volder
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Vlad @ 2016-05-18 5:50 UTC (permalink / raw)
To: linux-bcache
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.
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: block size question
2016-05-18 5:50 block size question Vlad
@ 2016-05-18 7:11 ` Killian De Volder
2016-05-18 14:14 ` Killian De Volder
2016-05-18 15:46 ` Killian De Volder
2 siblings, 0 replies; 5+ messages in thread
From: Killian De Volder @ 2016-05-18 7:11 UTC (permalink / raw)
To: Vlad, linux-bcache
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
On 18-05-16 07:50, Vlad wrote:
> 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.
> --
> To unsubscribe from this list: send the line "unsubscribe linux-bcache" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: block size question
2016-05-18 5:50 block size question Vlad
2016-05-18 7:11 ` Killian De Volder
@ 2016-05-18 14:14 ` Killian De Volder
2016-05-18 15:46 ` Killian De Volder
2 siblings, 0 replies; 5+ messages in thread
From: Killian De Volder @ 2016-05-18 14:14 UTC (permalink / raw)
To: linux-bcache
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
On 18-05-16 07:50, Vlad wrote:
> 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.
> --
> To unsubscribe from this list: send the line "unsubscribe linux-bcache" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: block size question
2016-05-18 5:50 block size question Vlad
2016-05-18 7:11 ` Killian De Volder
2016-05-18 14:14 ` Killian De Volder
@ 2016-05-18 15:46 ` Killian De Volder
2016-05-18 16:24 ` Vlad
2 siblings, 1 reply; 5+ messages in thread
From: Killian De Volder @ 2016-05-18 15:46 UTC (permalink / raw)
To: linux-bcache
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
On 18-05-16 07:50, Vlad wrote:
> 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.
> --
> To unsubscribe from this list: send the line "unsubscribe linux-bcache" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: block size question
2016-05-18 15:46 ` Killian De Volder
@ 2016-05-18 16:24 ` Vlad
0 siblings, 0 replies; 5+ messages in thread
From: Vlad @ 2016-05-18 16:24 UTC (permalink / raw)
To: linux-bcache
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.
On 18/05/16 17:46, Killian De Volder wrote:
> 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
>
>
> On 18-05-16 07:50, Vlad wrote:
>> 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.
>> --
>> To unsubscribe from this list: send the line "unsubscribe linux-bcache" in
>> the body of a message to majordomo@vger.kernel.org
>> 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 majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2016-05-18 16:25 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-05-18 5:50 block size question Vlad
2016-05-18 7:11 ` Killian De Volder
2016-05-18 14:14 ` Killian De Volder
2016-05-18 15:46 ` Killian De Volder
2016-05-18 16:24 ` Vlad
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).