From owner-freebsd-stable@FreeBSD.ORG Tue Aug 6 17:59:49 2013 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 3504D4F3 for ; Tue, 6 Aug 2013 17:59:49 +0000 (UTC) (envelope-from eric@vangyzen.net) Received: from aussmtpmrkpc120.us.dell.com (aussmtpmrkpc120.us.dell.com [143.166.82.159]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id D584D2C97 for ; Tue, 6 Aug 2013 17:59:48 +0000 (UTC) X-Loopcount0: from 64.238.244.148 X-IronPort-AV: E=Sophos;i="4.89,827,1367989200"; d="scan'208";a="39157659" Message-ID: <52013992.4050101@vangyzen.net> Date: Tue, 6 Aug 2013 12:59:46 -0500 From: Eric van Gyzen User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:17.0) Gecko/20130702 Thunderbird/17.0.7 MIME-Version: 1.0 To: dave@mischler.com Subject: Re: unexpected idprio 31 behavior on 9.2-BETA2 and 9.2-RC1 References: <1375737316.96778.10.camel@firkin.mischler.com> <520116DE.8030305@vangyzen.net> In-Reply-To: <520116DE.8030305@vangyzen.net> Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 7bit Cc: freebsd-stable@freebsd.org X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Aug 2013 17:59:49 -0000 On 08/06/2013 10:31, Eric van Gyzen wrote: > On 08/05/2013 16:15, Dave Mischler wrote: >> I have an i5-2500 machine 8GB RAM now running 9.2-RC1 amd64 with the >> GENERIC kernel. Today, while still running 9.2-BETA2, I updated my >> source tree and started building world with idprio 31 and I looked back >> a while later and all the CPU cores and disk were essentially idle, and >> hardly any progress had been made on the build. I stopped and restarted >> the build without the idle priority setting and it ran fine. Anybody >> else seen any of this? Anybody know about any fairly recent changes that >> might account for it? >> >> I did a "rm -rf /usr/src /usr/obj" and loaded a new source tree before >> going to RC1. I still see odd behavior at RC1. Sometimes it works just >> like it should (i.e. compute bound processes use most/all of the >> available CPU time), but a lot of the time both the CPU and disk are >> idle (e.g. CPU 97.8% idle, disk 1% busy per systat). I don't think I >> ever saw this behavior before while running "make buildworld -j4". Can >> anyone else confirm/rebut my findings? Thanks. > I can confirm your findings, on 9.1-RELEASE-p5 amd64 GENERIC. > > I ran > > $ idprio 31 make buildworld buildkernel > /tmp/build.log 2>&1 < > /dev/null & > > on an otherwise idle amd64 system with 4 CPUs. The first command in the > build.log file: > > rm -rf /usr/obj/home/freebsd/tmp > > took over three minutes. It should have taken about three /seconds/. > > "uptime" reported a load average of around 1.00. > "top" showed no threads (user or kernel) using CPU. > "iostat" showed an average of less than 20 tps on ada0. > "rm" was usually in the RUN state. > > /home/freebsd (src) is UFS+SUJ. > /usr/obj is UFS+SU. > /tmp/build.log is tmpfs. > > Both UFS file systems are on ada0: > > ada0 at ata2 bus 0 scbus2 target 0 lun 0 > ada0: ATA-8 SATA 2.x device > ata2: at channel 0 on atapci0 > atapci0: > > CPU: Intel(R) Xeon(R) CPU X3430 @ 2.40GHz (2394.04-MHz > K8-class CPU) > real memory = 8589934592 (8192 MB) > FreeBSD/SMP: Multiprocessor System Detected: 4 CPUs > FreeBSD/SMP: 1 package(s) x 4 core(s) > > FreeBSD 9.1-RELEASE-p5 #0 r+94f2ad5: Tue Aug 6 09:40:22 CDT 2013 > root@srv5:/usr/obj/home/freebsd/sys/GENERIC amd64 > > /boot/loader.conf contains: > > console="comconsole vidconsole" > comconsole_speed="115200" > comconsole_port="0x2f8" > > /etc/sysctl.conf is empty. > > I'll update to releng/9.2 and try again. I see more-or-less the same behavior on 9.2-RC1 (r253912). It seems to be faster than 9.1, but it's still much slower than I would expect. idprio 30 is much, much faster than 31. It's about as fast as I would expect (for this idle machine). So, the problem seems to affect only idprio 31. (Off-by-one / fencepost problem?) CPU-bound processes, such as c++, seem to run at the normal speeds, so the problem seems to affect system- or I/O-bound work. Can anyone try this on a 9.0-RELEASE system? Eric