From owner-freebsd-amd64@FreeBSD.ORG Wed Oct 31 16:21:15 2007 Return-Path: Delivered-To: freebsd-amd64@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 15A2316A479 for ; Wed, 31 Oct 2007 16:21:15 +0000 (UTC) (envelope-from mb@kis.p.lodz.pl) Received: from zly.kis.p.lodz.pl (zly.kis.p.lodz.pl [212.191.89.2]) by mx1.freebsd.org (Postfix) with ESMTP id A66F713C4B6 for ; Wed, 31 Oct 2007 16:21:14 +0000 (UTC) (envelope-from mb@kis.p.lodz.pl) Received: by zly.kis.p.lodz.pl (Postfix, from userid 58) id 545235C0E4; Wed, 31 Oct 2007 15:26:00 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.2.1 (2007-05-02) on zly.kis.p.lodz.pl X-Spam-Level: X-Spam-Status: No, score=0.1 required=3.5 tests=RDNS_NONE autolearn=disabled version=3.2.1 Received: from localhost (localhost [127.0.0.1]) by zly.kis.p.lodz.pl (Postfix) with ESMTP id 825535C0C7 for ; Wed, 31 Oct 2007 15:25:54 +0100 (CET) X-Virus-Scanned: amavisd-new at kis.p.lodz.pl Received: from zly.kis.p.lodz.pl ([127.0.0.1]) by localhost (zly.kis.p.lodz.pl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id nAVbSnIGiTzl for ; Wed, 31 Oct 2007 15:25:50 +0100 (CET) Received: from student.kis.p.lodz.pl (student.kis.p.lodz.pl [212.191.89.21]) by zly.kis.p.lodz.pl (Postfix) with ESMTP id EB46B5C085 for ; Wed, 31 Oct 2007 15:25:50 +0100 (CET) Received: from [192.168.2.182] (unknown [193.142.243.5]) by student.kis.p.lodz.pl (Postfix) with ESMTP id 37F4E5C9E for ; Wed, 31 Oct 2007 15:23:17 +0100 (CET) Message-ID: <4728906E.8020804@kis.p.lodz.pl> Date: Wed, 31 Oct 2007 15:25:50 +0100 From: Marek Blaszkowski User-Agent: Mozilla Thunderbird 1.0.2 (X11/20070113) X-Accept-Language: pl, en-us, en MIME-Version: 1.0 To: FreeBSD amd64 Content-Type: text/plain; charset=ISO-8859-2 Content-Transfer-Encoding: 7bit Subject: strange i/o and tty lockups/delays on 6.1, strange sync() issue X-BeenThere: freebsd-amd64@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the AMD64 platform List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 Oct 2007 16:21:15 -0000 Hi, my config: thunder k8sr, dual opteron 244, 8GB RAM, FreeBSD 6.1, sata disk for time to time (every 10 or 20 secs) any process which try write or read any, even small file, is locked for a couple seconds (about 7 or 9 secs), very iritating when I try save small files edited in vim (size about 2-3 kbytes), it's looks like this: #vim /path/to/file ...editing.. :w and now (afetr w command) vim freeze for 7-10 secs until it displays "file written". Delays accours on tty, too. In vim I can't move around edited file (up/down in rows), vim just got hang, strange is that I can switch (durning vim lockup) beetwen virtual screen consoles. System is not swapping (4GB ram free), iostat says: #iostat 1 tty ad4 ad6 cpu tin tout KB/t tps MB/s KB/t tps MB/s us ni sy in id 1 353 17.94 45 0.78 0.64 0 0.00 11 1 6 1 82 0 360 16.00 72 1.12 0.00 0 0.00 17 0 2 1 81 0 120 16.00 77 1.20 0.00 0 0.00 6 0 3 1 90 0 120 14.66 73 1.04 0.00 0 0.00 41 0 11 1 47 0 120 16.00 78 1.22 0.00 0 0.00 27 0 1 0 72 0 120 16.22 74 1.17 0.00 0 0.00 0 0 0 0 100 0 122 17.22 79 1.33 0.00 0 0.00 8 1 5 0 85 0 120 16.46 79 1.27 0.00 0 0.00 14 0 3 2 81 0 120 13.85 48 0.65 0.00 0 0.00 7 0 4 0 88 0 120 15.13 79 1.17 0.00 0 0.00 12 0 4 1 83 0 120 11.11 83 0.90 0.00 0 0.00 8 0 3 1 89 as You see, there is no heavy i/o load. Strange things is I have two identical setup of the same system configuration with the same apps running (web server mirror) but other motherboard (K8W), on the second system there no such delay/lockup issue. It's looks like some other process calls sync() on every 7 or 10 seconds and it couse such i/o delay. Other question is why sync takes so much time, when i/o disk performance its not bad (tested with dd is about 50MB/sec) and iostat (durning sync calls) doesn't show any high disk transfers. Example: #time sync real 2m0.853s user 0m0.000s sys 0m0.145s 2 mins was the longest time amount I saw durning tests, in most cases sync takies about 10 secs, when sync was called on the other tty iostat doesn't print any high transfer, never it exceed 1MB/s. Qestion is: if disks transfers (using cp or dd) are high, why sync waits so long ? I played with vfs.write_behind=0 but it doesn't change anything. PS. I checkced motherboards manuals: K8W and K8SR have the same sata chip (Silicon Image SIL3114), so I think above problems are not ata driver issues. regards, -- Marek B.