From owner-freebsd-usb@freebsd.org Tue May 19 14:18:34 2020 Return-Path: Delivered-To: freebsd-usb@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 208B62D96E0 for ; Tue, 19 May 2020 14:18:34 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mailman.nyi.freebsd.org (unknown [127.0.1.3]) by mx1.freebsd.org (Postfix) with ESMTP id 49RHzt05HCz4b5q for ; Tue, 19 May 2020 14:18:34 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: by mailman.nyi.freebsd.org (Postfix) id 031922D97C6; Tue, 19 May 2020 14:18:34 +0000 (UTC) Delivered-To: usb@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 02E542D9639 for ; Tue, 19 May 2020 14:18:34 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49RHzs6Mpwz4bDT for ; Tue, 19 May 2020 14:18:33 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D6007C1F4 for ; Tue, 19 May 2020 14:18:33 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 04JEIXkr053859 for ; Tue, 19 May 2020 14:18:33 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 04JEIX3X053858 for usb@FreeBSD.org; Tue, 19 May 2020 14:18:33 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: usb@FreeBSD.org Subject: [Bug 244356] Writing to a USB 3.0 stick is very slow Date: Tue, 19 May 2020 14:18:33 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: usb X-Bugzilla-Version: 12.1-RELEASE X-Bugzilla-Keywords: needs-qa, performance X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: maurizio1018@gmail.com X-Bugzilla-Status: Open X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: usb@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 May 2020 14:18:34 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D244356 --- Comment #72 from Maurizio --- (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.=