Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 28 Aug 2016 13:57:16 +0930
From:      Shane Ambler <FreeBSD@ShaneWare.Biz>
To:        Ben RUBSON <ben.rubson@gmail.com>, FreeBSD FS <freebsd-fs@freebsd.org>
Subject:   Re: [ZFS] ARC accounting bug ?
Message-ID:  <16ca6964-4d10-e4b0-7d9f-c1da5a95f5ac@ShaneWare.Biz>
In-Reply-To: <71DED907-10BE-44C2-982B-12974152895D@gmail.com>
References:  <C2642B73-83F2-4A1C-88BE-322F376861FF@gmail.com> <a89defa1-4335-70b2-25d5-ca43626c844d@ShaneWare.Biz> <71DED907-10BE-44C2-982B-12974152895D@gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On 28/08/2016 01:45, Ben RUBSON wrote:
>
>> On 27 Aug 2016, at 07:22, Shane Ambler <FreeBSD@ShaneWare.Biz> wrote:
>>
>> On 26/08/2016 19:09, Ben RUBSON wrote:
>>> Hello,
>>>
>>> Before opening a bug report, I would like to know whether what I see
>>> is "normal" or not, and why.

>> What I am seeing leads me to think that not all metadata is cached,
>> maybe filename isn't cached, which can be a large string.
>>
>> while [ 1 ]; do find /usr/ports > /dev/null; done
>>
>> will list the path to every file and I see about 2 hits to a miss, yet
>>
>> while [ 1 ]; do ls -lR /usr/ports > /dev/null; done
>>
>> lists every filename as well as it's size, mod date, owner, permissions
>> and it sits closer to 4 hits to every miss.
>>
>> And if the system disk cache contains the filenames that zfs isn't
>> caching we won't need disk access to get the zfs misses.
>
> Playing with these commands :
> # dtrace -n 'sdt:zfs::arc-hit {@[execname, stack()] = count();}'
> # dtrace -n 'sdt:zfs::arc-miss {@[execname, stack()] = count();}'
>
> We can see that these are readdir calls which produce arc-misses,
> andthat readdir calls also produce arc-hits.
>
> It would be interesting to know why some lead to hits, and some lead
 > to misses.
>
> (note that ls -lR / rsync commands produces exactly the same dtrace
 > results/numbers as find command)

ls outputs the filename - find outputs the full path, could tracing
back through parent folders get the extra misses.

-- 
FreeBSD - the place to B...Software Developing

Shane Ambler




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?16ca6964-4d10-e4b0-7d9f-c1da5a95f5ac>