美文网首页
提升磁盘小微文件的读写性能

提升磁盘小微文件的读写性能

作者: onmeiei | 来源:发表于2022-03-28 15:13 被阅读0次

    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
    

    调整前后,小微文件大约有一倍的提升效果。

    相关文章

      网友评论

          本文标题:提升磁盘小微文件的读写性能

          本文链接:https://www.haomeiwen.com/subject/vfupjrtx.html