Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 17 Oct 2007 11:12:01 +0300
From:      Andriy Gapon <avg@icyb.net.ua>
To:        freebsd-geom@freebsd.org
Cc:        Pawel Jakub Dawidek <pjd@FreeBSD.org>
Subject:   gjournal: FLUSHCACHE timed out
Message-ID:  <4715C3D1.3070308@icyb.net.ua>

next in thread | raw e-mail | index | archive | help

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 <WDC WD3000JS-19PDB0 21.00M21> at ata2-master SATA300

$ dmesg | fgrep -B1 ata2 | head -2
atapci1: <nVidia nForce MCP51 SATA300 controller> port
0x9f0-0x9f7,0xbf0-0xbf3,0x970-0x977,0xb70-0xb73,0xe000-0xe00f mem
0xfe02d000-0xfe02dfff irq 20 at device 14.0 on pci0
ata2: <ATA channel 0> 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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4715C3D1.3070308>