Gentoo Archives: gentoo-user

From: Dr Rainer Woitok <rainer.woitok@×××××.com>
To: gentoo-user@l.g.o, Michael <confabulate@××××××××.com>
Subject: Re: [gentoo-user] Is there a way to misconfigure USB ports in the kernel?
Date: Tue, 30 Mar 2021 17:12:11
Message-Id: 24675.23516.469155.831394@tux.local
1 On Saturday, 2020-12-05 19:07:51 +0100, I myself wrote:
2
3 ("> >" refers to Michael <confabulate@××××××××.com>)
4
5 > Michael,
6 >
7 > On Friday, 2020-11-27 19:07:17 +0000, you wrote:
8 >
9 > > ...
10 > > A 4k block size is recommended for ntfs-3g which is the default sector created
11 > > by fdisk and friends on Linux these days. This will align your partition
12 > > optimally. In addition, mkfs.ntfs will use 4096 bytes as the default cluster
13 > > size, so you should be good in that respect.
14 > >
15 > > Another setting you may want to try is mounting the USB with 'big_writes' -
16 > > check the man page. This should help particularly with large files, which
17 > > will use larger blocks up to 128KB when copying data to the NTFS.
18 >
19 > Both, the VeraCrypt command line (--fs-options=big_writes) and the Vera-
20 > Crypt GUI (under "Settings --> Preferences") allow setting this mount
21 > option. But
22 >
23 > $ mount | grep veracrypt
24 >
25 > never shows it, initially causing me to erroneously believe it wasn't
26 > set and to try finding on the web another way of setting it. By pure
27 > chance I finally found out that
28 >
29 > $ ps -ef | grep veracrypt
30 >
31 > lists a "/usr/sbin/mount.ntfs" task which shows the options really in
32 > effect. However, I haven't yet had the time to test the effect of this
33 > option when writing plenty of really big files. I will report on that
34 > later.
35
36 Well, it's been quite a while, due to my being almost permanently con-
37 fronted with more pressing tasks ... :-(
38
39 To sum up my experience with my new 128 GB Philips USB 3.0 sticks: while
40 the Philips sticks are significantly faster for reading operations than
41 my old 64 GB Verbatim ones (probably USB 2.0), writing operations to the
42 Philips sticks are unbearably slow, regardless of whether I created a
43 normal unencrypted NTFS filesystem on them or an encrypted NTFS filesys-
44 tem using VeraCrypt. Writing to the USB stick while at the same time
45 reading from it in a different terminal window caused commands like "cd"
46 or "ls" to simply stall. Thus while running
47
48 $ cp --preserve=timestamps -ru $source_dir .
49
50 in one terminal window, I ran
51
52 $ while true
53 > do n=$(ps -ef|g 'cp --preserve'|g -v grep)
54 > if [[ "$n" = "${o-}" ]]
55 > then sleep 10
56 > else o="$n"
57 > echo "$n"
58 > fi
59 > done
60
61 in another, to get the wall clock times when copying a new file began.
62 That way I found that copying a 30 MB file took about 40 minutes.
63
64 So what are my options?
65
66 - Stay away from Philips USB 3.0 sticks?
67
68 - Stay away from Philips USB sticks in general?
69
70 - Stay away from USB 3.0 sticks in general?
71
72 - Stay away from Filesystem in User Space using a non-stable 5.10 or
73 5.11 kernel (currently I'm using stable 5.4.97)?
74
75 - Stay away from Gentoo?
76
77 - Stay away from Linux in general and go back to OTOS (aka the Only
78 True Operating System aka Windoze)?
79
80 - ...?
81
82 Any ideas and comments welcome ...
83
84 Sincerely,
85 Rainer

Replies