# zfs log cache



## danil75 (Oct 26, 2019)

i build a pool with logs and when i copy data from client to server i see only 
the cache being used and not the log.
when i copy from the server to the client the cache is used and not the log.

what the log and cache are used for? how to configure it.

i just added the to the pool
zpool add Data log ada5p1
zppol add Data cache adap2

do i need to tell the system to use it or it's automatic?


 state: ONLINE
  scan: scrub repaired 0 in 0 days 00:12:29 with 0 errors on Thu Oct 24 23:43:02                                           2019
config:

        NAME        STATE     READ WRITE CKSUM
        Data        ONLINE       0     0     0
          mirror-0  ONLINE       0     0     0
            ada2    ONLINE       0     0     0
            ada3    ONLINE       0     0     0
          mirror-1  ONLINE       0     0     0
            ada4    ONLINE       0     0     0
            ada5    ONLINE       0     0     0
        logs
          ada1p1    ONLINE       0     0     0
        cache
          ada1p2    ONLINE       0     0     0


----------



## usdmatt (Oct 26, 2019)

Both are automatic. The cache stores frequently and recently used blocks of data. The log device is purely used to accelerate sync writes. You may not be making any sync writes.


----------



## danil75 (Oct 26, 2019)

thank's.
i created 100G partiton log and 100G partition cache on SSD drive.
when i copy files i see that the log write bandwith only 3M-4M and the same is the cache. 
what does it mean?  can i change that? for better performance?


----------

