3

I tried to perform SQL Server database restore with xfs filesystem and barrier=0 in Azure cloud environment. It performs restore of some 15GB data in around 8 minutes.

I heard this option is getting deprecated in near future. Without this option restore time increases to 25 minutes.

Do we know any alternatives to this options which can be used to realize same performance metrics during restore with XFS filesystem ?

/etc/fstab

UUID=12907c8a-6b2f-4981-b94c-f3cd772270a7 / xfs defaults,nobarrier 0 0

2 Answers2

3

Since kernel 4.13, the nobarrier was removed for XFS. This article suggests two workarounds:

  • switch from XFS to ext4
  • echo "write through" > /sys/block/$device/queue/write_cache

I tried myself the write_cache option (e.g. echo "write through" | sudo tee /sys/block/nvme0n1/queue/write_cache) option and performance on my nvme went 20x up! For me, results were twice faster than ext4 with nobarrier.

http://smalldatum.blogspot.com/2018/01/xfs-nobarrier-and-413-linux-kernel.html

synkro
  • 213
  • 1
  • 2
  • 8
0

I did not find anything specific to this being deprecated. Please see: Optimize your Linux VM on Azure You will use the nobarrier option:

If you use XFS, disable barriers using the mount option nobarrier (For enabling barriers, use the option barrier)

Please let us know if you have additional questions.

Mike Ubezzi
  • 101
  • 1
  • I tried to apply the optimizations in this very article and ended up here because it seems indeed the `nobarrier` options isn't supported (anymore) on Ubuntu 18.04, kernel 5.0.0-1032-azure. – Robert Massa Mar 06 '20 at 09:09
  • Same. `[ 513.802644] XFS (dm-0): unknown mount option [nobarrier].` – harperville Sep 18 '20 at 20:02