ZFS sets the value of the l2arc_write_max to the each cache device of L2ARC only when you add it to a pool of ZFS or restart the OS. If you want to change the value dynamically, you should follow the following steps with the mdb.
Dec 7, 2011
Dec 6, 2011
L2ARC of ZFS is quite different from an ordinary L2 cache of a CPU. The following figure shows the structure of the caches of ZFS. L2ARC caches only blocks in the ARC read from HDDs. It doesn't cache dirty blocks in ARC written to HDDs. There is no data transfer between L2ARC and HDDs. When ZFS doesn't cache a requested block in ARC but L2ARC, it copy the block to ARC and respond it.
Dec 4, 2011
This post is completely wrong. It shows how to tune L2ARC of ZFS as follows.
- Change the Record Size to a much lower value than 128 KB.
- Change the l2arc_write_max to a higher value.
- Set the l2arc_noprefetch=0.