Re: AW: Slow I/O on USB media after commit f664a3cc17b7d0a2bc3b3ab96181e1029b0ec0e6

Andrea Vai
2019-12-23T18:46:06Z

[-- Attachment #1: Type: text/plain, Size: 1537 bytes --]

Il giorno lun, 23/12/2019 alle 12.22 -0500, Theodore Y. Ts'o ha
scritto:
> On Mon, Dec 23, 2019 at 05:29:27PM +0100, Andrea Vai wrote:
> > I run the cp command from a bash script, or from a bash shell. I
> don't
> > know if this answer your question, otherwise feel free to tell me
> a
> > way to find the answer to give you.
>
> What distro are you using, and/or what package is the cp command
> coming from, and what is the package name and version?

Fedora 30

$ rpm -qf `which cp`
coreutils-8.31-6.fc30.x86_64

>
> Also, can you remind me what the bash script is and how many files
> you are copying?

basically, it's:

mount UUID=$uuid /mnt/pendrive
SECONDS=0
cp $testfile /mnt/pendrive
umount /mnt/pendrive
tempo=$SECONDS

and it copies one file only. Anyway, you can find the whole script
attached.

>
> Can you change the script so that the cp command is prefixed by:
>
> "strace -tTf -o /tmp/st "
>
> e.g.,
>
> strace -tTf -o /tmp/st cp <args>
>
> And then send me
btw, please tell me if "me" means only you or I cc: all the
recipients, as usual

> the /tmp/st file. This will significantly change the
> time, so don't do this for measuring performance. I just want to
> see
> what the /bin/cp command is *doing*.

I will do it, but I have a doubt. Since the problem doesn't happen
every time, is it useful to give you a trace of a "fast" run? And, if
it's not, I think I should measure performance with the trace command
prefix, to identify a "slow" run to report you. Does it make sense?

Thanks,
Andrea

[-- Attachment #2: test --]
[-- Type: application/x-shellscript, Size: 1403 bytes --]