Increase performance on USB install

Forum Forums New users New Users and General Questions Increase performance on USB install

  • This topic has 4 replies, 4 voices, and was last updated Mar 10-7:51 am by bertil.
Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #19265
    Member
    bertil

      Just wanted to share what I did.

      I installed antiX on a USB thumb-drive and ran into performance issues.

      I decided to try and trade data integrity for performance reducing writes. This might also increase the thumb-drive life. I am aware that this is very aggressive tuning and that I traded a lot of integrity away.

      So, I disabled journaling:

      >tune2fs -o journal_data_writeback /dev/sdXY
      >tune4fs -O ^has_journal /dev/sdXY

      and modified my /etc/fstab thus:
      UUID=991deee3-6eda-4d49-8c4b-badfc512ae9d / ext4 defaults,noatime,barrier=0,data=writeback,commit=600 1 1

      So far it is working well …….

      #19268
      Member
      number698
        Helpful
        Up
        0
        ::

        Hmmm, wondering how this would compare to simply using a usb formatted to ext2 ?

        #19275
        Anonymous
          Helpful
          Up
          0
          ::

          lookup the explanation of relatime (the default). It shouldn’t incur a performance penalty, compared to noatime.

          During a dynamic root persistence session, writes occur only during a persist-save operation.
          With attention to data integrity, I wouldn’t dare forego journaling… and we should expect that the
          “performance gain” from doing so (in the context of dynamic root persistence) will be nil.

          #19291
          Member
          fatmac
            Helpful
            Up
            0
            ::

            I’ve used ext2/ext3/ext4 on USB2 pendrives with no noticeable differences in speed, so I stick with ext4 these days. The best speed gain is by loading to ram. 🙂

            Linux (& BSD) since 1999

            #19298
            Member
            bertil
              Helpful
              Up
              0
              ::

              Well, ext2 vs ext4 without journal seems like a heated and long debate a few years ago. I think inconclusive also.
              Ext4 do have some improvements unrelated to journaling that should decrease writes. Then on the other hand, that is overhead with an impact.

              I not only disabled journaling, I also added noatime. That affects ext2 as well. As noted above, there is relatime as an alternative. And I think some layzytime as well in newer kernels.

              I do not really know what I am doing. Just trying out that others did. I am not sure how writeback plays into this. First I disable journaling. Then tells the kernel to mount the drive with writeback journaling(?).

              I have installed antiX on the USB, so no persistence.

              Here is my dump2fs if anyone is interested.

              $ sudo dumpe2fs /dev/sdb1 |more
              dumpe2fs 1.43.4 (31-Jan-2017)
              Filesystem volume name: rootantiX
              Last mounted on: /

              Filesystem features: ext_attr resize_inode dir_index filetype extent 64bit flex_bg sparse_super large_file huge_file dir_nlink extra_isize metadata_csum
              Filesystem flags: signed_directory_hash
              Default mount options: journal_data_writeback user_xattr acl

            Viewing 5 posts - 1 through 5 (of 5 total)
            • You must be logged in to reply to this topic.