On 2013-03-21 16:24, Ram Chander wrote:

Can I know how to configure a SSD to be used for L2arc ? Basically I
want to improve read performance.

The "man zpool" page is quite informative on theory and concepts ;)

If your pool already exists, you can prepare the SSD (partition/slice
it) and:
# zpool add POOLNAME cache cXtYdZsS

Likewise, to add a ZIL device you can add a "log" device, either as
a single disk (slice) or as a mirror of two or more:
# zpool add POOLNAME log cXtYdZsS
# zpool add POOLNAME log mirror cXtYdZsS1 cXtYdZsS2

To increase write performance, will SSD for Zil help ? As I read on
forums, Zil is only used for mysql/transaction based writes. I have
regular writes only.

It may increase performance in two ways:

If you have any apps (including NFS, maybe VMs, iSCSI, etc. - not only
databases) that regularly issue "synchronous" writes - those which must
be stored on media (not just cached and queued) before the call returns
a success, then the ZIL catches these writes instead of the main pool
devices. The ZIL is written as ring buffer, so its size is proportional
to your pool's throughput - about 3 full-size TXG syncs should fit into
the designated ZIL space. That's usually max bandwidth (X Mb/s) times
15 sec (3*5s), or a bit more for peace of mind.

1) If the ZIL device (SLOG) is an SSD, it is presumably quick, so
writes should return quickly and sync IOs are less blocked.

2) If the SLOG is on HDD(s) separate from the main pool, then writes
into the ZIL cause no mechanical seeks during normal pool IOs, thus
requiring time for the disk heads to travel to the reserved ZIL area
and back - this is time stolen from both reads and writes in the pool.
*Possibly*, fragmentation might also be reduced by having ZIL outside
of the main pool, though this statement may be technically invalid as
my fault, then.

3) As a *speculation*, it is likely that a HDD doing nothing but SLOG
(i.e. a hotspare with a designated slice for ZIL so it does something
useful while waiting for failover of a larger pool device) would also
give a good boost to performance, since it won't have to seek much.
The rotational latency will be there however, limiting reachable IOPS
in comparison to an SSD SLOG.

zfs-discuss mailing list

Reply via email to