Date: Tue, 30 Aug 2016 20:11:12 +0200 From: Ben RUBSON <ben.rubson@gmail.com> To: FreeBSD FS <freebsd-fs@freebsd.org> Subject: Re: [ZFS] ARC accounting bug ? Message-ID: <234E7AF8-389C-4D27-82D1-81BF270D9376@gmail.com> In-Reply-To: <20160830133708.GD56297@in-addr.com> References: <C2642B73-83F2-4A1C-88BE-322F376861FF@gmail.com> <a89defa1-4335-70b2-25d5-ca43626c844d@ShaneWare.Biz> <71DED907-10BE-44C2-982B-12974152895D@gmail.com> <20160830133708.GD56297@in-addr.com>
next in thread | previous in thread | raw e-mail | index | archive | help
> On 30 Aug 2016, at 15:37, Gary Palmer <gpalmer@freebsd.org> wrote: >=20 > On Sat, Aug 27, 2016 at 06:15:18PM +0200, Ben RUBSON wrote: >> Playing with these commands : >> # dtrace -n 'sdt:zfs::arc-hit {@[execname, stack()] =3D count();}' >> # dtrace -n 'sdt:zfs::arc-miss {@[execname, stack()] =3D count();}' >>=20 >> We can see that these are readdir calls which produce arc-misses, and = that readdir calls also produce arc-hits. >>=20 >> It would be interesting to know why some lead to hits, and some lead = to misses. >>=20 >> (note that ls -lR / rsync commands produces exactly the same dtrace = results/numbers as find command) >=20 > If the *same* readdir() call produces both a hit and a miss, my guess = would > be that it is hitting two data sources for the data. I investigated further, and found that : - readdir() first produces a miss when it returns the "." entry. - readdir() then does not produce any miss for the other entries. - readdir() finally produces a miss when it does not return any value = (no more entry). I also noted that misses are not produced every time, it seems to depend = on the folder content. It is possible to generate so many misses when using find in a loop on a = huge folder that if these misses were finally redirect to disks, zpool = iostat would show use some IOs. But this is not the case. It looks strange. Cache hits statistics can then be degraded even if there are no disk IOs = at all. > I am not familiar with ZFS, however UFS treats a directory as a = special=20 > type of file. Filename information and the inode associated with that > filename would be in the directory "file. The inodes would be in the = inode > table. >=20 > If ZFS is similar, then the directory "file" reads would be misses and > the inode table reads would be hits >=20 > Regards, >=20 > Gary Thank you for your answer Gary ! Regards, Ben
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?234E7AF8-389C-4D27-82D1-81BF270D9376>