From owner-freebsd-stable@FreeBSD.ORG Wed Sep 1 15:22:01 2010 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 813231065694 for ; Wed, 1 Sep 2010 15:22:01 +0000 (UTC) (envelope-from freebsd-stable@m.gmane.org) Received: from lo.gmane.org (lo.gmane.org [80.91.229.12]) by mx1.freebsd.org (Postfix) with ESMTP id 0BC218FC16 for ; Wed, 1 Sep 2010 15:22:00 +0000 (UTC) Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1Oqp8O-0005Ea-Kt for freebsd-stable@freebsd.org; Wed, 01 Sep 2010 17:21:56 +0200 Received: from lara.cc.fer.hr ([161.53.72.113]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 01 Sep 2010 17:21:56 +0200 Received: from ivoras by lara.cc.fer.hr with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 01 Sep 2010 17:21:56 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: freebsd-stable@freebsd.org From: Ivan Voras Date: Wed, 01 Sep 2010 17:21:47 +0200 Lines: 47 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: lara.cc.fer.hr User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-US; rv:1.9.1.9) Gecko/20100518 Thunderbird/3.0.4 In-Reply-To: X-Enigmail-Version: 1.0.1 Subject: Re: Tuning the scheduler? Desktop with a CPU-intensive task becomes rapidly unusable. X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Sep 2010 15:22:01 -0000 On 09/01/10 15:08, jan.grant@bristol.ac.uk wrote: > I'm running -STABLE with a kde-derived desktop. This setup (which is > pretty standard) is providing abysmal interactive performance on an > eight-core machine whenever I try to do anything CPU-intensive (such as > building a port). > > Basically, trying to build anything from ports rapidly renders everything > else so "non-interactive" in the eyes of the scheduler that, for instance, > switching between virtual desktops (I have six of them in reasonably > frequent use) takes about a minute of painful waiting on redraws to > complete. Are you sure this is about the scheduler or maybe bad X11 drivers? > Once I pay attention to any particular window, the scheduler rapidly > (like, in 15 agonising seconds or so) decides that the processes > associated with that particular window are "interactive" and performance > there picks up again. But it only takes 10 seconds (not timed; ballpark > figures) or so of inattention for a window's processes to lapse back into > a low-priority state, with the attendant performance problems. "windows" in X11 have nothing to do with the scheduler (contrary to MS Windows where the OS actually "re-nices" processes whose windows have focus) - here you are just interacting with a process. > I don't think my desktop usage is particularly abnormal; I doubt my level > of frustration is, either :-) I think the issue here is that a modern I'm writing this on a quad-core Core2 machine with 4 GB RAM, amd64 arch, Radeon 2500 HD, with KDE4 with most of the 3D visual effects turned on. I have not yet experienced problems like you describe. On the other hand, I have noticed that a 2xQuad-core machine I have access too has more X11 interactivity problems than this single quad-core machine, though again not as serious as yours. I don't know why this is. From the hardware side it might be the shared FSB or from the software side it might be the scheduler. If you want to try something I think it's easier for you to disable one CPU in BIOS or pin X.org and its descendant processes to CPUs of a single socket than to diagnose scheduler problems. > but compared to the performance under sched_4bsd, what I'm seeing is an > atrocious user experience. It would be best if you could quantify this in some way. I have no idea how.