From owner-freebsd-current@FreeBSD.ORG Thu Jan 4 12:17:57 2007 Return-Path: X-Original-To: current@freebsd.org Delivered-To: freebsd-current@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id CE02416A407 for ; Thu, 4 Jan 2007 12:17:57 +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 A67DF13C465 for ; Thu, 4 Jan 2007 12:17:57 +0000 (UTC) (envelope-from jroberson@chesapeake.net) Received: from [10.0.0.1] (216-160-98-154.tukw.qwest.net [216.160.98.154]) (authenticated bits=0) by webaccess-cl.virtdom.com (8.13.6/8.13.6) with ESMTP id l04CHod6092689 (version=TLSv1/SSLv3 cipher=DHE-DSS-AES256-SHA bits=256 verify=NO) for ; Thu, 4 Jan 2007 07:17:56 -0500 (EST) (envelope-from jroberson@chesapeake.net) Date: Thu, 4 Jan 2007 04:16:28 -0800 (PST) From: Jeff Roberson X-X-Sender: jroberson@10.0.0.1 To: current@freebsd.org In-Reply-To: <20070104005625.D1508@10.0.0.1> Message-ID: <20070104041530.O613@10.0.0.1> References: <20070104005625.D1508@10.0.0.1> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: Subject: Re: ULE 2.0 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: Thu, 04 Jan 2007 12:17:58 -0000 Some last minute inspiration has the nice response looking much more favorable. This will be the last of my changes until I have some feedback. Thanks, Jeff On Thu, 4 Jan 2007, Jeff Roberson wrote: > Hello everyone, > > After a considerable vacation from ULE I have come back to address some long > standing concerns. I felt that the old double-queue mechanism caused very > unnatural behavior and have finally come up with something I'm happy to > replace it with. I've been working on this off and on for several months > now. Some details are below. More are at: > http://jeffr-tech.livejournal.com/3729.html > > The version now in CVS(1.172) should restore ULE's earlier interactive > performance under load. I have tested with a make -j128 kernel while using > mozilla and while playing a dvd. Neither ever skip for me. nice now has a > more gradual effect than before. It no longer allows the total starvation of > processes. ULE should also be very slightly faster on UP as compared to > before. SMP behavior should have changed very little although I did simplify > some small parts of these algorithms. In general, non-interactive tasks are > scheduled much more intelligently although this may not be apparent under > most workloads. > > I'm hoping for the following types of feedback from anyone interested in > testing: > > 1) Is the response to nice levels as you would hope? I think nice +20 may > not inhibit the nice'd thread enough at the moment. > 2) Is the interactive performance satisfactory? > 3) Is there any performance degredation for your common tasks? > 4) Does the cpu estimator give reasonable results? See %cpu in top. It is > expected that there will be periods where summing up all threads will yield > slightly over 100% cpu. > > Any and all feedback is welcome. Please make sure any problem reports are > sent to jroberson@chesapeake.net in the to line so I see them more quickly. > > Thanks, > Jeff > > ---------- Forwarded message ---------- > Date: Thu, 4 Jan 2007 08:56:25 +0000 (UTC) > From: Jeff Roberson > To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org > Subject: cvs commit: src/sys/kern sched_ule.c > > jeff 2007-01-04 08:56:25 UTC > > FreeBSD src repository > > Modified files: > sys/kern sched_ule.c > Log: > ULE 2.0: > - Remove the double queue mechanism for timeshare threads. It was slow > due to excess cache lines in play, caused suboptimal scheduling behavior > with niced and other non-interactive processes, complicated priority > lending, etc. > - Use a circular queue with a floating starting index for timeshare > threads. > Enforces fairness by moving the insertion point closer to threads with > worse priorities over time. > - Give interactive timeshare threads real-time user-space priorities and > place them on the realtime/ithd queue. > - Select non-interactive timeshare thread priorities based on their cpu > utilization over the last 10 seconds combined with the nice value. This > gives us more sane priorities and behavior in a loaded system as > compared to the old method of using the interactivity score. The > interactive score quickly hit a ceiling if threads were non-interactive > and penalized new hog threads. > - Use one slice size for all threads. The slice is not currently > dynamically set to adjust scheduling behavior of different threads. > - Add some new sysctls for scheduling parameters. > > Bug fixes/Clean up: > - Fix zeroing of td_sched after initialization in sched_fork_thread() > caused > by recent ksegrp removal. > - Fix KSE interactivity issues related to frequent forking and exiting of > kse threads. We simply disable the penalty for thread creation and exit > for kse threads. > - Cleanup the cpu estimator by using tickincr here as well. Keep ticks > and > ltick/ftick in the same frequency. Previously ticks were stathz and > others were hz. > - Lots of new and updated comments. > - Many many others. > > Tested on: up x86/amd64, 8way amd64. > > Revision Changes Path > 1.172 +332 -412 src/sys/kern/sched_ule.c > _______________________________________________ > freebsd-current@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-current > To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org" >