Re: should TRIM be working on my ZFS L2ARC devices?

From: Steven Hartland <killing_at_multiplay.co.uk>
Date: Sat, 8 Jun 2013 18:18:19 +0100
----- Original Message ----- 
From: "Dan Mack" <mack_at_macktronics.com>
To: <current_at_freebsd.org>
Sent: Saturday, June 08, 2013 4:56 PM
Subject: should TRIM be working on my ZFS L2ARC devices?


> Hiya,
> 
> Hopefully a simple question on TRIM + ZFS,
> 
> I have a couple L2ARCs for a zpool on a test box, two different SSDs:
> 
> ada0 at ahcich0 bus 0 scbus0 target 0 lun 0
> 
> ada0: <OCZ-VERTEX4 1.5> ATA-9 SATA 3.x device
> 
> ada0: 600.000MB/s transfers (SATA 3.x, UDMA6, PIO 8192bytes)
> ada0: Command Queueing enabled
> ada0: 122104MB (250069680 512 byte sectors: 16H 63S/T 16383C)
> ada0: Previously was known as ad4
> ada1 at ahcich1 bus 0 scbus1 target 0 lun 0
> 
> ada1: <INTEL SSDSC2CW120A3 400i> ATA-9 SATA 3.x device
> 
> ada1: 600.000MB/s transfers (SATA 3.x, UDMA6, PIO 8192bytes)
> ada1: Command Queueing enabled
> ada1: 114473MB (234441648 512 byte sectors: 16H 63S/T 16383C)
> ada1: Previously was known as ad6
> 
> I'm just using a small piece of each one for the L2ARC per below:
> 
>                 capacity     operations    bandwidth
> pool         alloc   free   read  write   read  write
> -----------  -----  -----  -----  -----  -----  -----
> tron         98.2G  3.53T      7     23  58.2K   970K
>   mirror     49.1G  1.76T      3     11  29.2K   485K
>     ada2         -      -      1      5  15.4K   485K
>     ada4         -      -      1      5  14.7K   485K
>   mirror     49.1G  1.76T      3     11  29.0K   485K
>     ada3         -      -      1      5  14.6K   485K
>     ada5         -      -      1      5  15.3K   485K
> cache            -      -      -      -      -      -
>   gpt/larc0  2.89G  29.1G      0      5      9   201K
>   gpt/larc1  2.12G  29.9G      0      1      9   148K
> -----------  -----  -----  -----  -----  -----  -----
> 
> I'm running 10.0-CURRENT #34 251520 and I never seen any successful trim 
> events:
> 
> kstat.zfs.misc.zio_trim.bytes: 0
> kstat.zfs.misc.zio_trim.success: 0
> kstat.zfs.misc.zio_trim.unsupported: 102
> kstat.zfs.misc.zio_trim.failed: 0
> 
> kstat.zfs.misc.zio_trim.unsupported is always > 0 and the other values 
> stick at 0.
> 
> Does the Vertex 4 and Intel 520 not work with TRIM on FreeBSD or is 
> something else going on here?

Connected to an controller which supports BIO_DELETE yes they
should.

Check with:
camcontrol identify ada0
camcontrol identify ada1

> Like, will TRIM only kick in after each device gets full and
> pages start getting evicted ?

I would indeed expect ZFS to only evict data from the L2ARC when
it becomes stale, assuming this is the case you may not see TRIM's
as often as you might first expect.

    Regards
    Steve

================================================
This e.mail is private and confidential between Multiplay (UK) Ltd. and the person or entity to whom it is addressed. In the event of misdirection, the recipient is prohibited from using, copying, printing or otherwise disseminating it or any information contained in it. 

In the event of misdirection, illegible or incomplete transmission please telephone +44 845 868 1337
or return the E.mail to postmaster_at_multiplay.co.uk.
Received on Sat Jun 08 2013 - 15:18:32 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:40:38 UTC