Tagged: performance usb
This topic contains 4 replies, has 4 voices, and was last updated by bertil Mar 10-7:51 am.
March 9, 2019 at 7:11 am #19265Member
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 …….March 9, 2019 at 11:36 am #19268Member
Hmmm, wondering how this would compare to simply using a usb formatted to ext2 ?March 9, 2019 at 2:46 pm #19275Member
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.March 10, 2019 at 4:03 am #19291Moderator
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 1999March 10, 2019 at 7:51 am #19298Member
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
You must be logged in to reply to this topic.