From owner-freebsd-arch@FreeBSD.ORG Sun Aug 5 19:29:40 2007 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6AED016A46C for ; Sun, 5 Aug 2007 19:29:40 +0000 (UTC) (envelope-from ivoras@geri.cc.fer.hr) Received: from geri.cc.fer.hr (geri.cc.fer.hr [161.53.72.121]) by mx1.freebsd.org (Postfix) with ESMTP id E5B3B13C4CE for ; Sun, 5 Aug 2007 19:29:39 +0000 (UTC) (envelope-from ivoras@geri.cc.fer.hr) Received: from geri.cc.fer.hr (localhost.cc.fer.hr [127.0.0.1]) by geri.cc.fer.hr (8.13.8/8.13.8) with ESMTP id l75IqBJb043873; Sun, 5 Aug 2007 20:52:11 +0200 (CEST) (envelope-from ivoras@geri.cc.fer.hr) Received: from localhost (ivoras@localhost) by geri.cc.fer.hr (8.13.8/8.13.8/Submit) with ESMTP id l75Iq2b3043863; Sun, 5 Aug 2007 20:52:06 +0200 (CEST) (envelope-from ivoras@geri.cc.fer.hr) Date: Sun, 5 Aug 2007 20:52:02 +0200 (CEST) From: Ivan Voras To: Jeff Roberson In-Reply-To: <20070803034628.U561@10.0.0.1> Message-ID: <20070805204321.H43187@geri.cc.fer.hr> References: <46B1C69D.6070503@cytexbg.com> <20070802181239.O561@10.0.0.1> <20070803034628.U561@10.0.0.1> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-3.0 (geri.cc.fer.hr [127.0.0.1]); Sun, 05 Aug 2007 20:52:11 +0200 (CEST) Cc: Niki Denev , Ivan Voras , freebsd-arch@freebsd.org Subject: Re: On schedulers X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 05 Aug 2007 19:29:40 -0000 On Fri, 3 Aug 2007, Jeff Roberson wrote: > On Thu, 2 Aug 2007, Jeff Roberson wrote: > >> On Thu, 2 Aug 2007, Niki Denev wrote: >> >>> Both idle and glxgears are run as normal user. >> >> Can you tell me what % cpu is going to each process during this time? These >> results are surprising. For workloads like this ULE should essentially >> implement a 'fair' scheduling policy. However, so should 4BSD. So I'm not >> yet sure why the slowdown wouldn't be relative to the number of running >> threads. Also, 'vmstat 1' output would be useful. I'm glad this discussion is happening, but: - I wasn't really interested in 3D performance, but mostly in if there's theoretical modelling of how ULE should perform, and/or its comparison to Linux (e.g. elaboration of what 'fair' means for ULE). - People who know (meaning those who work with or develop X11) say that glxgears is awful for testing graphical performance. I don't know exactly why is that, but I've seen widely varying results from glxgears on related mailing lists that seem to confirm this. From personal experience I've seen glxgears "topping out" with much idle CPU left, both extremely high and extremely low results from it on hardware that shouldn't behave like that, so I agree with this. Quake should be much better for benchmarking :) From owner-freebsd-arch@FreeBSD.ORG Mon Aug 6 14:27:31 2007 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2132916A417 for ; Mon, 6 Aug 2007 14:27:31 +0000 (UTC) (envelope-from nike_d@cytexbg.com) Received: from office.suresupport.com (office.suresupport.com [213.145.98.15]) by mx1.freebsd.org (Postfix) with SMTP id 6A7A713C4A6 for ; Mon, 6 Aug 2007 14:27:30 +0000 (UTC) (envelope-from nike_d@cytexbg.com) Received: (qmail 55636 invoked from network); 6 Aug 2007 14:00:48 -0000 Received: from 213.145.98.14 by office.suresupport.com (envelope-from , uid 1004) with qmail-scanner-2.01 (clamdscan: 0.88.4/1784. Clear:RC:1(213.145.98.14):. Processed in 0.379032 secs); 06 Aug 2007 14:00:48 -0000 Received: from unknown (HELO ndenev.office.suresupport.com) (213.145.98.14) by office.suresupport.com with SMTP; 6 Aug 2007 14:00:47 -0000 Message-ID: <46B7298F.2030804@cytexbg.com> Date: Mon, 06 Aug 2007 17:00:47 +0300 From: Niki Denev User-Agent: Thunderbird 2.0.0.0 (X11/20070531) MIME-Version: 1.0 To: Ivan Voras References: <46B1C69D.6070503@cytexbg.com> <20070802181239.O561@10.0.0.1> <20070803034628.U561@10.0.0.1> <20070805204321.H43187@geri.cc.fer.hr> In-Reply-To: <20070805204321.H43187@geri.cc.fer.hr> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-arch@freebsd.org Subject: Re: On schedulers X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Aug 2007 14:27:31 -0000 Ivan Voras wrote: > On Fri, 3 Aug 2007, Jeff Roberson wrote: > >> On Thu, 2 Aug 2007, Jeff Roberson wrote: >> >>> On Thu, 2 Aug 2007, Niki Denev wrote: >>> >>>> Both idle and glxgears are run as normal user. >>> >>> Can you tell me what % cpu is going to each process during this >>> time? These results are surprising. For workloads like this ULE >>> should essentially implement a 'fair' scheduling policy. However, >>> so should 4BSD. So I'm not yet sure why the slowdown wouldn't be >>> relative to the number of running threads. Also, 'vmstat 1' output >>> would be useful. > > I'm glad this discussion is happening, but: > > - I wasn't really interested in 3D performance, but mostly in if > there's theoretical modelling of how ULE should perform, and/or its > comparison to Linux (e.g. elaboration of what 'fair' means for ULE). > - People who know (meaning those who work with or develop X11) say > that glxgears is awful for testing graphical performance. I don't know > exactly why is that, but I've seen widely varying results from > glxgears on related mailing lists that seem to confirm this. From > personal experience I've seen glxgears "topping out" with much idle > CPU left, both extremely high and extremely low results from it on > hardware that shouldn't behave like that, so I agree with this. Quake > should be much better for benchmarking :) > > Sorry for my late reply, i was out of town for the weekend. It seems that glxgears really does not give meaningfull results, because after reruning the same tests several times i got very different results. I will try to run the same test again, but with quake this week if time permits. I'm thinking about testing it with and without 3d acceleration. Best Regards, Niki From owner-freebsd-arch@FreeBSD.ORG Mon Aug 6 23:22:11 2007 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 577BF16A417 for ; Mon, 6 Aug 2007 23:22:11 +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 3403713C461 for ; Mon, 6 Aug 2007 23:22:11 +0000 (UTC) (envelope-from jroberson@chesapeake.net) Received: from [192.168.1.101] (c-71-231-138-78.hsd1.or.comcast.net [71.231.138.78]) (authenticated bits=0) by webaccess-cl.virtdom.com (8.13.6/8.13.6) with ESMTP id l76NLqWG096268 (version=TLSv1/SSLv3 cipher=DHE-DSS-AES256-SHA bits=256 verify=NO); Mon, 6 Aug 2007 19:21:55 -0400 (EDT) (envelope-from jroberson@chesapeake.net) Date: Mon, 6 Aug 2007 16:24:17 -0700 (PDT) From: Jeff Roberson X-X-Sender: jroberson@10.0.0.1 To: Ivan Voras In-Reply-To: <20070805204321.H43187@geri.cc.fer.hr> Message-ID: <20070806161140.K561@10.0.0.1> References: <46B1C69D.6070503@cytexbg.com> <20070802181239.O561@10.0.0.1> <20070803034628.U561@10.0.0.1> <20070805204321.H43187@geri.cc.fer.hr> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: Niki Denev , Ivan Voras , freebsd-arch@freebsd.org Subject: Re: On schedulers X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Aug 2007 23:22:11 -0000 On Sun, 5 Aug 2007, Ivan Voras wrote: > On Fri, 3 Aug 2007, Jeff Roberson wrote: > >> On Thu, 2 Aug 2007, Jeff Roberson wrote: >> >>> On Thu, 2 Aug 2007, Niki Denev wrote: >>> >>>> Both idle and glxgears are run as normal user. >>> >>> Can you tell me what % cpu is going to each process during this time? >>> These results are surprising. For workloads like this ULE should >>> essentially implement a 'fair' scheduling policy. However, so should >>> 4BSD. So I'm not yet sure why the slowdown wouldn't be relative to the >>> number of running threads. Also, 'vmstat 1' output would be useful. > > I'm glad this discussion is happening, but: > > - I wasn't really interested in 3D performance, but mostly in if there's > theoretical modelling of how ULE should perform, and/or its comparison to > Linux (e.g. elaboration of what 'fair' means for ULE). Well you have to put these discussions of 'completely fair' schedulers in the proper context. By the CFS definition, 4BSD is 'completely fair'. That is it attempts to give all processes an equal fraction of the CPU within a given period (ignoring nice). ULE essentially splits timesharing into two classes seperated by a tunable interactivity heuristic. If a thread is not determined to be interactive it is scheduled fairly with all other threads. If it is, it gets something more similar to a real-time priority, however still with 100ms slices. An interactive task which uses too much CPU will be bounced back to split time evenly. Interactive tasks are scheduled 'fairly' relative to each other. That is, they will split CPU fairly among themselves as long as they remain interactive. The interactive heuristic is simple. Fairness is determined by a history of runtime in 4BSD, ULE, and CFS. In ULE we keep track seperately of voluntary sleep time vs runtime. Voluntary sleeptime does not account for time waiting on the run-queue. This simple heuristic seems to work out well for ULE even with short bursts of activity for otherwise idling threads (ie rendering a page in firefox). The first heuristic is really %cpu over the last N seconds, the second is runtime/sleeptime over the last Y seconds. The one potential problem is that many 'interactive' tasks could starve non-interactive tasks for CPU time. In this case you can tune down the interactivity threshold, or it could be disabled all together, giving results similar to 4BSD/CFS. See kern.sched.interact. > - People who know (meaning those who work with or develop X11) say that > glxgears is awful for testing graphical performance. I don't know exactly why > is that, but I've seen widely varying results from glxgears on related > mailing lists that seem to confirm this. From personal experience I've seen > glxgears "topping out" with much idle CPU left, both extremely high and > extremely low results from it on hardware that shouldn't behave like that, so > I agree with this. Quake should be much better for benchmarking :) > Yes, I'd be interested in seeing an apples to apples comparison with quake. Although I don't know how our hardware 3d support compares to Linux. I have done some comparisons myself. For example; running a -j32 compile while watching a movie and using a webbrowser on a single processor laptop yields no lag in the movie or browser for me with ULE. With linux I find the system mostly unusable. This is completely unscientific however. Thanks, Jeff From owner-freebsd-arch@FreeBSD.ORG Tue Aug 7 08:55:42 2007 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EEF9416A419 for ; Tue, 7 Aug 2007 08:55:42 +0000 (UTC) (envelope-from nike_d@cytexbg.com) Received: from mail.interbgc.com (mx04.interbgc.com [217.9.224.231]) by mx1.freebsd.org (Postfix) with SMTP id 3B63A13C49D for ; Tue, 7 Aug 2007 08:55:41 +0000 (UTC) (envelope-from nike_d@cytexbg.com) Received: (qmail 55310 invoked from network); 7 Aug 2007 08:55:39 -0000 Received: from nike_d@cytexbg.com by keeper.interbgc.com by uid 1002 with qmail-scanner-1.14 (uvscan: v4.2.40/v4374. spamassassin: 2.63. Clear:SA:0(-2.6/8.0):. Processed in 1.581754 secs); 07 Aug 2007 08:55:39 -0000 X-Spam-Status: No, hits=-2.6 required=8.0 Received: from unknown (HELO ndenev.totalterror.net) (85.130.16.146) by mx04.interbgc.com with SMTP; 7 Aug 2007 08:55:38 -0000 Received: (qmail 73544 invoked from network); 7 Aug 2007 11:23:50 +0300 Received: from unknown (HELO ?127.0.0.1?) (127.0.0.1) by ndenev.totalterror.net with SMTP; 7 Aug 2007 11:23:50 +0300 Message-ID: <46B82C16.8040106@cytexbg.com> Date: Tue, 07 Aug 2007 11:23:50 +0300 From: Niki Denev User-Agent: Thunderbird 1.5.0.10 (X11/20070326) MIME-Version: 1.0 To: Jeff Roberson References: <46B1C69D.6070503@cytexbg.com> <20070802181239.O561@10.0.0.1> <20070803034628.U561@10.0.0.1> <20070805204321.H43187@geri.cc.fer.hr> <20070806161140.K561@10.0.0.1> In-Reply-To: <20070806161140.K561@10.0.0.1> X-Enigmail-Version: 0.94.3.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: freebsd-arch@freebsd.org, Ivan Voras Subject: Re: On schedulers X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 Aug 2007 08:55:43 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Jeff Roberson wrote: > Yes, I'd be interested in seeing an apples to apples comparison with > quake. Although I don't know how our hardware 3d support compares to > Linux. I have done some comparisons myself. For example; running a > -j32 compile while watching a movie and using a webbrowser on a single > processor laptop yields no lag in the movie or browser for me with ULE. > With linux I find the system mostly unusable. This is completely > unscientific however. > > Thanks, > Jeff I did a quick test using the linux-quake3-demo port, on the same c2d machine with SMP and ULE enabled kernel. I've run the demo001.dem demo file three times in a row, with timedemo option set to 1, and calculated the averages. Here are the results: SMP kernel with SCHED_ULE 0 idle processes : 335 fps 1 idle process : 335 fps 2 idle processes : 293 fps 3 idle processes : 295 fps 4 idle processes : 250 fps 5 idle processes : 200 fps 6 idle processes : 142 fps Overall, it looks pretty impressive to me. I've yet had to rerun the tests including 4BSD and UP kernels, and more clean environment (no unrelated background activity/processes). One thing that i did notice was that above 2 background processes there was noticeable choppyness of the intro movie of the game, and the levels did load much slower, but i attribute this to the scheduler considering the task as non-interactive during this time. It is also strange that with 3 background processes the game reported better fps than with 2, but the difference is too small to mean anything. P.S.: I've wanted to test the game with software 3d rendering, but it seems that it is not available. Maybe i'll test with quake1 and quake2 ports because afaik they have such mode. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (FreeBSD) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFGuCwWHNAJ/fLbfrkRAt9eAJ9q4g6zMRxcCJO3l/zPuqiLlvyx1wCgxYM6 9a2lXCwoUjfT0uCJ0Ew6ROs= =45JC -----END PGP SIGNATURE----- From owner-freebsd-arch@FreeBSD.ORG Wed Aug 8 23:30:16 2007 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5D54F16A418 for ; Wed, 8 Aug 2007 23:30:16 +0000 (UTC) (envelope-from freebsd-arch@m.gmane.org) Received: from ciao.gmane.org (main.gmane.org [80.91.229.2]) by mx1.freebsd.org (Postfix) with ESMTP id 1630713C45B for ; Wed, 8 Aug 2007 23:30:15 +0000 (UTC) (envelope-from freebsd-arch@m.gmane.org) Received: from list by ciao.gmane.org with local (Exim 4.43) id 1IIuyh-0003pU-RH for freebsd-arch@freebsd.org; Thu, 09 Aug 2007 01:30:11 +0200 Received: from 78-1-127-29.adsl.net.t-com.hr ([78.1.127.29]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 09 Aug 2007 01:30:11 +0200 Received: from ivoras by 78-1-127-29.adsl.net.t-com.hr with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 09 Aug 2007 01:30:11 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: freebsd-arch@freebsd.org From: Ivan Voras Date: Thu, 09 Aug 2007 01:30:02 +0200 Lines: 32 Message-ID: References: <20070702230728.E552@10.0.0.1> <20070703181242.T552@10.0.0.1> <20070704105525.GU45894@elvis.mu.org> <20070704114005.X552@10.0.0.1> <20070729180722.GB85196@rot26.obsecurity.org> <20070802174819.S561@10.0.0.1> <20070803081520.B18327@fledge.watson.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enigD79C80A8657F6F58212B0ED0" X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: 78-1-127-29.adsl.net.t-com.hr User-Agent: Thunderbird 1.5.0.12 (Windows/20070509) In-Reply-To: <20070803081520.B18327@fledge.watson.org> X-Enigmail-Version: 0.94.3.0 Sender: news Subject: Re: Fine grain select locking. X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Aug 2007 23:30:16 -0000 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enigD79C80A8657F6F58212B0ED0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Robert Watson wrote: > As process based parallelism doesn't share the file descriptor table, i= t > shouldn't affect non-threaded workloads such as Apache and pgSQL. This= Apache has multiple threaded modes ("MPM"s) and their use is increasing (one major reason for it is that people have started to move away from in-process PHP and onto fastcgi). --------------enigD79C80A8657F6F58212B0ED0 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.5 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFGulH6ldnAQVacBcgRAidgAJkB7W50VdqSGfagu2BHuxBvFMrZAQCgvtfJ e3HkqgGyUDCV05HdQTaRHhs= =x4WD -----END PGP SIGNATURE----- --------------enigD79C80A8657F6F58212B0ED0--