Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 9 Nov 2007 15:02:39 -0800 (PST)
From:      Jeff Roberson <jroberson@chesapeake.net>
To:        Josh Carroll <josh.carroll@gmail.com>
Cc:        freebsd-performance@freebsd.org
Subject:   Re: ULE vs. 4BSD in RELENG_7
Message-ID:  <20071109145827.W639@10.0.0.1>
In-Reply-To: <8cb6106e0711062136r18ca8e67sbdb4d4372e10e086@mail.gmail.com>
References:  <8cb6106e0710230902x4edf2c8eu2d912d5de1f5d4a2@mail.gmail.com> <20071103121921.M544@10.0.0.1> <8cb6106e0711031416l4183e2beueb87fade0d56f504@mail.gmail.com> <20071103133711.Q544@10.0.0.1> <8cb6106e0711032221i2ecf1d59ge82f368d4162a827@mail.gmail.com> <20071104122546.S544@10.0.0.1> <8cb6106e0711041243s37ef92e3i9c5c79827f547dbb@mail.gmail.com> <20071104151722.M544@10.0.0.1> <8cb6106e0711050141g674a7733h53f7e6a20e75ad07@mail.gmail.com> <20071106171059.M544@10.0.0.1> <8cb6106e0711062136r18ca8e67sbdb4d4372e10e086@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help

[-- Attachment #1 --]
On Tue, 6 Nov 2007, Josh Carroll wrote:

>> That's expected due to the fuzzy rounding of 128 / 10, etc.  Can you set
>> slice_min and slice both equal to 7 and see if the numbers come out
>> better than without the patch but with a slice value of 7?  Basically I'm
>> trying to isolate the effects of the different slice handling in this
>> patch from the other changes.
>
> Here are the results. Looks like setting slice_min and slice to 7
> degraded performance for all work loads. Should I try any other
> settings for slice and slice_min?

Josh,  I had an interesting thought today.  What if the reason 4BSD is 
faster is because it distributes load more evenly across all packages 
because it distributes randomly?  ULE distributed across cores evenly but 
not packages.   Can you try the attached patch?  This also turns the 
default slice size down but does not contain the other context switch 
performance improvements.

Thanks,
Jeff

>
> ffmpeg:  1:39.91
>
> sysbench (4, 8, 12, 16 threads respectively):
>
> 2013.78
> 2157.6
> 2175.91
> 2184.16
>
> And buildworld time: 14m7.517s
>
> Thanks!
> Josh
> _______________________________________________
> freebsd-performance@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-performance
> To unsubscribe, send any mail to "freebsd-performance-unsubscribe@freebsd.org"
>
[-- Attachment #2 --]
Index: sched_ule.c
===================================================================
RCS file: /home/ncvs/src/sys/kern/sched_ule.c,v
retrieving revision 1.216
diff -u -r1.216 sched_ule.c
--- sched_ule.c	23 Oct 2007 00:52:24 -0000	1.216
+++ sched_ule.c	9 Nov 2007 23:01:21 -0000
@@ -1105,6 +1105,9 @@
 	 * Look for an idle group.
 	 */
 	CTR1(KTR_ULE, "tdq_idle %X", tdq_idle);
+	cpu = ffs(tdq_idle & 0x5a5a5a5a);
+	if (cpu)
+		return (--cpu);
 	cpu = ffs(tdq_idle);
 	if (cpu)
 		return (--cpu);
@@ -1324,7 +1327,7 @@
 	 * in case which sched_clock() called before sched_initticks().
 	 */
 	realstathz = hz;
-	sched_slice = (realstathz/10);	/* ~100ms */
+	sched_slice = (realstathz/15);
 	tickincr = 1 << SCHED_TICK_SHIFT;
 
 	/* Add thread0's load since it's running. */

Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20071109145827.W639>