From owner-freebsd-current@FreeBSD.ORG Tue Aug 28 20:30:38 2007 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1CE9116A41A; Tue, 28 Aug 2007 20:30:38 +0000 (UTC) (envelope-from jroberson@chesapeake.net) Received: from webaccess-cl.virtdom.com (webaccess-cl.virtdom.com [216.240.101.25]) by mx1.freebsd.org (Postfix) with ESMTP id B00EF13C45E; Tue, 28 Aug 2007 20:30:37 +0000 (UTC) (envelope-from jroberson@chesapeake.net) Received: from [192.168.1.103] (c-67-160-44-208.hsd1.wa.comcast.net [67.160.44.208]) (authenticated bits=0) by webaccess-cl.virtdom.com (8.13.6/8.13.6) with ESMTP id l7SKUX3m053629 (version=TLSv1/SSLv3 cipher=DHE-DSS-AES256-SHA bits=256 verify=NO); Tue, 28 Aug 2007 16:30:34 -0400 (EDT) (envelope-from jroberson@chesapeake.net) Date: Tue, 28 Aug 2007 13:32:55 -0700 (PDT) From: Jeff Roberson X-X-Sender: jroberson@10.0.0.1 To: Kostik Belousov In-Reply-To: <20070828154837.GV2332@deviant.kiev.zoral.com.ua> Message-ID: <20070828132543.O568@10.0.0.1> References: <46D25242.10504@micom.mng.net> <20070827231419.H30469@fledge.watson.org> <20070828044133.GR2332@deviant.kiev.zoral.com.ua> <46D3A90D.8050703@micom.mng.net> <20070828143626.GA32611@admin.opentransfer.com> <20070828154837.GV2332@deviant.kiev.zoral.com.ua> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: "freebsd-current@freebsd.org" Subject: Re: computer becomes slow when compiling something X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 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, 28 Aug 2007 20:30:38 -0000 On Tue, 28 Aug 2007, Kostik Belousov wrote: > On Tue, Aug 28, 2007 at 09:36:26AM -0500, Oleg Nauman wrote: >> On Tue, Aug 28, 2007 at 12:48:13PM +0800, Ganbold wrote: >>> Kostik Belousov wrote: >>>> On Mon, Aug 27, 2007 at 11:14:58PM +0100, Robert Watson wrote: >>>> >>>>> On Mon, 27 Aug 2007, Ganbold wrote: >>>>> >>>>> >>>>>> I'm running FreeBSD 7.0-CURRENT with SCHED_ULE, INVARIANTS, WITNESS >>>>>> enabled kernel. >>>>>> >>>>> Try the same thing again without INVARIANTS and WITNESS, both of which >>>>> can consume a lot of CPU in kernel on a very active system, especially if >>>>> lots of vnodes are being allocated and freed. Especially WITNESS. >>>>> >>>> >>>> It does happens on the kernels without debug options, in particular, >>>> WITNESS and INVARIANTS. >>>> >>>> It happens when a lot of short-lived processes are rapidly created. >>>> Compilation is a good example of such workload; running configure script >>>> is even better. >>>> >>> >>> What would be a solution to this kind of problems? >> >> From my point of view it exhibits some issues with standard SCHED_4BSD >> scheduler in the 7.0 (my laptop is mostly unusable during 'make buildworld' >> for example - keyboard exhibits lost event sometimes, sound is jerking etc etc). >> So I'm switched to SHED_ULE on my UP laptop; it was helpful. I'm running >> custom kernel without debug options though. > > SCHED_ULE also exhibit the behaviour, but in lesser degree. Due to this, > I suspect that the problem in the common code. make -j16 buildworld on my 1.6ghz Pentium M does not disturb firefox or other interactive tasks at all. ULE has specific heuristics that penalize forking parents and return childrens interactivity history to them. This seems to work fairly well in practice. Looking through the other parts of this thread I see a mention of this problem being new between 6.2 and 7-CURRENT. I wonder if it has anything to do with increasing costs of gcc? It is often perceived as system slowdown when we upgrade gcc. It likely consumes more memory than before as well. The other likely culprit is some leftover giant code, especially the sound subsystem is subject to this I believe. schedgraph (/usr/src/tools/sched/schedgraph.py) was created for exactly this purpose, although it only sometimes works on multiprocessor machines due to tsc synchronization issues. It's worth trying however. There are instructions at the top of the file for gathering traces. You may send them to me if you'd like me to look at them. Or you can do some digging and install py-tkinter yourself. Thanks, Jeff > > Jeff, any suggestions ? >