From owner-freebsd-current@FreeBSD.ORG Sat Oct 19 08:55:57 2013 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 5727A39F; Sat, 19 Oct 2013 08:55:57 +0000 (UTC) (envelope-from satan@ukr.net) Received: from hell.ukr.net (hell.ukr.net [212.42.67.68]) (using TLSv1.2 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 0C6782EE5; Sat, 19 Oct 2013 08:55:56 +0000 (UTC) Received: from satan by hell.ukr.net with local ID 1VXSK3-0008lM-5v ; Sat, 19 Oct 2013 11:55:47 +0300 Date: Sat, 19 Oct 2013 11:55:47 +0300 From: Vitalij Satanivskij To: Steven Hartland Subject: Re: ZFS secondarycache on SSD problem on r255173 Message-ID: <20131019085547.GA33582@hell.ukr.net> References: <7059AA6DCC0D46B8B1D33FC883C31643@multiplay.co.uk> <20131017061248.GA15980@hell.ukr.net> <326B470C65A04BC4BC83E118185B935F@multiplay.co.uk> <20131017073925.GA34958@hell.ukr.net> <2AFE1CBD9B124E3AB9E05A4E483CCE03@multiplay.co.uk> <20131018080148.GA75226@hell.ukr.net> <256B2E5A0BA44DCBB45BB3F3E820E190@multiplay.co.uk> <20131018144524.GA30018@hell.ukr.net> <4459A6FAB7B8445C97CCB9EFF34FD4F0@multiplay.co.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4459A6FAB7B8445C97CCB9EFF34FD4F0@multiplay.co.uk> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: Vitalij Satanivskij , Dmitriy Makarov , "Justin T. Gibbs" , Borja Marcos , freebsd-current@freebsd.org X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 19 Oct 2013 08:55:57 -0000 Ok. Just right now system rebooted with you patch. Trim enabled again. WIll wait some time untile size of used cache grow's. Steven Hartland wrote: SH> Looking at the l2arc compression code I believe that metadata is always SH> compressed with lz4, even if compression is off on all datasets. SH> SH> This is backed up by what I'm seeing on my system here as it shows a SH> non-zero l2_compress_successes value even though I'm not using SH> compression at all. SH> SH> I think we we may well need the following patch to set the minblock SH> size based on the vdev ashift and not SPA_MINBLOCKSIZE. SH> SH> svn diff -x -p sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c SH> Index: sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c SH> =================================================================== SH> --- sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c (revision 256554) SH> +++ sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c (working copy) SH> @@ -5147,7 +5147,7 @@ l2arc_compress_buf(l2arc_buf_hdr_t *l2hdr) SH> len = l2hdr->b_asize; SH> cdata = zio_data_buf_alloc(len); SH> csize = zio_compress_data(ZIO_COMPRESS_LZ4, l2hdr->b_tmp_cdata, SH> - cdata, l2hdr->b_asize, (size_t)SPA_MINBLOCKSIZE); SH> + cdata, l2hdr->b_asize, (size_t)(1ULL << l2hdr->b_dev->l2ad_vdev->vdev_ashift)); SH> SH> if (csize == 0) { SH> /* zero block, indicate that there's nothing to write */ SH> SH> Could you try this patch on your system Vitalij see if it has any effect SH> on the number of l2_cksum_bad / l2_io_error? SH> SH> Regards SH> Steve SH> ----- Original Message ----- SH> From: "Vitalij Satanivskij" SH> To: "Steven Hartland" SH> Cc: "Vitalij Satanivskij" ; "Dmitriy Makarov" ; "Justin T. Gibbs" ; "Borja SH> Marcos" ; SH> Sent: Friday, October 18, 2013 3:45 PM SH> Subject: Re: ZFS secondarycache on SSD problem on r255173 SH> SH> SH> > SH> > Just right now stats not to actual because of some another test. SH> > SH> > Test is simply all gpart information destroyed from ssd and SH> > SH> > They used as raw cache devices. Just SH> > 2013-10-18.11:30:49 zpool add disk1 cache /dev/ada1 /dev/ada2 /dev/ada3 SH> > SH> > So sizes at last l2_size and l2_asize in not actual. SH> > SH> > But heare it is: SH> > SH> > kstat.zfs.misc.arcstats.hits: 5178174063 SH> > kstat.zfs.misc.arcstats.misses: 57690806 SH> > kstat.zfs.misc.arcstats.demand_data_hits: 313995744 SH> > kstat.zfs.misc.arcstats.demand_data_misses: 37414740 SH> > kstat.zfs.misc.arcstats.demand_metadata_hits: 4719242892 SH> > kstat.zfs.misc.arcstats.demand_metadata_misses: 9266394 SH> > kstat.zfs.misc.arcstats.prefetch_data_hits: 1182495 SH> > kstat.zfs.misc.arcstats.prefetch_data_misses: 9951733 SH> > kstat.zfs.misc.arcstats.prefetch_metadata_hits: 143752935 SH> > kstat.zfs.misc.arcstats.prefetch_metadata_misses: 1057939 SH> > kstat.zfs.misc.arcstats.mru_hits: 118609738 SH> > kstat.zfs.misc.arcstats.mru_ghost_hits: 1895486 SH> > kstat.zfs.misc.arcstats.mfu_hits: 4914673425 SH> > kstat.zfs.misc.arcstats.mfu_ghost_hits: 14537497 SH> > kstat.zfs.misc.arcstats.allocated: 103796455 SH> > kstat.zfs.misc.arcstats.deleted: 40168100 SH> > kstat.zfs.misc.arcstats.stolen: 20832742 SH> > kstat.zfs.misc.arcstats.recycle_miss: 15663428 SH> > kstat.zfs.misc.arcstats.mutex_miss: 1456781 SH> > kstat.zfs.misc.arcstats.evict_skip: 25960184 SH> > kstat.zfs.misc.arcstats.evict_l2_cached: 891379153920 SH> > kstat.zfs.misc.arcstats.evict_l2_eligible: 50578438144 SH> > kstat.zfs.misc.arcstats.evict_l2_ineligible: 956055729664 SH> > kstat.zfs.misc.arcstats.hash_elements: 8693451 SH> > kstat.zfs.misc.arcstats.hash_elements_max: 14369414 SH> > kstat.zfs.misc.arcstats.hash_collisions: 90967764 SH> > kstat.zfs.misc.arcstats.hash_chains: 1891463 SH> > kstat.zfs.misc.arcstats.hash_chain_max: 24 SH> > kstat.zfs.misc.arcstats.p: 73170954752 SH> > kstat.zfs.misc.arcstats.c: 85899345920 SH> > kstat.zfs.misc.arcstats.c_min: 42949672960 SH> > kstat.zfs.misc.arcstats.c_max: 85899345920 SH> > kstat.zfs.misc.arcstats.size: 85899263104 SH> > kstat.zfs.misc.arcstats.hdr_size: 1425948696 SH> > kstat.zfs.misc.arcstats.data_size: 77769994240 SH> > kstat.zfs.misc.arcstats.other_size: 6056233632 SH> > kstat.zfs.misc.arcstats.l2_hits: 21725934 SH> > kstat.zfs.misc.arcstats.l2_misses: 35876251 SH> > kstat.zfs.misc.arcstats.l2_feeds: 130197 SH> > kstat.zfs.misc.arcstats.l2_rw_clash: 110181 SH> > kstat.zfs.misc.arcstats.l2_read_bytes: 391282009600 SH> > kstat.zfs.misc.arcstats.l2_write_bytes: 1098703347712 SH> > kstat.zfs.misc.arcstats.l2_writes_sent: 130037 SH> > kstat.zfs.misc.arcstats.l2_writes_done: 130037 SH> > kstat.zfs.misc.arcstats.l2_writes_error: 0 SH> > kstat.zfs.misc.arcstats.l2_writes_hdr_miss: 375921 SH> > kstat.zfs.misc.arcstats.l2_evict_lock_retry: 331 SH> > kstat.zfs.misc.arcstats.l2_evict_reading: 43 SH> > kstat.zfs.misc.arcstats.l2_free_on_write: 255730 SH> > kstat.zfs.misc.arcstats.l2_abort_lowmem: 0 SH> > kstat.zfs.misc.arcstats.l2_cksum_bad: 854359 SH> > kstat.zfs.misc.arcstats.l2_io_error: 38254 SH> > kstat.zfs.misc.arcstats.l2_size: 136696884736 SH> > kstat.zfs.misc.arcstats.l2_asize: 131427690496 SH> > kstat.zfs.misc.arcstats.l2_hdr_size: 742951208 SH> > kstat.zfs.misc.arcstats.l2_compress_successes: 5565311 SH> > kstat.zfs.misc.arcstats.l2_compress_zeros: 0 SH> > kstat.zfs.misc.arcstats.l2_compress_failures: 0 SH> > kstat.zfs.misc.arcstats.l2_write_trylock_fail: 325157131 SH> > kstat.zfs.misc.arcstats.l2_write_passed_headroom: 4897854 SH> > kstat.zfs.misc.arcstats.l2_write_spa_mismatch: 115704249 SH> > kstat.zfs.misc.arcstats.l2_write_in_l2: 15114214372 SH> > kstat.zfs.misc.arcstats.l2_write_io_in_progress: 63417 SH> > kstat.zfs.misc.arcstats.l2_write_not_cacheable: 3291593934 SH> > kstat.zfs.misc.arcstats.l2_write_full: 47672 SH> > kstat.zfs.misc.arcstats.l2_write_buffer_iter: 130197 SH> > kstat.zfs.misc.arcstats.l2_write_pios: 130037 SH> > kstat.zfs.misc.arcstats.l2_write_buffer_bytes_scanned: 369077156457472 SH> > kstat.zfs.misc.arcstats.l2_write_buffer_list_iter: 8015080 SH> > kstat.zfs.misc.arcstats.l2_write_buffer_list_null_iter: 79825 SH> > kstat.zfs.misc.arcstats.memory_throttle_count: 0 SH> > kstat.zfs.misc.arcstats.duplicate_buffers: 0 SH> > kstat.zfs.misc.arcstats.duplicate_buffers_size: 0 SH> > kstat.zfs.misc.arcstats.duplicate_reads: 0 SH> > SH> > SH> > Values of SH> > --------------------------------- SH> > kstat.zfs.misc.arcstats.l2_cksum_bad: 854359 SH> > kstat.zfs.misc.arcstats.l2_io_error: 38254 SH> > -------------------------------- SH> > SH> > not growing from last cache reconfiguration, just wait some time to see - maybe problem disapers :) SH> > SH> > SH> > SH> > SH> > SH> > SH> > Steven Hartland wrote: SH> > SH> Hmm so that rules out a TRIM related issue. I wonder if the SH> > SH> increase in ashift has triggered a problem in compression. SH> > SH> SH> > SH> What are all the values reported by: SH> > SH> sysctl -a kstat.zfs.misc.arcstats SH> > SH> SH> > SH> Regards SH> > SH> Steve SH> > SH> SH> > SH> ----- Original Message ----- SH> > SH> From: "Vitalij Satanivskij" SH> > SH> To: "Steven Hartland" SH> > SH> Cc: ; "Justin T. Gibbs" ; ; "Borja Marcos" SH> > ; SH> > SH> "Dmitriy Makarov" SH> > SH> Sent: Friday, October 18, 2013 9:01 AM SH> > SH> Subject: Re: ZFS secondarycache on SSD problem on r255173 SH> > SH> SH> > SH> SH> > SH> > Hello. SH> > SH> > SH> > SH> > Yesterday system was rebooted with vfs.zfs.trim.enabled=0 SH> > SH> > SH> > SH> > System version 10.0-BETA1 FreeBSD 10.0-BETA1 #6 r256669, without any changes in code SH> > SH> > SH> > SH> > Uptime 10:51 up 16:41 SH> > SH> > SH> > SH> > sysctl vfs.zfs.trim.enabled SH> > SH> > vfs.zfs.trim.enabled: 0 SH> > SH> > SH> > SH> > Around 2 hours ago errors counter's SH> > SH> > kstat.zfs.misc.arcstats.l2_cksum_bad: 854359 SH> > SH> > kstat.zfs.misc.arcstats.l2_io_error: 38254 SH> > SH> > SH> > SH> > begin grow from zero values. SH> > SH> > SH> > SH> > After remove cache SH> > SH> > 2013-10-18.10:37:10 zpool remove disk1 gpt/cache0 gpt/cache1 gpt/cache2 SH> > SH> > SH> > SH> > and attach again SH> > SH> > SH> > SH> > 2013-10-18.10:38:28 zpool add disk1 cache gpt/cache0 gpt/cache1 gpt/cache2 SH> > SH> > SH> > SH> > counters stop growing (of couse thay not zeroed) SH> > SH> > SH> > SH> > before cache remove kstat.zfs.misc.arcstats.l2_asize was around 280GB SH> > SH> > SH> > SH> > hw size of l2 cache is 3x164G SH> > SH> > SH> > SH> > => 34 351651821 ada3 GPT (168G) SH> > SH> > 34 6 - free - (3.0K) SH> > SH> > 40 8388608 1 zil2 (4.0G) SH> > SH> > 8388648 343263200 2 cache2 (164G) SH> > SH> > 351651848 7 - free - (3.5K) SH> > SH> > SH> > SH> > SH> > SH> > Any hypothesis what alse we can test/try etc? SH> > SH> > SH> > SH> > SH> > SH> > SH> > SH> > Steven Hartland wrote: SH> > SH> > SH> Correct. SH> > SH> > SH> ----- Original Message ----- SH> > SH> > SH> From: "Vitalij Satanivskij" SH> > SH> > SH> SH> > SH> > SH> SH> > SH> > SH> > Just to be sure I understand you clearly, I need to test next configuration: SH> > SH> > SH> > SH> > SH> > SH> > 1) System with ashift patch eg. just latest stable/10 revision SH> > SH> > SH> > 2) vfs.zfs.trim.enabled=0 in /boot/loader.conf SH> > SH> > SH> > SH> > SH> > SH> > So realy only diferens in default system configuration is disabled trim functional ? SH> > SH> > SH> > SH> > SH> > SH> > SH> > SH> > SH> > SH> > SH> > SH> > Steven Hartland wrote: SH> > SH> > SH> > SH> Still worth testing with the problem version installed but SH> > SH> > SH> > SH> with trim disabled to see if that clears the issues, if SH> > SH> > SH> > SH> nothing else it will confirm / deny if trim is involved. SH> > SH> > SH> SH> > SH> > SH> SH> > SH> > SH> ================================================ SH> > SH> > SH> This e.mail is private and confidential between Multiplay (UK) Ltd. and the person or entity to whom it is addressed. SH> > In the SH> > SH> > event of misdirection, the recipient is prohibited from using, copying, printing or otherwise disseminating it or any SH> > SH> > information contained in it. SH> > SH> > SH> SH> > SH> > SH> In the event of misdirection, illegible or incomplete transmission please telephone +44 845 868 1337 SH> > SH> > SH> or return the E.mail to postmaster@multiplay.co.uk. SH> > SH> > SH> SH> > SH> > SH> _______________________________________________ SH> > SH> > SH> freebsd-current@freebsd.org mailing list SH> > SH> > SH> http://lists.freebsd.org/mailman/listinfo/freebsd-current SH> > SH> > SH> To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org" SH> > SH> > _______________________________________________ SH> > SH> > freebsd-current@freebsd.org mailing list SH> > SH> > http://lists.freebsd.org/mailman/listinfo/freebsd-current SH> > SH> > To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org" SH> > SH> > SH> > SH> SH> > SH> SH> > SH> ================================================ SH> > SH> This e.mail is private and confidential between Multiplay (UK) Ltd. and the person or entity to whom it is addressed. In the SH> > event of misdirection, the recipient is prohibited from using, copying, printing or otherwise disseminating it or any SH> > information contained in it. SH> > SH> SH> > SH> In the event of misdirection, illegible or incomplete transmission please telephone +44 845 868 1337 SH> > SH> or return the E.mail to postmaster@multiplay.co.uk. SH> > SH> SH> > SH> _______________________________________________ SH> > SH> freebsd-current@freebsd.org mailing list SH> > SH> http://lists.freebsd.org/mailman/listinfo/freebsd-current SH> > SH> To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org" SH> > SH> SH> SH> ================================================ SH> 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. SH> SH> In the event of misdirection, illegible or incomplete transmission please telephone +44 845 868 1337 SH> or return the E.mail to postmaster@multiplay.co.uk. SH> SH> _______________________________________________ SH> freebsd-current@freebsd.org mailing list SH> http://lists.freebsd.org/mailman/listinfo/freebsd-current SH> To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org"