Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 19 May 2020 14:18:33 +0000
From:      bugzilla-noreply@freebsd.org
To:        usb@FreeBSD.org
Subject:   [Bug 244356] Writing to a USB 3.0 stick is very slow
Message-ID:  <bug-244356-19105-5B2gWCZmu4@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-244356-19105@https.bugs.freebsd.org/bugzilla/>
References:  <bug-244356-19105@https.bugs.freebsd.org/bugzilla/>

next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D244356

--- Comment #72 from Maurizio <maurizio1018@gmail.com> ---
(In reply to Olivier Certner from comment #52)
The stick, a Kingston DataTraveler G4 32GB, works well if formatted as FAT3=
2,
bad if formatted as UFS and the performance will degrade over the time. I h=
ave
written this script for testing the stick:

#!/bin/sh
set -x
STICK_DEVICE=3D/dev/da0
FILE_ON_STICK=3D/media/5ec390d1148aa331/zero.bin
COUNT=3D1024
tmux new-window "script /tmp/dd.log dd if=3D/dev/zero of=3D$FILE_ON_STICK b=
s=3D1M
count=3D$COUNT; sleep 5; killall iostat"
tmux new-window "script /tmp/iostast.log iostat -w 1 $STICK_DEVICE"
set +x

where FILE_ON_STICK depends on the stick mount point.

I have run the script one time with good performance with the stick formatt=
ed
as FAT32, the log output are: dd_fat32.log
(https://bugs.freebsd.org/bugzilla/attachment.cgi?id=3D214626 ) and
iostat_fat32.log (https://bugs.freebsd.org/bugzilla/attachment.cgi?id=3D214=
630).
The dd instruction takes 49 sec.=20

After formatting the stick as UFS I have runned the script 3 times, the dd
instruction takes 57, 141 and 189 seconds. The logs are, in order:

dd_ufs.log (https://bugs.freebsd.org/bugzilla/attachment.cgi?id=3D214627 ),
iostat_ufs.log  (https://bugs.freebsd.org/bugzilla/attachment.cgi?id=3D2146=
31),

dd_usf2.log  (https://bugs.freebsd.org/bugzilla/attachment.cgi?id=3D214628),
iostat_ufs2.log (https://bugs.freebsd.org/bugzilla/attachment.cgi?id=3D2146=
33)

dd_ufs3.log and=20
iostat_ufs3.log (https://bugs.freebsd.org/bugzilla/attachment.cgi?id=3D2146=
34)

Running the script with the stick formatted as UFS, the laptop used for the
test, hangs a little.

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-244356-19105-5B2gWCZmu4>