From nobody@FreeBSD.org  Mon Mar 28 11:48:25 2011
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 8A4E2106566B
	for <freebsd-gnats-submit@FreeBSD.org>; Mon, 28 Mar 2011 11:48:25 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from red.freebsd.org (red.freebsd.org [IPv6:2001:4f8:fff6::22])
	by mx1.freebsd.org (Postfix) with ESMTP id 5DA788FC14
	for <freebsd-gnats-submit@FreeBSD.org>; Mon, 28 Mar 2011 11:48:25 +0000 (UTC)
Received: from red.freebsd.org (localhost [127.0.0.1])
	by red.freebsd.org (8.14.4/8.14.4) with ESMTP id p2SBmPbL090181
	for <freebsd-gnats-submit@FreeBSD.org>; Mon, 28 Mar 2011 11:48:25 GMT
	(envelope-from nobody@red.freebsd.org)
Received: (from nobody@localhost)
	by red.freebsd.org (8.14.4/8.14.4/Submit) id p2SBmO9N090180;
	Mon, 28 Mar 2011 11:48:24 GMT
	(envelope-from nobody)
Message-Id: <201103281148.p2SBmO9N090180@red.freebsd.org>
Date: Mon, 28 Mar 2011 11:48:24 GMT
From: "Eugene V. Boontseff" <eugene@home.wdc.spb.ru>
To: freebsd-gnats-submit@FreeBSD.org
Subject: Long "Suspend time" when reading large files from gjournal partion.
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         155994
>Category:       kern
>Synopsis:       [geom] Long "Suspend time" when reading large files from gjournal partion.
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-geom
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Mar 28 11:50:13 UTC 2011
>Closed-Date:    
>Last-Modified:  Mon Apr 04 06:26:16 UTC 2011
>Originator:     Eugene V. Boontseff
>Release:        8.2-RELEASE
>Organization:
>Environment:
FreeBSD mail.wdc.spb.ru 8.2-RELEASE FreeBSD 8.2-RELEASE #7: Sun Mar 20 15:31:47 MSK 2011     root@mail.wdc.spb.ru:/usr/obj/usr/src/sys/EUKERNEL  amd64

Geom name: gjournal 2757859993
ID: 2757859993
Providers:
1. Name: aacd0p5.journal
   Mediasize: 498216205824 (464G)
   Sectorsize: 512
   Mode: r1w1e2
Consumers:
1. Name: aacd0p5
   Mediasize: 536870912000 (500G)
   Sectorsize: 512
   Mode: r1w1e1
   Jend: 536870911488
   Jstart: 498216205824
   Role: Data,Journal


>Description:
On FreeBSD 8.2-RELEASE long periods of &#1058;&#1035;Suspend
time&#1058;&#1051; have been detected - tens of seconds - while reading
large files from gjournal partition:

For example:

root@mail [/var/tmp]# du -h /var/tmp/access.log

8.3G /var/tmp/access.log

root@mail[/var/tmp]# dd if=/var/tmp/access.log of=/dev/null

17417604 +1 records in

17417604 +1 records out

8917813440 bytes transferred in 50.760701 secs (175,683,418 bytes/sec)


root@mail[/var/tmp] # grep \/var/var/log/messages
..
Mar 27 14:48:08 mail kernel: GEOM_JOURNAL [1]: Suspend time of /var: 0.018053s

Mar 27 14:48:18 mail kernel: GEOM_JOURNAL [1]: Msync time of /var: 0.020182s

Mar 27 14:49:03 mail kernel: GEOM_JOURNAL [1]: Sync time of /var: 0.022150s

Mar 27 14:49:03 mail kernel: GEOM_JOURNAL [1]: Suspend time of /var: 45.187463s

^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Mar 27 14:49:13 mail kernel: GEOM_JOURNAL [1]: Msync time of /var: 0.014821s

Mar 27 14:49:13 mail kernel: GEOM_JOURNAL [1]: Sync time of /var: 0.017499s

Mar 27 14:49:13 mail kernel: GEOM_JOURNAL [1]: Suspend time of /var: 0.016974s

..

At the time when &#1058;&#1035;Suspend time&#1058;&#1051; = 45.187463s,
all operations on the disk (gjournal partition) are blocked. All processes
(htttp, squid, sshd, pop3d, imapd, and even login) are waiting for the
expiration of this time. And only after that continue to operate normally.

This does not happen if not only read but also simultaneously write to
the partition with gjournal.  (dd if=/var/tmp/access.log of=/var/tmp/a.log
or cp /var/tmp /access.log /var/spool/uucppublic)

Partion with gjournal is located on a hardware RAID 10 - driver aac.

I put a ordinary sata disk in the computer and create a gjournal partition
on it.  On the sata drive it worked fine.

So I guess that the problem is in the aac driver.


>How-To-Repeat:
Read a large file (size of a few G) from gjournal partition located on
the Adaptec hardware raid (driver aac).  For example:
dd if=/gjournal_partition/big_file of=/dev/null

>Fix:
>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->freebsd-geom 
Responsible-Changed-By: linimon 
Responsible-Changed-When: Mon Apr 4 06:24:37 UTC 2011 
Responsible-Changed-Why:  
reclassify. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=155994 
>Unformatted:
