From owner-freebsd-geom@FreeBSD.ORG Wed Oct 17 08:12:06 2007 Return-Path: Delivered-To: freebsd-geom@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B415016A419 for ; Wed, 17 Oct 2007 08:12:06 +0000 (UTC) (envelope-from avg@icyb.net.ua) Received: from falcon.cybervisiontech.com (falcon.cybervisiontech.com [217.20.163.9]) by mx1.freebsd.org (Postfix) with ESMTP id 35D2613C458 for ; Wed, 17 Oct 2007 08:12:05 +0000 (UTC) (envelope-from avg@icyb.net.ua) Received: from localhost (localhost [127.0.0.1]) by falcon.cybervisiontech.com (Postfix) with ESMTP id 7854843C315; Wed, 17 Oct 2007 11:12:02 +0300 (EEST) X-Virus-Scanned: Debian amavisd-new at falcon.cybervisiontech.com Received: from falcon.cybervisiontech.com ([127.0.0.1]) by localhost (falcon.cybervisiontech.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id w1QngMTGcRYH; Wed, 17 Oct 2007 11:12:02 +0300 (EEST) Received: from [10.2.1.87] (gateway.cybervisiontech.com.ua [88.81.251.18]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by falcon.cybervisiontech.com (Postfix) with ESMTP id E449743C28E; Wed, 17 Oct 2007 11:12:01 +0300 (EEST) Message-ID: <4715C3D1.3070308@icyb.net.ua> Date: Wed, 17 Oct 2007 11:12:01 +0300 From: Andriy Gapon User-Agent: Thunderbird 2.0.0.6 (X11/20070803) MIME-Version: 1.0 To: freebsd-geom@freebsd.org Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: Pawel Jakub Dawidek Subject: gjournal: FLUSHCACHE timed out X-BeenThere: freebsd-geom@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: GEOM-specific discussions and implementations List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Oct 2007 08:12:06 -0000 Couple of days ago I started using gjournal on FreeBSD 6.2 using a patch from here: http://people.freebsd.org/~pjd/patches/gjournal6.patch I actually had to make 4 minor and obvious tweaks to the patch to make it apply cleanly to my src. I started to get the following messages sometimes: kernel: ad4: FAILURE - FLUSHCACHE timed out kernel: GEOM_JOURNAL: Flush cache of ad4s1ge: error=5. kernel: ad4: FAILURE - FLUSHCACHE timed out kernel: GEOM_JOURNAL: Flush cache of ad4s1ge: error=5. kernel: ad4: FAILURE - FLUSHCACHE timed out kernel: GEOM_JOURNAL: Flush cache of ad4s1ge: error=5. vvvvvvvvv this one is unusual and is found only once kernel: handle_workitem_freeblocks: block count ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ kernel: ad4: FAILURE - FLUSHCACHE timed out kernel: GEOM_JOURNAL: Flush cache of ad4s1ge: error=5. kernel: ad4: FAILURE - FLUSHCACHE timed out kernel: GEOM_JOURNAL: Flush cache of ad4s1ge: error=5. kernel: ad4: FAILURE - FLUSHCACHE timed out kernel: GEOM_JOURNAL: Flush cache of ad4s1ge: error=5. kernel: ad4: FAILURE - FLUSHCACHE timed out kernel: GEOM_JOURNAL: Flush cache of ad4s1ge: error=5. kernel: ad4: FAILURE - FLUSHCACHE timed out kernel: GEOM_JOURNAL: Flush cache of ad4s1ge: error=5. kernel: ad4: FAILURE - FLUSHCACHE timed out kernel: GEOM_JOURNAL: Flush cache of ad4s1ge: error=5. ad4s1ge (please don't pay attention to its slightly unusual name, this is for historic reasons) is a journal partition/consumer for my /var filesystem/partition/provider. Size of /var is 16G, size of the journal is slightly less than 1G (1G - 32 sectors actually). /var is UFS2 with softupdates enabled. I noticed that I get these messages only when I run 'dump' on any of my filesystems. I think that dump is using /tmp or /var/tmp for some temporary data and in my setup both of those are in /var filesystem. So my I guess is that /var is being written "too" actively and I have to tune some parameters to make things smooth. More information: $ uname -srm FreeBSD 6.2-RELEASE-p6 amd64 $ sysctl -a | fgrep journal kern.geom.journal.debug: 0 kern.geom.journal.switch_time: 10 kern.geom.journal.parallel_flushes: 16 kern.geom.journal.accept_immediately: 64 kern.geom.journal.parallel_copies: 16 kern.geom.journal.record_entries: 20 kern.geom.journal.optimize: 0 kern.geom.journal.cache.used: 16384 kern.geom.journal.cache.limit: 209715200 kern.geom.journal.cache.divisor: 2 kern.geom.journal.cache.switch: 90 kern.geom.journal.cache.misses: 0 kern.geom.journal.cache.alloc_failures: 0 kern.geom.journal.stats.skipped_bytes: 241266688 kern.geom.journal.stats.combined_ios: 62184 kern.geom.journal.stats.switches: 24144 kern.geom.journal.stats.wait_for_copy: 0 kern.geom.journal.stats.low_mem: 287 journal_data 4 18K - 624220 512,2048,4096 $ dmesg | fgrep ad4 | head -1 ad4: 286168MB at ata2-master SATA300 $ dmesg | fgrep -B1 ata2 | head -2 atapci1: port 0x9f0-0x9f7,0xbf0-0xbf3,0x970-0x977,0xb70-0xb73,0xe000-0xe00f mem 0xfe02d000-0xfe02dfff irq 20 at device 14.0 on pci0 ata2: on atapci1 $ geom journal list Geom name: gjournal 4283925943 ID: 4283925943 Providers: 1. Name: ad4s1e.journal Mediasize: 17179868672 (16G) Sectorsize: 512 Mode: r1w1e1 Consumers: 1. Name: ad4s1e Mediasize: 17179869184 (16G) Sectorsize: 512 Mode: r1w1e1 Role: Data 2. Name: ad4s1ge Mediasize: 1073733632 (1.0G) Sectorsize: 512 Mode: r1w1e1 Jend: 1073733120 Jstart: 0 Role: Journal $ mount | fgrep var /dev/ad4s1e.journal on /var (ufs, local, soft-updates) $ bsdlabel /dev/ad4s1g | fgrep e: e: 2097136 6291456 swap -- Andriy Gapon