From owner-freebsd-bugs@FreeBSD.ORG Fri Jul 11 16:14:18 2014 Return-Path: Delivered-To: freebsd-bugs@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3B0F9E1 for ; Fri, 11 Jul 2014 16:14:18 +0000 (UTC) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0976F2A36 for ; Fri, 11 Jul 2014 16:14:18 +0000 (UTC) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.14.8/8.14.8) with ESMTP id s6BGEHnr033584 for ; Fri, 11 Jul 2014 16:14:17 GMT (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: freebsd-bugs@FreeBSD.org Subject: [Bug 191808] New: zfs trim_on_init should trim in smaller chunks Date: Fri, 11 Jul 2014 16:14:18 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: kern X-Bugzilla-Version: 10.0-RELEASE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Many People X-Bugzilla-Who: michael@supermathie.net X-Bugzilla-Status: Needs Triage X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: freebsd-bugs@FreeBSD.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 Jul 2014 16:14:18 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=191808 Bug ID: 191808 Summary: zfs trim_on_init should trim in smaller chunks Product: Base System Version: 10.0-RELEASE Hardware: amd64 OS: Any Status: Needs Triage Severity: Affects Many People Priority: --- Component: kern Assignee: freebsd-bugs@FreeBSD.org Reporter: michael@supermathie.net System: FreeBSD fearless2 10.0-RELEASE-p7 FreeBSD 10.0-RELEASE-p7 #0: Wed Jul 9 12:19:19 EDT 2014 root@fearless2:/usr/obj/usr/src/sys/CAMDEBUG amd64 I have an IBM server configured with 400GB SAS SSDs on which I'm trying to create a ZFS pool. # zpool create tank da1 da2 da3 da4 By default, ZFS will trim/unmap the drive when configuring but the UNMAP command takes 78s to complete, longer than kern.cam.da.default_timeout (60). I get timeouts and it tries to resubmit but will never finish: Jul 9 12:40:06 fearless2 kernel: (da1:mps0:0:3:0): UNMAP. CDB: 42 00 00 00 00 00 00 00 18 00 Jul 9 12:41:06 fearless2 kernel: (da1:mps0:0:3:0): UNMAP. CDB: 42 00 00 00 00 00 00 00 18 00 length 24 SMID 623 command timeout cm 0xfffffe00010c11b0 ccb 0xfffff80028931000 Jul 9 12:41:06 fearless2 kernel: (noperiph:mps0:0:4294967295:0): SMID 1 Aborting command 0xfffffe00010c11b0 Jul 9 12:41:07 fearless2 kernel: (da1:mps0:0:3:0): UNMAP. CDB: 42 00 00 00 00 00 00 00 18 00 Jul 9 12:41:07 fearless2 kernel: (da1:mps0:0:3:0): CAM status: Command timeout Increasing kern.cam.da.default_timeout to 90s allows the command to finish and the pool to be created. ZFS should probably UNMAP smaller chunks at a time (4GB?) on initial creation so the command can complete in a timely manner. Or, can it submit the UNMAP request with a much higher than normal timeout? Note that vfs.zfs.vdev.trim_max_bytes doesn't apply here. -- You are receiving this mail because: You are the assignee for the bug.