大网数据广告活动
服务器运维问答

XFS with No Barrier Mount option deprecated

· 52CE 我爱测

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. Wit…

问题原文

原帖链接 · 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

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Server Fault
适用范围
以原帖系统、软件版本与发布日期为准(2019-08-25)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 4.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。