From owner-freebsd-usb@freebsd.org Mon May 25 11:23:32 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 93C1E2FC804 for ; Mon, 25 May 2020 11:23:32 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mailman.nyi.freebsd.org (mailman.nyi.freebsd.org [IPv6:2610:1c1:1:606c::50:13]) by mx1.freebsd.org (Postfix) with ESMTP id 49Vvq83Pcgz4pT0 for ; Mon, 25 May 2020 11:23:32 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: by mailman.nyi.freebsd.org (Postfix) id 731A52FC70F; Mon, 25 May 2020 11:23:32 +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 72E7A2FC803 for ; Mon, 25 May 2020 11:23:32 +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 49Vvq82X2Wz4pH7 for ; Mon, 25 May 2020 11:23:32 +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 524AE11544 for ; Mon, 25 May 2020 11:23:32 +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 04PBNWt3049878 for ; Mon, 25 May 2020 11:23:32 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 04PBNWSI049877 for usb@FreeBSD.org; Mon, 25 May 2020 11:23:32 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: Mon, 25 May 2020 11:23:31 +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: gljennjohn@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: Mon, 25 May 2020 11:23:32 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D244356 --- Comment #87 from Gary Jennejohn --- (In reply to Olivier Certner from comment #86) I only used dd for my testing. A file system adds lots of overhead and does not give a clear picture of the raw performance. I used a Kingston DT Rubber 3.0ge 16GB on both FreeBSD and Linux. I used it because it's easy to fill up such a small stick. Unfortunately, the FreeBSD XHCI driver does not correctly attach the stick (probably a bug) whereas USB2 has no problems with it. Under Linux XHCI is happy to use it. This is a rather old stick (9 or 10 years) and Kingston claims that it can = only write at a maximum of 30MB/s. A test report I saw showed that the stick can actually get up to about 40MB/s. For the dd test I wrote two different approximately 16GB files to the stick= one after the other. I tried both bs=3D128k and bs=3D256k, but that had no eff= ect on the transfer rates under FreeBSD or Linux. In any case, whether the stick was filled with 0xFF or all sectors were alr= eady dirty didn't change the write transfer rates. Under FreeBSD (USB2) I saw a= bout 33MB/s and under Linux (USB3) I saw about 40MB/s for each of the files. I also used the 128GB (USB3) stick with same dd tests under FreeBSD and also saw on the order of 40MB/s in that test. This stick probably was not full. So, I guess the poor write performance isn't caused by the contoller in the stick. It's probably more likely that the filesystem overhead is the culpr= it, especially with UFS when the stick is getting full or when it's writing sma= ll files into fragments. --=20 You are receiving this mail because: You are the assignee for the bug.=