ext4是一个强大的文件系统,但是默认挂载时,其日志功能在文件操作大量出现时,严重影响性能。
通过添加以下参数,可以稍微缓解性能。
noatime,nodiratime,barrier=0,commit=60
添加完之后如下:
# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point> <type> <options> <dump> <pass>
# / was on /dev/sda2 during installation
UUID=ad757852 / ext4 errors=remount-ro,noatime,nodiratime,barrier=0,commit=60 0 1
# /boot/efi was on /dev/sda1 during installation
UUID=F8ED /boot/efi vfat umask=0077 0 1
#/swapfile none swap sw 0 0
调整前后,小微文件大约有一倍的提升效果。
网友评论