问题原文
原帖链接 · Manpreet Singh Nanda · CC BY-SA 4.0
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
社区高分解答
原帖链接 · synkro · CC BY-SA 4.0
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
摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。
