Skip to contentSkip to conversation

Is there a performance advantage in using Btrfs subvolumes over raw (MBR/GPT) partitions on rotational disks?

DISCUSSION Alexander Tomokhov 2 participants 2 messages Aug 28, 2016 Btrfs file system

lore
Share & tools
lore
#0 lore raw

Let's say I use a 128GiB MBR partition for OS and remaining 800GiB+ on disk serves another purpose. Then all OS files will be physically close to each other on the disk, thus reducing seek times. If I use the whole disk for OS partition, then files will be spread across the disk and even OS-only operations will require hard drive heads to perform longer seeks.

What effect have Btrfs subvolumes in this case if I use them instead of MBR partitions?
Btrfs wiki says: "btrfs does write optimisation (sequential writes) across a filesystem", "subvolume write performance will benefit from this algorithm". I don't understand what it means and couldn't find explanation. Does Btrfs optimize file data placement on rotational disk inside single subvolume, so that storing similar (accessed together) data inside single subvolume will benefit in terms of performance?

#1 lore raw
Quoted 4 lines · Alexander Tomokhov

Let's say I use a 128GiB MBR partition for OS and remaining 800GiB+ on disk serves another purpose. Then all OS files will be physically close to each other on the disk, thus reducing seek times. If I use the whole disk for OS partition, then files will be spread across the disk and even OS-only operations will require hard drive heads to perform longer seeks.

What effect have Btrfs subvolumes in this case if I use them instead of MBR partitions?

Writes to subvolumes doesn't directly affect where on disk the data is written, those data extents will be put into a block group by the allocator regardless of what subvolume the data originated from.

Quoted 1 line

Btrfs wiki says: "btrfs does write optimisation (sequential writes) across a filesystem", "subvolume write performance will benefit from this algorithm".

I'm pretty sure this means it's aggregating random writes such that they end up being more like sequential writes, and is related to delayed allocation. It may also be referring to the use of subvolumes instead of directories for multiple write streams has better concurrency handling and less contention.

Signature · 1 line
Chris Murphy