View previous topic :: View next topic |
Author |
Message |
tnt Veteran
Joined: 27 Feb 2004 Posts: 1222
|
Posted: Fri Jan 26, 2024 4:31 pm Post subject: [SOLVED] mdadm raid0 + BTRFS or just BTRFS |
|
|
Hi.
I have two fast SSD partitions I need to merge for overall performance.
Considering recent improvements made on BTRFS which are quite favorable for flash drives, I could go with
1. mdadm raid0 and then put BTRFS on it
2. use BTRFS on those two partitions in order to make its internal raid0
Which of those two would be the preferred approach ? _________________ gentoo user
Last edited by tnt on Fri Jan 26, 2024 7:54 pm; edited 1 time in total |
|
Back to top |
|
|
Zucca Moderator
Joined: 14 Jun 2007 Posts: 3345 Location: Rasi, Finland
|
Posted: Fri Jan 26, 2024 7:41 pm Post subject: |
|
|
I think mdraid0 is faster at least.
On the other hand with btrfs you can change the raid level on-the-fly if there comes a need for it. Or you can create a new subvolume in place of an existing directory (say /home for example) and make it raid1 (that's on-the-fly operation too, like most of btrfs operations). Note that you can't place a swap file on multi-device btrfs, but placing btrfs on top of mdraid makes it a single-device. ;)
If Quote: | I need to merge for overall performance. | is your ultimate goal, then use mdraid0 and ext4/xfs, unless you need some btrfs specific feature. _________________ ..: Zucca :..
Gentoo IRC channels reside on Libera.Chat.
--
Quote: | I am NaN! I am a man! |
|
|
Back to top |
|
|
tnt Veteran
Joined: 27 Feb 2004 Posts: 1222
|
Posted: Fri Jan 26, 2024 7:49 pm Post subject: |
|
|
Thx a lot!
Great features you have mentioned there, but in this particular case I need pure performance without any special flexibility.
I'll go mdraid0 + ext4 as you have mentioned. Hopefully async discards will be implemented in ext4 at some point, too. _________________ gentoo user |
|
Back to top |
|
|
Zucca Moderator
Joined: 14 Jun 2007 Posts: 3345 Location: Rasi, Finland
|
Posted: Fri Jan 26, 2024 7:56 pm Post subject: |
|
|
Oh and I totally forgot, but consider F2FS as the filesystem too. It's targeted for flash drives. _________________ ..: Zucca :..
Gentoo IRC channels reside on Libera.Chat.
--
Quote: | I am NaN! I am a man! |
|
|
Back to top |
|
|
tnt Veteran
Joined: 27 Feb 2004 Posts: 1222
|
Posted: Fri Jan 26, 2024 7:57 pm Post subject: |
|
|
Zucca wrote: | Oh and I totally forgot, but consider F2FS as the filesystem too. It's targeted for flash drives. |
And does not collide with underlying mdraid0 in any way?
I'll give it a try... _________________ gentoo user |
|
Back to top |
|
|
Zucca Moderator
Joined: 14 Jun 2007 Posts: 3345 Location: Rasi, Finland
|
Posted: Fri Jan 26, 2024 8:15 pm Post subject: |
|
|
tnt wrote: | And does not collide with underlying mdraid0 in any way?
I'll give it a try... | I haven't heard or read any problems with mdraid.
F2FS also supports multiple devices, but I don't know if or how it can implement raid levels. _________________ ..: Zucca :..
Gentoo IRC channels reside on Libera.Chat.
--
Quote: | I am NaN! I am a man! |
|
|
Back to top |
|
|
grknight Retired Dev
Joined: 20 Feb 2015 Posts: 1663
|
Posted: Fri Jan 26, 2024 8:18 pm Post subject: |
|
|
Zucca wrote: | On the other hand with btrfs you can change the raid level on-the-fly if there comes a need for it. |
mdadm can do this too within reason. For example, RAID 0 can become RAID 4, 5, 6, or 10 so long as you have the free volumes for it. |
|
Back to top |
|
|
pingtoo l33t
Joined: 10 Sep 2021 Posts: 926 Location: Richmond Hill, Canada
|
Posted: Fri Jan 26, 2024 8:34 pm Post subject: |
|
|
tnt wrote: | Thx a lot!
Great features you have mentioned there, but in this particular case I need pure performance without any special flexibility. |
What is the application you want to use need performance of RAID0?
RAID0 usually help write intense application, if your application does not do a lots of write (And the write size is not configurable) you may be better off using linear setup. |
|
Back to top |
|
|
sMueggli Guru
Joined: 03 Sep 2022 Posts: 370
|
Posted: Sat Jan 27, 2024 9:31 am Post subject: |
|
|
I found an interesting Red Hat article about choosing the "right" filesystem.
But first you need to know, what exactly you need and what load your system will have. What is limiting you now? Is it the CPU, network bandwidth or disk operations? Is it for a desktop system or a server system that is running all the time? Will you use compression? Snapshots? What is your backup strategy? |
|
Back to top |
|
|
|