[zfs-discuss] zram cache odd behaviour

Gordan Bobic gordan.bobic at gmail.com
Sun May 5 04:08:18 EDT 2013

On 05/05/2013 04:28 AM, Schlacta, Christ wrote:
> The test is simple, after I boot, I open byobu, htop, zpool iostat (I
> always keep these utils open) and I run time find / > /dev/null a few
> times, and watch the output.  It's gone from 2:48 on the 0th run, down
> to 0:32 on the 4th run.  I'm going to find out how many times until it
> stops speeding up, and create an upstart job that does that on boot

IMO the fact that this keeps improving after subsequent runs implies a 
bug somewhere. Either something isn't getting cached when it should, or 
it's getting evicted before it should. Or more stuff gets kept in L1ARC 
compared to L2ARC after it's proven to be hotter. But if the metadata is 
guaranteed to end up in either L1 or L2 ARC after the first pass, I 
wouldn't bother with the subsequent ones.

Have you established the volume of the metadata involved in this? Can it 
actually fit into the L2ARC?

I don't see the size of your swap being in any way relevant there, so if 
you're that short on RAM, you might as well leave those at 128MB. In 
this setup there is also no need to have two swap zrams - this is only 
useful because zram is single-threaded. Since you are going to be 
heavily using your L2ARC zram, you might as well have just one of each 
and you'll still get close enough to saturating two cores anyway.


More information about the zfs-discuss mailing list