Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED] mdadm raid0 + BTRFS or just BTRFS
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
tnt
Veteran
Veteran


Joined: 27 Feb 2004
Posts: 1222

PostPosted: Fri Jan 26, 2024 4:31 pm    Post subject: [SOLVED] mdadm raid0 + BTRFS or just BTRFS Reply with quote

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
View user's profile Send private message
Zucca
Moderator
Moderator


Joined: 14 Jun 2007
Posts: 3345
Location: Rasi, Finland

PostPosted: Fri Jan 26, 2024 7:41 pm    Post subject: Reply with quote

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
View user's profile Send private message
tnt
Veteran
Veteran


Joined: 27 Feb 2004
Posts: 1222

PostPosted: Fri Jan 26, 2024 7:49 pm    Post subject: Reply with quote

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
View user's profile Send private message
Zucca
Moderator
Moderator


Joined: 14 Jun 2007
Posts: 3345
Location: Rasi, Finland

PostPosted: Fri Jan 26, 2024 7:56 pm    Post subject: Reply with quote

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
View user's profile Send private message
tnt
Veteran
Veteran


Joined: 27 Feb 2004
Posts: 1222

PostPosted: Fri Jan 26, 2024 7:57 pm    Post subject: Reply with quote

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
View user's profile Send private message
Zucca
Moderator
Moderator


Joined: 14 Jun 2007
Posts: 3345
Location: Rasi, Finland

PostPosted: Fri Jan 26, 2024 8:15 pm    Post subject: Reply with quote

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
View user's profile Send private message
grknight
Retired Dev
Retired Dev


Joined: 20 Feb 2015
Posts: 1663

PostPosted: Fri Jan 26, 2024 8:18 pm    Post subject: Reply with quote

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
View user's profile Send private message
pingtoo
l33t
l33t


Joined: 10 Sep 2021
Posts: 926
Location: Richmond Hill, Canada

PostPosted: Fri Jan 26, 2024 8:34 pm    Post subject: Reply with quote

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
View user's profile Send private message
sMueggli
Guru
Guru


Joined: 03 Sep 2022
Posts: 370

PostPosted: Sat Jan 27, 2024 9:31 am    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum