A zpool containing a slice of a disk as a log device and disk write cache is enabled may experience very poor write performance. (Doc ID 1609825.1)

Last updated on JULY 29, 2016

Applies to:

Solaris Operating System - Version 10 3/05 to 11.1 [Release 10.0 to 11.0]
Information in this document applies to any platform.

Symptoms

In a configuration like this, where we have a "logs" device

  pool: tank
 state: ONLINE
 scan: none requested
config:

        NAME                         STATE     READ WRITE CKSUM
        tank                       ONLINE       0     0     0
          raidz2-0                   ONLINE       0     0     0
            c0t1d0    ONLINE       0     0     0
            c0t2d0    ONLINE       0     0     0
            c0t3d0    ONLINE       0     0     0
            c0t4d0    ONLINE       0     0     0
            c0t5d0    ONLINE       0     0     0
            c0t6d0    ONLINE       0     0     0
            c0t7d0    ONLINE       0     0     0
            c0t8d0    ONLINE       0     0     0
            c0t9d0    ONLINE       0     0     0
        logs
          mirror-2                   ONLINE       0     0     0
            c0t10d0s5  ONLINE       0     0     0
            c0t11d0s5  ONLINE       0     0     0

You can see that log/slog/zil are disk slices instead of the whole disk. Log devices are used for synchronous writes like NFS, Oracle DB, Or where the "sync" property is set to "always" instead of "standard" (default) for a data set by the user, as follows

[[root]]$ zfs get sync tank
NAME          PROPERTY  VALUE     SOURCE
tank           sync           always    local

A big difference in write performance can be seen, as an example

Disk write cache enabled

Test #1:  sync=always, local:
 real    6m54.510s
 user    0m0.115s
 sys      0m4.215s

 

Disk write cache disabled

Test #1: sync=always, local:
 real     0m7.145s
 user    0m0.099s
 sys      0m1.623s

 

ZFS doesn't enable the write cache for a slice of a disk.  The reason is if the zpool is created with a slice then ZFS doesn't  "own"  the disk and so it doesn't change the write settings. ZFS doesn't know if write cache is enabled or not. To be safe we always flush the write cache of devices that are slices (shared).  In other words, the thinking is that whether or not ZFS enabled the WC, if the device has a volatile cache we should flush it. If the cache is not volatile the device should ignore the flush anyway.

 

Cause

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms