"High" cpu usage when using ZFS cache device

Christer Solskogen christer.solskogen at gmail.com
Tue Nov 16 16:48:33 UTC 2010


On Tue, Nov 16, 2010 at 5:31 PM, Alexander Leidinger
<Alexander at leidinger.net> wrote:
> Quoting Christer Solskogen <christer.solskogen at gmail.com> (from Tue, 16 Nov
> 2010 14:00:48 +0100):
>
>> On Tue, Nov 16, 2010 at 1:55 PM, Alexander Leidinger
>> <Alexander at leidinger.net> wrote:
>>>
>>> How do you measure that nothing is read or written to it?
>>>
>>
>> I used zpool iostat -v
>
> "zpool iostat" (without -v) does not show cache filling writes to the cache
> device. I do not know about -v, but I would not be surprised if it does not
> show this too.
>

Ah, but it does.
               capacity     operations    bandwidth
pool         used  avail   read  write   read  write
----------  -----  -----  -----  -----  -----  -----
data        2.11T  1.96T      0      0      0      0
  raidz1    2.11T  1.96T      0      0      0      0
    ada1        -      -      0      0      0      0
    ada2        -      -      0      0      0      0
    ada3        -      -      0      0      0      0
cache           -      -      -      -      -      -
  da0       2.64G  4.89G      0      0      0      0
----------  -----  -----  -----  -----  -----  -----

>>> Please check with
>>>  gstat -f '^<DEVICE>$'
>>> if there are really no reads/writes to the device (please replace
>>> <DEVICE>
>>> with the name of your USB device, e.g. da0).
>>>
>>> If you see writes, I would say
>>>  - this is the reason for the load
>>>  - your cache is on the way to be filled with
>>>   useful data
>>>
>>
>> I see almost no writes (nor reads)
>
> I'm not sure: you verified the output of "zpool iostat -v" with gstat or
> not? If not, please do.
>

Yeah, gstat shows (almost) the same as zpool iostat -v. (gstat have a
higher refresh rate than iostat)

> Based upon you other answer (with -H), I would still think the L2arc (cache)
> device is being filled in the background (which means there should be
> something visible with gstat).
>

gstat shows that something is going on when I add the cache
device(about one minute in my case). But the systemload is +0.01%. But
when it's settled the system load goes up.
top -HS says that the command called: l2arc_feed_threa goes up when
nothing is happening to the cache. (according to "zpool iostat  -v"
and gstat)

-- 
chs,


More information about the freebsd-stable mailing list