Hello btrfs people, I am using btrfs to span across two SSDs at the moment. One is a 256GB and the other is a 128GB. So as of now, I have the data in "single" form and the metadata in a RAID1. I have heard that btrfs can adjust to some degree for devices in a RAID array that vary in sizes due to the way it handles things. But I feel as though the size difference between those two would be too vast to compensate for whatsoever. But I have an additional SSD in my machine, which is also a 128GB drive. I know that with RAID1, it will only duplicate the data no matter how many devices are present in the array. So if that is the case, if I were to add all three of my SSDs into the filesystem, and then put the data into a RAID1, would it be able to make use of all the space? The two smaller ones are about equal to the size of the larger, so in my mind it would seem that it would be entirely possible for it to keep two copies of each extent while still utilizing all the space. But I don''t know if btrfs is set up to recognize this situation or how it would handle it. I know that I could potentially put the two smaller drives in some kind of an LVM or mdadm, but I would like to avoid this if possible. It just seems like an unnecessary layer of complexity. Though my question is about RAID1 specifically, as I would like to use the potential of the self healing features, I guess it would also extend to RAID0 as well. Would that be able to make efficient use of the space? Additionally, though not quite as much of a concern to me, the machine in which these drives live is an Ivy Bridge Laptop, so there are actually only two available SATA3 ports. The odd drive out at this point in time is actually an mSATA which is the only SATA2 port. If I were to add this to an array (assuming the above questions have favorable answers), how dramatically would the speed of the array be affected? To be honest, the speed of even just the mSATA drive alone is enough to keep me happy. But I have just been very curious about this. The write speeds of all three are relatively close. But the read speeds on the SATA3 are significantly faster than the mSATA. Anyway, thanks for the fantastic filesystem. Sorry for the long email, but these questions have been in the back of my mind for some time now. For the first question(s) at least I have not been able to find anything regarding that scenario. Regards, -- Curtis Shimamoto sugar.and.scruffy [at] gmail.com -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On Tue, Jul 23, 2013 at 07:32:36AM -0700, Curtis Shimamoto wrote:> I am using btrfs to span across two SSDs at the moment. One is a 256GB > and the other is a 128GB. So as of now, I have the data in "single" form > and the metadata in a RAID1. I have heard that btrfs can adjust to some > degree for devices in a RAID array that vary in sizes due to the way it > handles things. But I feel as though the size difference between those > two would be too vast to compensate for whatsoever. > > But I have an additional SSD in my machine, which is also a 128GB drive. > I know that with RAID1, it will only duplicate the data no matter how > many devices are present in the array. So if that is the case, if I were > to add all three of my SSDs into the filesystem, and then put the data > into a RAID1, would it be able to make use of all the space?Yes. If the largest device is A, and the two smaller ones are B and C, the system will allocate chunks in pairs, alternating A+B and A+C.> The two > smaller ones are about equal to the size of the larger, so in my mind it > would seem that it would be entirely possible for it to keep two copies > of each extent while still utilizing all the space. But I don''t know if > btrfs is set up to recognize this situation or how it would handle it. > > I know that I could potentially put the two smaller drives in some kind > of an LVM or mdadm, but I would like to avoid this if possible. It just > seems like an unnecessary layer of complexity. > > Though my question is about RAID1 specifically, as I would like to use > the potential of the self healing features, I guess it would also extend > to RAID0 as well. Would that be able to make efficient use of the space?No, because you only have one large device and two small ones, so the "top" part of the largest device would be unusable with RAID-0. (Or at least, not until we get stripe-width limitations, which should be coming up Real Soon Now, as I believe it''s part of Chris''s work to finish off the parity RAID implementation).> Additionally, though not quite as much of a concern to me, the machine in > which these drives live is an Ivy Bridge Laptop, so there are actually > only two available SATA3 ports. The odd drive out at this point in time > is actually an mSATA which is the only SATA2 port. If I were to add this > to an array (assuming the above questions have favorable answers), how > dramatically would the speed of the array be affected? To be honest, the > speed of even just the mSATA drive alone is enough to keep me happy. But > I have just been very curious about this. The write speeds of all three > are relatively close. But the read speeds on the SATA3 are significantly > faster than the mSATA.This one I don''t have an answer for, sorry. Hugo.> Anyway, thanks for the fantastic filesystem. Sorry for the long email, > but these questions have been in the back of my mind for some time now. > For the first question(s) at least I have not been able to find anything > regarding that scenario. > > Regards,-- === 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 --- I am but mad north-north-west: when the wind is southerly, I --- know a hawk from a handsaw.
On Tue, Jul 23, 2013 at 10:32 AM, Curtis Shimamoto <sugar.and.scruffy@gmail.com> wrote:> [...] > Additionally, though not quite as much of a concern to me, the machine in > which these drives live is an Ivy Bridge Laptop, so there are actually > only two available SATA3 ports. The odd drive out at this point in time > is actually an mSATA which is the only SATA2 port. If I were to add this > to an array (assuming the above questions have favorable answers), how > dramatically would the speed of the array be affected? To be honest, the > speed of even just the mSATA drive alone is enough to keep me happy. But > I have just been very curious about this. The write speeds of all three > are relatively close. But the read speeds on the SATA3 are significantly > faster than the mSATA. > [...]I expect instantaneous I/O to be a jittery experience based on if a particular I/O takes a fast or slow path. I expect the average I/O performance to be the weighted average of the performance of all drives involved. This is my btrfs-noob understanding/observations. Hope it helps: I currently have a two drives RAID1 setup connected via USB3 on a 3.10.1 kernel. I''ve observed the following via the `iostat` command. If I recall correctly my max observed read-only throughput is 160 megs/second and my max observed write throughput is 130 megs/second combined (65 megs/second per drive). Here is an `iostat 10` sample for only writing files to the drives in my btrfs setup: Device: tps kB_read/s kB_wrtn/s kB_read kB_wrtn sdb 310.80 0.00 18092.80 0 180928 sdc 312.90 86.40 18099.20 864 180992 You''ll see I''m pushing about 18 megs a second to each drive (the copy here is from DVD to btrfs). Being RAID1 each drive gets a copy of the data and I expect write performance to be limited by the slowest drive being written to. I expect write performance to be jittery if multiple drives are on different speed buses as some writes would wait on the slow bus to catch up, others would only be on the fast bus. Here I am reading from files (`cat /btrfs/backups/* >/dev/null`) and still writing files like from above: Device: tps kB_read/s kB_wrtn/s kB_read kB_wrtn sdb 1640.60 89085.60 15230.00 890856 152300 sdc 245.50 3.60 15096.80 36 150968 Note that even though this is RAID1 data being read, only one drive is feeding all the read I/O. Write speeds slowed a little as I expect the USB3 bus/controller/whatever to be max out. (89+15+15=~120 megs/second I/O + plus other overhead) If you had more drives and btrfs decided to read from the slowest drive that would likely be your bottleneck for that read. Another drive arrived today, I''ll see what happens when I mix/match USB3 and SATA connected drives. -- Sandy McArthur "He who dares not offend cannot be honest." - Thomas Paine -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html