From owner-freebsd-fs@FreeBSD.ORG Thu Mar 19 14:02:27 2015 Return-Path: Delivered-To: freebsd-fs@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5A5F6A8A for ; Thu, 19 Mar 2015 14:02:27 +0000 (UTC) Received: from mail-la0-x232.google.com (mail-la0-x232.google.com [IPv6:2a00:1450:4010:c03::232]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id CDD18625 for ; Thu, 19 Mar 2015 14:02:26 +0000 (UTC) Received: by ladw1 with SMTP id w1so62852457lad.0 for ; Thu, 19 Mar 2015 07:02:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:message-id:date:from:user-agent:mime-version:to:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=cfo8Y7IzJ1+cbG6e7beaKVGTNHis4dSSRbMDhJ1gYho=; b=EzJ7n7FL88LihWyKwN7dEpn49na8IBGuYP7ZJSXPKT4IXEe7fipR2C6Zrqn5Pr0KAL 321ZFZmaQpnyfYzpyKW8m0KTDzVWRoVG+GH62qmK4wk4gGl1FPMkFT1ZxO3GEkgNDoNG f+BqpAVAh3qAAE8bIoQojQhblsOxsMZL9EMRCXWalt5RYiMWuXgurwwHco0ZQKu0NOi3 j5vOGqCEAPocdGVPTmrRDt/I/aUdC6+63X1wYbUq1M+yEWhByaUFHncvyndfao50qXvR YkH1rvUtvjgriQaZI5XRHVT942igBiTP7Lj/PwZFkg8H3pCclOMmipFp3pqwvEM0DJe0 CGZQ== X-Received: by 10.112.9.236 with SMTP id d12mr7071701lbb.102.1426773744413; Thu, 19 Mar 2015 07:02:24 -0700 (PDT) Received: from mavbook.mavhome.dp.ua ([134.249.139.101]) by mx.google.com with ESMTPSA id j7sm312275lae.9.2015.03.19.07.02.22 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 19 Mar 2015 07:02:23 -0700 (PDT) Sender: Alexander Motin Message-ID: <550AD6ED.50201@FreeBSD.org> Date: Thu, 19 Mar 2015 16:02:21 +0200 From: Alexander Motin User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 MIME-Version: 1.0 To: Emil Muratov , freebsd-fs@freebsd.org Subject: Re: CAM Target over FC and UNMAP problem References: <54F88DEA.2070301@hotplug.ru> <54F8AB96.6080600@FreeBSD.org> <54F9782A.90501@hotplug.ru> <54F98135.5000908@FreeBSD.org> <550979C8.2070603@hotplug.ru> In-Reply-To: <550979C8.2070603@hotplug.ru> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Mar 2015 14:02:27 -0000 Hi. On 18.03.2015 15:12, Emil Muratov wrote: > I've made some progress with this issue using iSCSI transport and > sniffing initiator/target command-responses traffic. > I found that initiator sends request VPD 0xb0 page and than UNMAP > command with long LBA range and then timeouts while waiting response. > That was interesting, ctladm option 'ublocksize' doesn't make any > difference, so I've tried to tackle other values. > I'm not sure how this should work in the first place but I found if not > a solution for ZFS than at least a workaround for CTL. > I looked through ctl code and changed hardcoded values for 'unmap LBA > count' and 'unmap block descr count' to 8Mb and 128. > With this values UNMAP works like a charm! No more IO blocks, IO > timeouts, log error, high disk loads or anything, only a medium > performance drop-down during even very large unmaps. But this > performance drop is nothing compared with those all-blocking issues. No > problems over FiberChannel transport too. In my present understanding of SBC-4 specification, implemented also in FreeBSD initiator, MAXIMUM UNMAP LBA COUNT is measured not per segment, but per command. From such perspective limiting it to 8MB per UNMAP command is IMHO an overkill. Could you try to increase it to 2097152, which is 1GB, while decrease MAXIMUM UNMAP BLOCK DESCRIPTOR COUNT from 128 to 64? Will it give acceptable results? -- Alexander Motin