What are barriers and do I really need them to be enabled?

stefeman

Member
Sep 16, 2016
8
0
21
31
I heard they make huge difference in speed depending on if they are enabled or not.

I'm looking into following choices:

2x2TB RAID1 Barriers enabled = (Slow as hell system for multiple VM's/CT's)?
2x2TB RAID1 Barries Disabled = (Faster)??
2x2TB RAID0 Barries Disabled = (Ultra Fast)?

Data redundancy is not a must as the drives will be brand new, and I have nothing critical installed + I have regular backups.

What I'm comparing is mainly RAID1 with no barriers VS RAID0 with no barriers. Is the difference much between them? To know this I'd wish to know how exactly barriers work? Could anyone care to explain it's functionality with simple terms?

As for the cache, I intend to use writeback mode.

Thank you in advance.
 
RAID0 is not raid at all. Loose one disk and all your data is lost on both disks. If you are using ext4 go for barrier disabled. With recent ext4 and default mount option 'data=ordered' there is no difference between barrier enabled or not except for the performance penalty. This is my personal opinion from almost 10 years use of ext4, Others my have other opinions. YMMW.
 
If you are using ext4 go for barrier disabled. With recent ext4 and default mount option 'data=ordered' there is no difference between barrier enabled or not except for the performance penalty. This is my personal opinion from almost 10 years use of ext4, Others my have other opinions. YMMW.

this is only true if your disks are battery backed
see the relevant part of the kernel documentation
(https://www.kernel.org/doc/Documentation/filesystems/ext4.txt)
Write barriers enforce proper on-disk ordering
of journal commits, making volatile disk write caches
safe to use, at some performance penalty. If
your disks are battery-backed in one way or another,
disabling barriers may safely improve performance.
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!