On Tue, May 06, 2014 at 12:41:38PM +0200, Hendrik Siedelmann wrote: > Hello all! > > I would like to use btrfs (or anyting else actually) to maximize raid0 > performance. Basically I have a relatively constant stream of data that > simply has to be written out to disk. So my question is, how is the block > allocator deciding on which device to write, can this decision be dynamic > and could it incorporate timing/troughput decisions? I'm willing to write > code, I just have no clue as to how this works right now. I read somewhere > that the decision is based on free space, is this still true? For (current) RAID-0 allocation, the block group allocator will use as many chunks as there are devices with free space (down to a minimum of 2). Data is then striped across those chunks in 64 KiB stripes. Thus, the first block group will be N GiB of usable space, striped across N devices. There's a second level of allocation (which I haven't looked at at all), which is how the FS decides where to put data within the allocated block groups. I think it will almost certainly be beneficial in your case to use prealloc extents, which will turn your continuous write into large contiguous sections of striping. I would recommend thoroughly benchmarking your application with the FS first though, just to see how it's going to behave for you. Hugo. -- === Hugo Mills: hugo@... carfax.org.uk | darksatanic.net | lug.org.uk === PGP key: 65E74AC0 from wwwkeys.eu.pgp.net or http://www.carfax.org.uk --- Ceci n'est pas une pipe: | ---
Attachment:
signature.asc
Description: Digital signature
