Re: [zfs-discuss] SSD for L2arc

2013-03-21 Thread Jim Klimov

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

Hi,

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.

HTH,
//Jim
___
zfs-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/zfs-discuss


Re: [zfs-discuss] SSD for L2arc

2013-03-21 Thread Jim Mauro

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

Read the documentation, specifically the section titled;

Creating a ZFS Storage PoolWith Cache Devices


> 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.

That is not correct - the ZIL is used for synchronous writes.

From the documentation:

The ZFS intent log (ZIL) is provided to satisfy POSIX requirements for 
synchronous
transactions. For example, databases often require their transactions to be on 
stable storage
devices when returning from a system call. NFS and other applications can also 
use fsync() to
ensure data stability.

By default, the ZIL is allocated from blocks within the main pool.However, 
better performance
might be possible by using separate intent log devices, such asNVRAMor a 
dedicated disk.


> 
> Thanks.
> 
> Regards,
> Ram
> ___
> zfs-discuss mailing list
> [email protected]
> http://mail.opensolaris.org/mailman/listinfo/zfs-discuss

___
zfs-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/zfs-discuss