Gentoo Archives: gentoo-user

From: Michael <confabulate@××××××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Is there a way to misconfigure USB ports in the kernel?
Date: Fri, 27 Nov 2020 19:07:42
Message-Id: 1704314.3VsfAaAtOV@lenovo.localdomain
In Reply to: Re: [gentoo-user] Is there a way to misconfigure USB ports in the kernel? by Dr Rainer Woitok
1 Hi Rainer,
2
3 On Friday, 27 November 2020 16:01:29 GMT Dr Rainer Woitok wrote:
4
5 > Since the USB sticks contain symbolic links and have to be accessible
6 > from both, Linux and Windows they are NTFS formatted, and according to
7 > "mkntfs(8)" the sector size can be at most 4096, while the cluster size
8 > is limited to 2097152, that is 2G. However, when NTFS formatting an USB
9 > stick from within TrueCrypt/VeraCrypt or directly in Windows the maximum
10 > cluster size is 64K, with the only difference that Windows calls it
11 > "allocation unit size".
12
13 Ohh! STOP RIGHT THERE! :-)
14
15 I mistakenly thought you were using FAT. NTFS on linux uses the ntfs-3g
16 driver, which relies on FUSE. This 'Filesystem in Userspace' is inevitably
17 slower than kernel filesystem drivers, because it has to jump through hoops
18 and libs, acting as a virtual filesystem. CPU usage will also be higher as a
19 result, than when using a native kernel filesystem driver.
20
21 A 4k block size is recommended for ntfs-3g which is the default sector created
22 by fdisk and friends on Linux these days. This will align your partition
23 optimally. In addition, mkfs.ntfs will use 4096 bytes as the default cluster
24 size, so you should be good in that respect.
25
26 Another setting you may want to try is mounting the USB with 'big_writes' -
27 check the man page. This should help particularly with large files, which
28 will use larger blocks up to 128KB when copying data to the NTFS.
29
30 Also, read the FAQs under the heading "Performance" for more useful
31 information:
32
33 https://www.tuxera.com/community/ntfs-3g-faq/
34
35 Hope this helps.

Attachments

File name MIME type
signature.asc application/pgp-signature