Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 31 Dec 2009 17:22:26 -0500
From:      jhell <jhell@DataIX.net>
To:        =?ISO-8859-15?Q?Micka=EBl_Maillot?= <mickael.maillot@gmail.com>
Cc:        freebsd-fs@freebsd.org
Subject:   Re: ZFS prefetch problem
Message-ID:  <alpine.BSF.2.00.0912311708440.72873@qvzrafvba.5c.ybpny>
In-Reply-To: <ea7b7b810912310813x61af52acs5ecabd5615ce83d8@mail.gmail.com>
References:  <ea7b7b810912310813x61af52acs5ecabd5615ce83d8@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help

[-- Attachment #1 --]
-----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-----
[-- Attachment #2 --]
--- dmu_zfetch.c.orig	2009-12-31 16:54:17.921496283 -0500
+++ dmu_zfetch.c	2009-12-31 16:58:16.278113395 -0500
@@ -324,7 +324,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;

Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?alpine.BSF.2.00.0912311708440.72873>