Solaris ZFS Administration Guide

Using Cache Devices in Your ZFS Storage Pool

Solaris Express Community Edition, build 78: In this Solaris release, you can create pool and specify cache devices, which are used to cache storage pool data.

Cache devices provide an additional layer of caching between main memory and disk. Using cache devices provide the greatest performance improvement for random read-workloads of mostly static content.

One or more cache devices can specified when the pool is created. For example:


# zpool create pool mirror c0t2d0 c0t4d0 cache c0t0d0
# zpool status pool
  pool: pool
 state: ONLINE
 scrub: none requested
config:

        NAME        STATE     READ WRITE CKSUM
        pool        ONLINE       0     0     0
          mirror    ONLINE       0     0     0
            c0t2d0  ONLINE       0     0     0
            c0t4d0  ONLINE       0     0     0
        cache
          c0t0d0    ONLINE       0     0     0

errors: No known data errors

After cache devices are added, they gradually fill with content from main memory. Depending on the size of your cache device, it could take over an hour for them to fill. Capacity and reads can be monitored by using the zpool iostat command as follows:


# zpool iostat -v pool 5

Cache devices can be added or removed from the pool after the pool is created.

For more information, see Creating a ZFS Storage Pool with Cache Devices and Example 4–4.