From: Dale <rdalek1967@gmail.com>
To: gentoo-user@lists.gentoo.org
Subject: Re: [gentoo-user] Is there a way to misconfigure USB ports in the kernel?
Date: Tue, 30 Mar 2021 13:26:10 -0500 [thread overview]
Message-ID: <1916678a-f927-9a5e-f402-31bf83067cef@gmail.com> (raw)
In-Reply-To: <24675.23516.469155.831394@tux.local>
Dr Rainer Woitok wrote:
>
> Well, it's been quite a while, due to my being almost permanently con-
> fronted with more pressing tasks ... :-(
>
> To sum up my experience with my new 128 GB Philips USB 3.0 sticks: while
> the Philips sticks are significantly faster for reading operations than
> my old 64 GB Verbatim ones (probably USB 2.0), writing operations to the
> Philips sticks are unbearably slow, regardless of whether I created a
> normal unencrypted NTFS filesystem on them or an encrypted NTFS filesys-
> tem using VeraCrypt. Writing to the USB stick while at the same time
> reading from it in a different terminal window caused commands like "cd"
> or "ls" to simply stall. Thus while running
>
> $ cp --preserve=timestamps -ru $source_dir .
>
> in one terminal window, I ran
>
> $ while true
> > do n=$(ps -ef|g 'cp --preserve'|g -v grep)
> > if [[ "$n" = "${o-}" ]]
> > then sleep 10
> > else o="$n"
> > echo "$n"
> > fi
> > done
>
> in another, to get the wall clock times when copying a new file began.
> That way I found that copying a 30 MB file took about 40 minutes.
>
> So what are my options?
>
> - Stay away from Philips USB 3.0 sticks?
>
> - Stay away from Philips USB sticks in general?
>
> - Stay away from USB 3.0 sticks in general?
>
> - Stay away from Filesystem in User Space using a non-stable 5.10 or
> 5.11 kernel (currently I'm using stable 5.4.97)?
>
> - Stay away from Gentoo?
>
> - Stay away from Linux in general and go back to OTOS (aka the Only
> True Operating System aka Windoze)?
>
> - ...?
>
> Any ideas and comments welcome ...
>
> Sincerely,
> Rainer
>
>
Have you tried using dd to test the speed? It doesn't even need a file
system as it writes directly to the device. I've done this in the past
and it tells if it is a file system issue or a hardware issue. One
thing here, it will destroy ANY and ALL data on it if you let it run
until it finishes. Make sure you have nothing you want to save on it
when doing this. I might add, I like this over rsync --progress because
it doesn't have a file system in the middle.
Commands I use to test this.
dd if=/dev/zero of=/dev/sd bs=4k conv=notrunc oflag=direct #disables cache
Don't forget to complete the disk device in the "of=" section and you
can leave off the comment as well when typing it in. You may also want
to adjust the other settings or leave out some to test things. See if
you can figure out a way to tweek it a bit. Sometimes you can add those
to the mount options to make it work better, so I've read anyway.
To monitor the speed, I found this years ago and it still worked a few
months ago when I was testing a stick that was giving me problems.
Turned out, the stick was dying a slow death. The dd test finished it,
with errors.
watch -n 10 kill -USR1 <pid of process>
I use Konsole here which has tabs but you may use something similar that
will work just as well. I start the dd command in one tab, then go to
other tab and find the process number for dd there with ps and grep. I
then use the above and replace "<pid of process>" with the number, leave
out the <> as well, just the number itself. When you go to the tab
where dd is running, it updates about every ten seconds with speed and
other info. I've found it normal to start out fast and then slow down
as it goes. Since it has no moving parts, no clue why it does that.
Someone else may see this and have a much better method but that has
worked for me in the past. As we know, some USB stick and other memory
type cards can get fussy or go bad.
Hope that helps or at least gives some ideas.
Dale
:-) :-)
P. S. I just copy what folks post, I don't claim to understand the
inner workings of this. LOL I do know, it destroys data tho. Always
be careful with dd and if and 0.
next prev parent reply other threads:[~2021-03-30 18:26 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-25 17:37 [gentoo-user] Is there a way to misconfigure USB ports in the kernel? Dr Rainer Woitok
2020-11-26 0:10 ` Michael
2020-11-26 18:44 ` Michael
2020-11-27 16:01 ` Dr Rainer Woitok
2020-11-27 19:07 ` Michael
2020-12-05 18:07 ` Dr Rainer Woitok
2021-03-30 17:11 ` Dr Rainer Woitok
2021-03-30 18:26 ` Dale [this message]
2021-03-30 21:28 ` Laurence Perkins
2021-03-31 11:21 ` Michael
2021-03-31 11:37 ` Dale
2021-03-31 11:51 ` Michael
2021-03-31 12:09 ` Dale
2021-03-31 12:15 ` Michael
2021-03-31 12:23 ` Dale
2021-03-31 14:06 ` Michael
2021-03-31 14:20 ` Dale
2021-03-31 20:06 ` Neil Bothwick
2021-03-31 20:08 ` Neil Bothwick
2021-03-31 20:28 ` [gentoo-user] " Grant Edwards
2021-03-31 21:08 ` Jack
2021-03-31 21:46 ` Grant Edwards
2021-07-29 9:28 ` [SOLVED] Re: [gentoo-user] " Dr Rainer Woitok
2021-07-29 16:09 ` Wols Lists
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1916678a-f927-9a5e-f402-31bf83067cef@gmail.com \
--to=rdalek1967@gmail.com \
--cc=gentoo-user@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox