Follow Slashdot stories on Twitter

 



Forgot your password?
typodupeerror
×
Programming Software Linux IT Technology Entertainment Games

The Completely Fair Scheduler's Impact On Games 315

eldavojohn writes "We've heard a bit about the completely fair scheduler previously, but now Kernel Trap looks at the implications this new scheduler has for 3D games in Linux. Linus Torvalds noted, 'I don't think any scheduler is perfect, and almost all of the time, the RightAnswer(tm) ends up being not one or the other, but somewhere in between. But at the same time, no technical decision is ever written in stone. It's all a balancing act. I've replaced the scheduler before, I'm 100% sure we'll replace it again. Schedulers are actually not at all that important in the end: they are a very very small detail in the kernel.' The posts that follow the brief article, reveal that Linus seems quite confident that he made the right choice in his decision to merge CFS with the Linux kernel. One thing's for certain, gaming on Linux can't suffer any more setbacks or it may be many years before we see FOSS games rival the commercial world."
This discussion has been archived. No new comments can be posted.

The Completely Fair Scheduler's Impact On Games

Comments Filter:
  • by RailGunner ( 554645 ) * on Tuesday July 31, 2007 @12:19PM (#20058893) Journal
    Funny, in the article those framerates for Quake III show CFS beating the pants off of SD.

    Besides, the biggest barrier to 3d games in Linux is video card drivers (ATI, I'm looking at you!) as 3D drivers in Linux, even the proprietary ones, have tended to be unstable.

    Linus is right one this one, the scheduler is a small part.
  • by Aladrin ( 926209 ) on Tuesday July 31, 2007 @12:21PM (#20058917)
    Yeah, I was just gonna post 'Long story short: CFS is better. -yawn-'

    Why not just say that, instead of trying to get a bunch of ./ers to RTFA?
  • by nweaver ( 113078 ) on Tuesday July 31, 2007 @12:23PM (#20058945) Homepage
    This is irrelevant to the gaming front.

    The limit to games on Linux is market share. Its not (much) easier to develop a good 3D game for linux as it is Windows, so why code for 2% of the market when you can code for 92% of the market?

    Thus you will only get games where the developer has gone out of their way to ensure complete portibility and provides a port mostly out of courtousy.

    The scheduler details are irrelevant for this: what Linux Games need is 10%+ marketshare on the desktop.
  • Should it matter? (Score:3, Insightful)

    by Jeremi ( 14640 ) on Tuesday July 31, 2007 @12:25PM (#20058977) Homepage
    I would think that 3D games would be considered a 'real time task' (i.e. you must draw the next frame within 1/30th of a second or else it won't look right), and therefore you would want to run them using the real time scheduler (SCHED_FIFO or SCHED_RR). Given that, it wouldn't much matter what fancy scheduling algorithms the non-real-time tasks were using.... your game would always get the cycles it needs when it needs them (up to to the CPU's capacity, of course).


    Perhaps people just don't want to run their games as root though....

  • by Zironic ( 1112127 ) on Tuesday July 31, 2007 @12:28PM (#20059021)
    Sounds like an evil circle.

    To get Market Share you need games.
    To get Games you need Market Share.
  • by complexmath ( 449417 ) * on Tuesday July 31, 2007 @12:29PM (#20059041)
    The performance of the "patched SD" mentioned near the bottom show SD to be slightly better than CFS on the test system. However, a few FPS one way or the another really amounts to testing "noise" -- it doesn't mean anything. If there are any problems with 3D, it obviously isn't common to all systems, which suggests to me that the scheduler isn't the problem. Not unless the problem systems have some background job running that the others don't, which is messing up CFS in some way (and this seems unlikely).
  • by Azarael ( 896715 ) on Tuesday July 31, 2007 @12:30PM (#20059063) Homepage
    Neither the summary nor the FA did a great job of summarizing the issues. I have a vague idea what the schedulers do, but how many readers know what the differences between SD and CFS are? I don't.

    It's nice to see the commentary from the mailing list, but without a decent explanation of the situation, the posting isn't informative to many people.
  • FPS is a poor measure of the feel of a game. I know it's what all the graphics card benchmarks use, and it does do a good job of measuring the total processor and video card throughput, but that's not the most important thing.

    The most important thing is the time between you pressing a key and the changed game state being reflected on your screen and how consistent that delay is.

    One of the arguments that CK has made about kernel development is that kernel developers have become obsessed with throughput to the exclusion of all else and that this leads to very poor desktop performance because throughput is a poor measure of 'interactivity'. Someone posting 3D game framerates as evidence of one scheduler being better than another is exhibiting exactly this bias.

    IMHO latency is a better measure, but still not perfect and it can be hard to measure in some cases.

    I don't know enough about the scheduler to know which one is better or which one exhibits particular properties. But I can see that the throughput bias is evidenced in force in the thread the article points to.

    And CK is also right that big iron shops care more about overall throughput than any measure of 'interactivity'. IMHO there ought to be some kind of pluggable scheduler system that allows you to completely change the algorithm to reflect the preferred behavior of the computer you're using.

  • Pluggable (Score:5, Insightful)

    by cerelib ( 903469 ) on Tuesday July 31, 2007 @12:35PM (#20059143)
    That is why Linus should have listened to Con Kolivas when he tried to introduce a pluggable scheduler system. With a modular system we could have CFS and the staircase scheduler and both problems solved.
  • Setbacks? (Score:5, Insightful)

    by ichigo 2.0 ( 900288 ) on Tuesday July 31, 2007 @12:44PM (#20059269)

    One thing's for certain, gaming on Linux can't suffer any more setbacks or it may be many years before we see FOSS games rival the commercial world.
    Linus mentioned somewhere that CFS and SD are both superior to the old scheduler, so in what way can choosing CFS be considered a setback?
  • by Stringer Bell ( 989985 ) on Tuesday July 31, 2007 @12:46PM (#20059305)
    I'm not a gamer at all, but for years I've said that Quicken was the only thing keeping me from switching Linux full-time. (Yes, I know there are FOSS bookkeeping packages out there. Quicken is excellent, though, so any switch is a step down in my mind.)

    Then I realized it doesn't matter which operating system I run as long as I can do what I need to do. I was only trying to switch to Linux for ideological reasons, not for any practical reason. The act of switching over was going to involve a lot of time, effort, and possibly expense, and if there was no "business reason" to go through all that, it would largely be for nought. If I had a mission-critical app I needed to run that only ran on Mac or Linux or whatever, then I'd switch, but I'd have to jump over with both feet. I don't want my music, pictures, documents, finances, etc., spread all over multiple machines (or multiple partitions of different types.) My mission-critical app is Quicken...so I continue to run Windows.

    So don't look at it as "I'd switch over completely, but..." Instead, look at it as "Apps drive the OS I use. I need the following app(s): ________, which is/are well supported on _______, so my OS is ________."
  • by sumdumass ( 711423 ) on Tuesday July 31, 2007 @12:48PM (#20059331) Journal
    I believe that you can swap the scheduler out. I might require you to rebuild the kernel but there is nothing stopping a distro, you or anyone else from using a different scheduler.

    And actually, If people think this is a problem, Distro's already heavily customize the kernels so switching this out in their particular kernel shouldn't be much of a problem.
  • Linux and Games (Score:5, Insightful)

    by CopaceticOpus ( 965603 ) on Tuesday July 31, 2007 @12:51PM (#20059371)
    I've figured out how to get games running with Linux!

    1. Set up your Linux system. Use onboard video and don't overspend on your processor.
    2. Buy a PS2, a Wii, or a 360.
    3. Play games on your game console and do everything else on Linux.

  • by delire ( 809063 ) on Tuesday July 31, 2007 @12:52PM (#20059393)
    Sayeth Kenneth.

    Alright, Just got done with some testing of UT2004 between 2.6.23-rc1 CFS and 2.6.22-ck1 SD. This series of tests was run by spawning in a map while not moving at all and always facing the same direction, while slowing increasing the number of loops.

    CFS generally seemed a lot smoother as the load increased, while SD broke down to a highly unstable fps count that fluctuated massively around the third loop. Seems like I will stick to CFS for gaming now.

    --
    Kenneth Prugh
    Sayeth Matthew

    My experience was quite similar. I noticed after launching the second loop that the FPS stuck down to 15 for about 20 seconds, then climbed back up to 48. After that it went rapidly downhill. This is similar to other benchmarks I've done of SD versus CFS in the past. At a "normal" load they're fairly similar but SD breaks down under pressure.

    The only other thing of interest is that the -ck kernel had the WM menus appear in about 3 seconds rather than 5-8 under the other two.
    The only chap that says otherwise doesn't post his results.

    From TFA [kerneltrap.org]
  • Re:FOSS games (Score:4, Insightful)

    by sqlrob ( 173498 ) on Tuesday July 31, 2007 @01:04PM (#20059547)
    It depends on the artist.

    Are you saying all of "Snow White" was drawn by one person? All 24 fps, 83 minutes worth?

  • by Bob-taro ( 996889 ) on Tuesday July 31, 2007 @01:13PM (#20059713)

    FPS is a poor measure of the feel of a game. I know it's what all the graphics card benchmarks use, and it does do a good job of measuring the total processor and video card throughput, but that's not the most important thing.
    I disagree. Responsiveness is important, but I've never encountered a situation where the frame rate was good and the machine couldn't read my keyboard clicks fast enough.
  • by qweqwe321 ( 1097441 ) <qweqwe321@lycos.LISPcom minus language> on Tuesday July 31, 2007 @01:49PM (#20060285)
    Free and open source is a horrible model for any non-subscription based games. Think about a game like Oblivion, for example. If Bethesda had released that under the GPL, where would they make their money from? Unless you make money from subscriptions, like Second Life or World of Warcraft, FOSS games make no business sense.
  • by Stephan Seidt ( 803125 ) on Tuesday July 31, 2007 @02:12PM (#20060663) Homepage
    Performance improvements could come from i.e. unsupported and thus unvirtualized eye-candy DirectX features which would have a negative impact on performance under normal circumstances. Anyway, afaik all the mentioned games have OpenGL renderers, but I assume that you use the stanard DirectX renderer in World of Warcraft.

    On the other hand, performance drawbacks because of wine's virtualization are very small but naturally they do exist. Adding an extra layer of wrapping takes time. Of course, maybe wine's handling of win32-specific calls and systems is more efficient than Microsoft's implementation in their operating systems ;-)
  • Re:FOSS games (Score:4, Insightful)

    by Catil ( 1063380 ) on Tuesday July 31, 2007 @02:16PM (#20060749)
    Artists usually have a huge archive of unused material, either done in their free time for practice and fun or for games that never used it due to a redesign or cancelation. Even some of the dummy objects most artists produce, to give the coders something to work with, can be better than actual graphics made by a hobbyist.
    I always wondered why they just wouldn't contribute at least some early works to the open source community? Is it maybe just the lack of a good website where stuff like this could be indexed or isn't there a good enough standard license model to release something like that for free? I thought the Creatice Commons license [creativecommons.org] would be quite suitabel for it.

    Everybody who spent some time finding a good textured and rigged low-poly character model, preferably with basic animations, on the net for use in an open source game, knows that there is next to nothing available. Well, at least not when I could have needed one about two years ago.
    It really doesn't have to be that professional or finished - even that untextured rat someone made a decade ago to have something to shoot at, later to replaced by some creatures, could maybe be of use to someone; and if he textures it, and maybe do a simple animation and perhaps record some sounds, and then uses it in his project, he should give the additional stuff he made to other developers as well.
    Soon there will be a nice looking 3D rat with some textures to choose from, various sounds, walking and death animations, etc. and everybody did his part. That's the open source way - why does it seem it's not very common among artits and only coders?

    Anyway, I think it could be really just the right website that is missing - some Sourceforge-style page with a nice upload-frontend, where stuff gets properly indexed based on categories, tags and styles and with a feedback option, where contributers can see which projects are using their works. Add some voting to rank it, karma, apply a fair license to it upon upload and I think something like this could really take off.
  • by ZeekWatson ( 188017 ) on Tuesday July 31, 2007 @02:24PM (#20060863)
    Lets not forget the intellectual theft perpetrated by Ingo Molnar. No matter how things turn out the guy is a liar, a thief, and a cheat. He sucks.

    Ingo fought long and hard for the status quo. Complaints against the current O(1) scheduler (author: Ingo) were met with flames and ignorance. Con spent a year developing a new scheduler and proving that it was better than the scheduler that Ingo wrote. Ingo spent the entire year ignoring and denying Con's scheduler, but one day he saw the light and wrote his own knockoff in "62 hours" and gets it merged the next week. This is bullshit.

    The end result is that Con has been driven from Kernel development by asses like Ingo. Whether CFS is better than SD is irrelevant. What has happened is the guy who spawned the entire process of getting an improved scheduler in the kernel and spent a year overseeing and improving it has his concept stolen by Ingo. Ingo did not want a new scheduler, he wanted his name to be on the current scheduler. When he saw that disappearing he had to take drastic action and he "authored" a new, improved scheduler. All for his own glory.

    Ingo sucks.

  • Strange viewpoint (Score:2, Insightful)

    by huckamania ( 533052 ) on Tuesday July 31, 2007 @04:16PM (#20062435) Journal
    Games maybe cpu hogs, but the person playing the game probably thinks that whatever is causing the lag is the pig. I think that is the whole point.

    The computer should spend cycles on the things the user is interested in, it should not be optimized primarily for the big service companies. The linux camp in 2007 just seems like some alternate dinosaur-computing reality: IBM, Sun, Novell, Oracle. I don't think of free or open when I see any of those names and I'm sure that none of those companies want to take computing in the direction I favor.

    In the computing world, the enemy of your enemy is not your friend.

  • by joeljkp ( 254783 ) <joeljkparker.gmail@com> on Tuesday July 31, 2007 @10:33PM (#20066023)
    Just a little nitpick, but Loki was not the last company doing commercial Linux ports. The new standard-bearer is Linux Game Publishing [linuxgamepublishing.com], though they've taken a low-and-slow approach and haven't done many big-name games yet.

Work without a vision is slavery, Vision without work is a pipe dream, But vision with work is the hope of the world.

Working...