"High" cpu usage when using ZFS cache device

Alexander Leidinger Alexander at Leidinger.net
Tue Nov 16 16:31:33 UTC 2010


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.

>> 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.

>> If gstat shows zero activity, I suggest to run 'top -S' and look at the
>> process(es) which consume about 10% CPU (do not take care about the idle
>> process). Based upon this we can maybe suggest further things to
>> investigate.
>>
>
> Heres the output of that:
> CPU:  0.0% user,  0.0% nice, 11.8% system,  0.0% interrupt, 88.1% idle
> Mem: 841M Active, 193M Inact, 5086M Wired, 4876K Cache, 1237M Buf, 5750M Free
> Swap: 8192M Total, 8192M Free
>
>   PID USERNAME    THR PRI NICE   SIZE    RES STATE   C   TIME   WCPU COMMAND
>    11 root          8 171 ki31     0K   128K CPU0    0    ??? 713.62% idle
>     5 root          5  -8    -     0K    76K zvol:i  5 401.9H 91.16% zfskern
>
> Thanks for your time on looking into this :-)

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).

Bye,
Alexander.

-- 
Sorry never means having you're say to love.

http://www.Leidinger.net    Alexander @ Leidinger.net: PGP ID = B0063FE7
http://www.FreeBSD.org       netchild @ FreeBSD.org  : PGP ID = 72077137


More information about the freebsd-stable mailing list