4

I would like to add a write cache to my Nexenta. I thought about using 2 SSDs in mirror with a third disc in spare. The problem is: How do I calculate the size of my array to maximize the investment (of course I do not want to spend much money in SSD space that is not being properly utilized then). Is there any way? I imagine that this calculation is a function of the space used by the datastore and peak workloads, queue lengths of writing, etc. But how do I translate this into gigabytes to buy?

I currently have a storage SATA 4x3TB and I could double it within a few years I also have a 256GB SSD dedicated to the read cache, but its size was chosen almost at random!

thank you very much

2 Answers 2

5

I probably should start with "ZIL is not write cache". It's the ZFS Intent Log for Synchronous write requests, which means it's only used in certain circumstances (mainly for synchronous writes) and only improves speed in those situations when the write to the actual storage array would take longer than writing to the ZIL, and it doesn't actually write any quicker it only returns from the synchronous write request quicker (so the application thinks stuff is written to disk quicker, but the actual write throughput is not improved on the whole).

The ZIL doesn't need to be very big. Find the transfer speed of the fastest disk in your array and multiple by 10s, this is about how big your ZIL should be. You can double that if you want extra room for error, but any more is a waste. A fast platter drive these days can crank out just over 200Mb/s, so a ZIL for an array made from that drive should be about 2-4GB.

1
  • 1
    Depends on Nexenta version. 30s was the default commit time for awhile. It's shorter now.
    – ewwhite
    Nov 22, 2013 at 14:47
3

Your write cache (ZIL) does not need to be large. Sizing is really a function of your anticipated write rate to the array.

Think about the purpose of the ZIL... to absorb random writes to low-latency storage and coalesce them to flush sequentially to the disk pool. In Nexenta, you basically need a ZIL large enough to handle up-to 30 seconds worth of writes... The devices I use a fairly small. One is a 4GB device. The other I recommend has an 8GB capacity.

Try to get a high quality SSD if you feel the need to run with a ZIL. You can mirror the ZILs. You don't need a spare ZIL.

Oh, and more comprehensive ZIL reading is here: http://nex7.blogspot.com/2013/04/zfs-intent-log.html

1
  • 3
    I really need to update that blog post. I forget sometimes to update when I learn new things. :) It isn't actually max speed * txg_commit time. It is max speed * txg_commit * 3. There can actually be up to 3 active transaction groups, one in each of the 3 states of 'active', 'quiescing', and 'syncing'. Thus, for a busy heavy write box, you need a bit more than txg_timeout*3*max write speed in slog devices, assuming all writes are sync.
    – Nex7
    Nov 22, 2013 at 18:05

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .