From owner-freebsd-fs@FreeBSD.ORG Thu Dec 31 22:22:54 2009 Return-Path: Delivered-To: freebsd-fs@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C6F1A1065694 for ; Thu, 31 Dec 2009 22:22:54 +0000 (UTC) (envelope-from jhellenthal@gmail.com) Received: from mail-gx0-f218.google.com (mail-gx0-f218.google.com [209.85.217.218]) by mx1.freebsd.org (Postfix) with ESMTP id 757688FC17 for ; Thu, 31 Dec 2009 22:22:54 +0000 (UTC) Received: by gxk10 with SMTP id 10so12538747gxk.3 for ; Thu, 31 Dec 2009 14:22:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:sender:date:from:to:cc :subject:in-reply-to:message-id:references:user-agent :x-openpgp-key-id:x-openpgp-key-fingerprint:mime-version :content-type; bh=b6T3YaoN+Oy0xvID81VRude2NMfcSYr594jHJ9NiLgg=; b=h2nwgIZYzGt5HbyyZ7+KkIUGcdCCOBcIglk+C+WScPzgeiVOOZdXCaxkfbSXBLuoNc cZII/VdHfyvse2P+NHZ8Kx5/+ZubIEO9SHp3Hsqxpvpm3FzFxmeHlmFl98ClNJjEN7gF lRiwlnQ+JmmaWOSzX7qJIE4JuF5Q/DqKY+qVU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:date:from:to:cc:subject:in-reply-to:message-id:references :user-agent:x-openpgp-key-id:x-openpgp-key-fingerprint:mime-version :content-type; b=hTjROb0gbm2f32luef2acXx59/u1k8PahVw+RZ4HA7tNvHfpM4YUa+2MNFMBkzjpjj l2WWPAluH9mmtUk3EnyBUMRpLWu6VEDVzxyrK9M6pPqNtRj1zRt5iZ70KAq57vdtOr3L 1fjhLxJeXW+ElgbrOhX/1EV1/8DC9MJ+hGNjg= Received: by 10.150.172.6 with SMTP id u6mr12368520ybe.41.1262298166307; Thu, 31 Dec 2009 14:22:46 -0800 (PST) Received: from dimension.5p.local (ppp-22.194.dialinfree.com [209.172.22.194]) by mx.google.com with ESMTPS id 20sm14048998iwn.5.2009.12.31.14.22.41 (version=TLSv1/SSLv3 cipher=RC4-MD5); Thu, 31 Dec 2009 14:22:45 -0800 (PST) Sender: "J. Hellenthal" Date: Thu, 31 Dec 2009 17:22:26 -0500 From: jhell To: =?ISO-8859-15?Q?Micka=EBl_Maillot?= In-Reply-To: Message-ID: References: User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) X-OpenPGP-Key-Id: 0x89D8547E X-OpenPGP-Key-Fingerprint: 85EF E26B 07BB 3777 76BE B12A 9057 8789 89D8 547E MIME-Version: 1.0 Content-Type: MULTIPART/MIXED; BOUNDARY="1091451658-817458301-1262298180=:72873" Cc: freebsd-fs@freebsd.org Subject: Re: ZFS prefetch problem X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 31 Dec 2009 22:22:54 -0000 This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. --1091451658-817458301-1262298180=:72873 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Thu, 31 Dec 2009 11:13, mickael.maillot@ wrote: > this bug is referenced: > http://bugs.opensolaris.org/bugdatabase/view_bug.do?bug_id=6859997 > and a good description can be found here: > http://bugs.opensolaris.org/bugdatabase/view_bug.do?bug_id=6861397 > and a long thread on zfs-discuss > http://mail.opensolaris.org/pipermail/zfs-discuss/2009-July/029710.html > > i use bob friesenhahn's script to test (with little mod) > http://www.simplesystems.org/users/bfriesen/zfs-discuss/zfs-cache-test.ksh > > so i test on my hardware for reading 3000 8M files > > without prefetch: no problem > initial > real 7m49.039s > user 0m2.931s > sys 0m22.574s > second > real 7m48.080s > user 0m2.858s > sys 0m32.559s > > with prefetch enable: > initial > real 2m55.163s > user 0m2.244s > sys 0m10.072s > second > real 7m37.522s > user 0m2.367s > sys 0m10.565s > > ok i hit the same bug. > it was fix by this commit: > http://hg.intevation.org/mirrors/opensolaris.org/onnv-gate/rev/0e96dd3b905a > which add kstats for prefetch and a bug in rollback (not for us) > > the only modif for the prefetch + arc problem is resolv by: > --- dmu_zfetch.c.orig 2009-12-31 15:46:15.211700719 +0100 > +++ dmu_zfetch.c 2009-12-31 15:46:42.915461251 +0100 > @@ -323,7 +323,8 @@ > * we will read "len" blocks before "striding". > */ > if (zh->zst_offset >= zs->zst_offset && > - zh->zst_offset < zs->zst_offset + zs->zst_len) { > + zh->zst_offset < zs->zst_offset + zs->zst_len && > + prefetched) { > /* already fetched */ > rc = 1; > goto out; > > with this patch i have: > initial > real 2m57.614s > user 0m2.228s > sys 0m10.054s > second > real 2m45.403s > user 0m2.445s > sys 0m9.726s > third > real 2m16.381s > user 0m2.152s > sys 0m9.136s > > looks good. > tested on 8-STABLE amd64, with/without log/cache ssd. (but not with zil_disable) > Thanks for the heads up on this. I have applied the following to a stable/7 system @r201336 "The obrien new year copyright ;)" and will write back with further results. Attached is a patch to r201336. Happy New Years! - -- Thu Dec 31 17:08:44 2009 jhell -----BEGIN PGP SIGNATURE----- iQEcBAEBAgAGBQJLPSQtAAoJEJBXh4mJ2FR+SdcH/jb7j6Fb7OfvRwY2yNpoJ3iG li5NZ3Ukj7CC4XNIYS3nal3xg55oIvzTfjX6+c7MCCpbx2p3RuAvMh2wOcU+B2vn Pdvd0sDFRG96caUrdJ0O1ZIs2SmdVSKz/vxQEVtWW6EUq/4NOd+D243zDJxqOYED CkgobJmymWQ9swxR0uvH0vlsj8mK481GkMJPWVKDthGvjLU72dp+A1sCEj1e7B3J b9n48m66jUSYJwxO0Kyf8oHNVYdUvOURcwrSnS0yUdZlsUIn0ALHEGkO26N3Jl0V Te9CFuNaQfpsswTMiZQvpMVfhPk+292tGXsERaxx4m46SyWFnZYpXu8qUIwqhpM= =0pfh -----END PGP SIGNATURE----- --1091451658-817458301-1262298180=:72873 Content-Type: TEXT/PLAIN; charset=US-ASCII; name=r201336+dmu_zfetch.c.patch Content-Transfer-Encoding: BASE64 Content-ID: Content-Description: Content-Disposition: attachment; filename=r201336+dmu_zfetch.c.patch LS0tIGRtdV96ZmV0Y2guYy5vcmlnCTIwMDktMTItMzEgMTY6NTQ6MTcuOTIx NDk2MjgzIC0wNTAwDQorKysgZG11X3pmZXRjaC5jCTIwMDktMTItMzEgMTY6 NTg6MTYuMjc4MTEzMzk1IC0wNTAwDQpAQCAtMzI0LDcgKzMyNCw4IEBADQog CQkgKiB3ZSB3aWxsIHJlYWQgImxlbiIgYmxvY2tzIGJlZm9yZSAic3RyaWRp bmciLg0KIAkJICovDQogCQlpZiAoemgtPnpzdF9vZmZzZXQgPj0genMtPnpz dF9vZmZzZXQgJiYNCi0JCSAgICB6aC0+enN0X29mZnNldCA8IHpzLT56c3Rf b2Zmc2V0ICsgenMtPnpzdF9sZW4pIHsNCisJCSAgICB6aC0+enN0X29mZnNl dCA8IHpzLT56c3Rfb2Zmc2V0ICsgenMtPnpzdF9sZW4gJiYNCisJCQlwcmVm ZXRjaGVkKSB7DQogCQkJLyogYWxyZWFkeSBmZXRjaGVkICovDQogCQkJcmMg PSAxOw0KIAkJCWdvdG8gb3V0Ow0K --1091451658-817458301-1262298180=:72873--