From owner-freebsd-current@FreeBSD.ORG Tue Sep 14 15:31:52 2004 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6000216A4CE for ; Tue, 14 Sep 2004 15:31:52 +0000 (GMT) Received: from mail.efacilitas.de (efacilitas.de [213.133.110.227]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8C52843D3F for ; Tue, 14 Sep 2004 15:31:51 +0000 (GMT) (envelope-from bkoenig@cs.tu-berlin.de) Received: from hoppel.local (port-212-202-38-171.dynamic.qsc.de [212.202.38.171]) by mail.efacilitas.de (Postfix) with ESMTP id 822A8123D80 for ; Tue, 14 Sep 2004 17:30:47 +0200 (CEST) Received: from [192.168.1.2] (alpha.local [192.168.1.2]) by hoppel.local (Postfix) with ESMTP id 239A5630A for ; Tue, 14 Sep 2004 17:31:44 +0200 (CEST) Message-ID: <41472B5A.20403@cs.tu-berlin.de> Date: Tue, 14 Sep 2004 17:33:14 +0000 From: =?ISO-8859-1?Q?Bj=F6rn_K=F6nig?= User-Agent: Mozilla Thunderbird 0.7.3 (X11/20040912) X-Accept-Language: en-us, en MIME-Version: 1.0 To: freebsd-current@freebsd.org Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit Subject: half write performance, half cpu load X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 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: Tue, 14 Sep 2004 15:31:52 -0000 Hello, I recently reported that write operations to my hard disk were too slow. I compared only to FreeBSD 4.10, because I thought it is an issue with ATAng, but I was wrong. I installed FreeBSD 5.2.1 and noticed that everything works fine. Once again I built kernels with profiling, tested my hard disk and tried to analyse the data. I'm sure that I understand the numbers, and I stepped into the kernel source code, recompiled an adjusted kernel again and again, but I can't get any conclusion what's going wrong; most likely because of I'm not a FreeBSD kernel developer and don't understand lot of code which deals with hardware. So I like to refer again to some very similar kernel profiling results of a FreeBSD 5.2.1-RELEASE-p9 and a recent 5.3-BETA4. I made three benchmarks on each system. I used exactly the same kernel configuration with both kernels. I made them both with config -pp && ../compile/ && make depend && make I made the 'dd' tests (writing 256k 4k-blocks = 1G) in single-user mode on the exactly the same, identical ufs2 partition on hard disk. There you'll find everything, results, kernel config, benchmark shell skript: http://www.alpha-tierchen.de/dateien/kernprof/ A short summary and little analysis of profiling: kernel version: 5.2.1 5.3 runtime of test (seconds): 37.25 88.65 write perf. with profiling (MB/s): 27.49 11.55 write perf. without prof. (MB/s): ~35 ~13 The data doesn't show any weird behaviour of the ata driver's functions; no excessive calls. Far from it! The ata functions are little faster than in 5.2.1 (good work, Søren Schmidt). But where's the difference? Please have a look at Xatpic_intr0 and Xatpic_intr8. They are called twice as often. The second hint is that ad_done and its descendents take too much time. I'm really clouded. Regards Björn P.S.: For people who didn't get it last time I bothered with my problem: it is an ST380021A/3.19 with ICH2 controller and i815EP chipset. Write cache (hw.ata.wc) and dma (hw.ata.ata_dma) are activated. atacontrol shows UDMA100.