Slashdot Mirror


Anticipatory Scheduler in Kernel 2.5+ Benchmarked

gmuslera points to this article at KernelTrap comparing available benchmarks for schedulers available for the 2.5 kernel, with the 2.4's scheduler as a reference poin. "In some cases, the new Anticipatory Scheduler performs several times better than the others, doing a task in a few seconds instead minutes like the others."

64 of 252 comments (clear)

  1. Anticipatory by daeley · · Score: 4, Funny

    Somehow, I just *knew* this was coming. ;)

    --
    I watched C-beams glitter in the dark near the Tannhauser gate.
    1. Re:Anticipatory by nairnr · · Score: 4, Funny

      Just like they couldn't anticipate the Slashdotting they were about to receive...

    2. Re:Anticipatory by mindriot · · Score: 2, Funny

      Man, they should've just anticipated the coming Slashdotting and used it as a real-life benchmark for the scheduler...

    3. Re:Anticipatory by ottffssent · · Score: 2, Funny

      > Mac OS X: because making Unix user-friendly is easier than debugging Windows.

      Heh. More like "because making user-friendly Unix is easier than making unix-sturdy MacOS".

    4. Re:Anticipatory by Anonymous Coward · · Score: 2, Funny

      Somehow, I just *knew* this was coming. ;)

      Ah, grasshopper, but did you know it will be coming to Slashdot yet again in a day or so? Anyone can predict the future; it takes a sage to predict a Slashdot duplicate.

    5. Re:Anticipatory by bill_mcgonigle · · Score: 5, Funny

      I totally agree, but do find it sad that Apple spent all the time and effort only to find that creating an OS was beyond them, so they chucked it all out and went for Unix. And Unix had been there for them all along.

      C'mon, try grounding your trolling in reality next time. Scheduling on OSX is handled by Mach, which was developed at CMU by Avi Tevanian, developed at NeXT and brought up to 3.0 at Apple.

      Apple uses BSD for its UNIX compatibilty layer, but that doesn't handle scheduling, which is what this article is about.

      Now, if you want to say Apple was dumb for chucking A/UX in the early nineties, then that'd make a much better troll.

      --
      My God, it's Full of Source!
      OUTSIDE_IP=$(dig +short my.ip @outsideip.net)
  2. Ohh the agony... by Sayten241 · · Score: 4, Funny

    The anticipation is killing me .

  3. Obvious joke... by ChangeOnInstall · · Score: 4, Funny

    If only kerneltrap.org were running the new schedu... oh, never mind.

    --
    What has *science* done?!? -- Dr. Weird (ATHF)
  4. Oops by AnotherShep · · Score: 3, Funny

    Seems to be slashdotted already... Wonder if it saw that coming.

  5. unfotunately by DonkeyJimmy · · Score: 5, Funny

    In some cases, the new Anticipatory Scheduler performs several times better than the others, doing a task in a few seconds instead minutes like the others.

    The task in question was anticipating things, so the test might not be all that fair.

    --
    "Probably the toughest time in anyone's life is when you have to murder a loved one because they're the devil." -Philips
    1. Re:unfotunately by DonkeyJimmy · · Score: 2, Funny

      While I have seen some voices of dissent that the test isn't fair, I'm afriad I don't understand what you mean here. Could you please explain further?

      Actually I was making a joke (that the benchmarking task itself was what the act of anticipating things, which this tool would obviously have a one up on... ). But someone modded me up insightful, so maybe I'm on to something.

      It'd be like testing rice painted white in a glass of milk during a snowstorm in a whiteness contest.

      --
      "Probably the toughest time in anyone's life is when you have to murder a loved one because they're the devil." -Philips
  6. I've tried it and it rocks by huhmz · · Score: 5, Interesting

    I have a multithreaded perl app (yes perl has descent thread support in 5.6 and later) which does a lot of mixed write/read I/O to and from a database. With 2.4 and 40 threads I can hardly use the system (of course I dont have to abuse my computer with 80 threads but Im trying to prove a point here).
    Switching to a new tabbed terminal in fluxbox it takes ages to redraw and switching between virtual desktops is an act of futility.
    With 2.5 It get good interactive performance and don't see this effect much at all. For sure this is also a bit due to the new VM code.
    Of course I would probably get the best interactivity with the SFQ scheduler but thats secondary in this case. At least xmms doesn't skip with this during very heavy I/O. I do not use the new NPTL code which would help further I suppose.

    1. Re:I've tried it and it rocks by brer_rabbit · · Score: 3, Funny
      For sure this is also a bit due to the new VM code.

      Fer sure.

    2. Re:I've tried it and it rocks by bill_mcgonigle · · Score: 2, Informative

      I'm sorry to sound like an Trolling AC, but I can't imagine why you would need 80 threads. Unless you using threads instead of a queue. I love threads, but they are and over used and hard to control and debug. The most complex thread system I've needed had ~25 threads running on 5 computers.

      It's far easier to maintain any multiplicity of state machines using threads rather than queues. Think of multi-user servers using stateful protocols. You might have hundreds or thousands of threads.

      --
      My God, it's Full of Source!
      OUTSIDE_IP=$(dig +short my.ip @outsideip.net)
    3. Re:I've tried it and it rocks by PD · · Score: 2, Funny

      How about a game where each little unit runs its own thread? 400 tanks crawling all over the battlefield would be 400 threads.

    4. Re:I've tried it and it rocks by jpmorgan · · Score: 2, Interesting

      Wow, 80 threads to build a state machine? What a nasty solution.

      You should chuck whatever language you're working in and replace it with one that supports full co-routines.

  7. Ketchup scheduler? by Penguin2 · · Score: 3, Funny

    It reminds of the old song and Heinz Ketchup commercial:
    "Anticipation is making me wait"...

  8. Poin..... by akiy · · Score: 5, Funny
    "with the 2.4's scheduler as a reference poin."

    I'm still anticipating the "t" in "point" myself...

    --

    --
    http://www.aikiweb.com - AikiWeb Aikido Information

    1. Re:Poin..... by Mark+(ph'x) · · Score: 5, Funny

      Funny though... on my screen the first thing my brain interpreted that to: 'reference porn'

      I think i need help...

      --
      those who control the past, control the future. those who control the present, control the past.
  9. Article text in case of /. effect: by Mr.+Sketch · · Score: 5, Funny

    Too many connections

  10. Anti-slashdotting? by Dark+Lord+Seth · · Score: 5, Funny
    Too many connections

    You know, you can ALMOST feel an admin over there just itching to type in "Fuck you Taco! And your site!" instead of the connection stuff...

    1. Re:Anti-slashdotting? by Jahf · · Score: 3, Interesting

      Mozilla's Bugzilla does this now.

      Perhaps one better ... redirect all /. requests to a Google-cache of your webpage (assuming you're lucky enough to have the page cached before someone notices).

      --
      It is more productive to voice thoughtful opinions (reply) than to judge (moderate) others.
  11. Microsoft version: by DonkeyJimmy · · Score: 5, Funny

    Me: Computer, I would like to open Netscape
    Computer: I have anticipated you would like to open IE and have already opened it for you.
    Me: Ok, then I would like to go to the game review site to see what I want to buy.
    Computer: I have already begun the download of the new Age of Empires game, your account has been charged.
    Me: Can I at least go to the bathroom?
    Computer: No.

    --
    "Probably the toughest time in anyone's life is when you have to murder a loved one because they're the devil." -Philips
    1. Re:Microsoft version: by Anonymous Coward · · Score: 4, Funny

      Me: I would like to upda...
      Computer: I have already run auto update. all your warez are belong to us.

    2. Re:Microsoft version: by MyHair · · Score: 2, Funny
      Is this a new virus or clever marketing scheme?

      Either way... (loading double-barreled shotgun)


      (credit to Dilbert/Scott Adams)

  12. Don't click that link by Anonymous Coward · · Score: 3, Funny

    It's a trap! We've got to give this website more time. Concentrate all firepower on the next article below!
    /ackbar

    1. Re:Don't click that link by Trogre · · Score: 4, Funny

      iptables: "Httpd, we've lost our port 80 packet deflectors"
      httpd: "Intensify the firewall, I don't want anything to get through."
      iptables: "Httpd, look!"
      httpd: "INTENSIFY THE FIREWALL!"
      iptables: "Too late!"

      --
      "Nine times out of ten, starting a fire is not the best way to solve the problem." - my wife
  13. It's about time... by FyRE666 · · Score: 5, Funny

    ... the Mozilla developers added a special "Slashdotted" plugin you know. So you could launch a special tab that would keep hammering away at a site in the background until it did bloodywell load ;-)

    1. Re:It's about time... by root+66 · · Score: 2, Funny

      which would fit into one two categories: 1. solution for already solved problem, 2. killer feature.

      --
      -- I love the smell of Blue Screens in the morning.
    2. Re:It's about time... by ottffssent · · Score: 4, Interesting

      I know that's Score:5 Funny but there's a serious note here.

      If a site is down, Mozilla could pretty easily grab the google cache instead. Or, if there's no google cache or if the cache matches the current page, check archive.org. Mozilla could auto-generate a page offering the user some options. Think about it - it would be the end of 404 errors. Instead of

      404 The requested page could not be found.

      you could get

      The site you requested is currently down. Would you like to use Google's cache instead? I also have a snapshot of the page you requested from August 12, 2002 but older ones are available here.

    3. Re:It's about time... by da+cog · · Score: 3, Funny

      Don't you think mozilla is bloated enough already? If they added that, then they might as well just go ahead and include a kitchen si... wait... err... nevermind.

      --
      Snarkiness is inversely proportional to wisdom because it emphasizes feeling right rather than being right.
    4. Re:It's about time... by Gorphrim · · Score: 5, Insightful

      i wonder did anyone bother submitting this idea to the Mozilla people instead of to /. ?

      --

      Queens of the Stone Age - they rule
    5. Re:It's about time... by Anonymous Coward · · Score: 2, Informative
      They did just threaten to sue some guy for using the term GOOGLE as a verb on his website.
      No, they didn't. And it wasn't a cease-and-desist letter. All they said was, "Hi, I'm a google lawyer (TM). We like our trademark, which for obvious reasons you'll understand. Could you please indicate that google is a trademark in your definition, or, if it's easier, just remove it? Thanks.".

      Unlike you, I'm not too lazy to type "google" into the Slashdot search box you probably see at the top-right of this page, click search, and click through to the article and from there the (NON-cease-and-desist) letter.
      It reads, in full:

      Dear Mr. McFedries:

      I am trademark counsel for Google. I have recently become aware of a
      definition of "google" on your website, www.wordspy.com. This definition
      implies that "google" is a verb synonymous with "search." Please note that
      Google is a trademark of Google Technology Inc. Our brand is very
      important to us, and as I'm sure you'll understand, we want to make sure
      that when people use "Google," they are referring to the services our
      company provides and not to Internet searching in general. I attach a copy
      of a short, informative piece regarding the proper use of "Google" for your
      reference.

      We ask that you help us to protect our brand by deleting the definition of
      "google" found at wordspy.com or revising it to take into account the
      trademark status of Google.
      [basically saying: Note: Google (TM) is a registered trademark of Google Technologies].

      Now quit spreading FUD. I love Google.
  14. Re:Great! by Xunker · · Score: 5, Funny

    Quoeth the driver:

    * These chips are basically fucked by design, and getting this driver
    * to work on every motherboard design that uses this screwed chip seems
    * bloody well impossible. However, we're still trying.

    --
    Hilary Rosen's speech was about her love of money and her desire to roll around naked in a pile of money.
  15. how it works by diegocgteleline.es · · Score: 5, Informative

    Given that kerneltrap has "Too many connections", i don't know if they have this link: http://www.cs.rice.edu/~ssiyer/r/antsched

    where it explains what anticipatory scheduling does.


    (btw, it seems that freebsd had it for ages)

  16. Rocky Horror Linux Show by fr2asbury · · Score: 4, Funny
    I see you shiver with antici - - - - (Say it!) - - - (Consti!) - - - pation!

    ;-)

  17. Ok.. I'll bite... what's a Scheduler? by !Xabbu · · Score: 3, Interesting

    What does it do for kernel performance? Or does it do anything for performance? ...I haven't run Linux on a desktop for almost a year. It hurts mommy.. please make the bad man go away!

    --

    - Jimbob
    1. Re:Ok.. I'll bite... what's a Scheduler? by Caoch93 · · Score: 5, Informative
      In this case, they're talking about an I/O Scheduler, which is in charge of planning I/O through some resource so that activities on that resource correctly complete as quickly as possible. To be specific, this scheduler is for the hard disk I/O Scheduler, which plans reads and writes from/to your hard disks.

      The Anticipatory Scheduler is designed to optimize your disk I/O based on the assumption that reads of related material tend to happen in short succession, while writes tend to be singular and larger. As a result, when the scheduler encounters a read, it anticipates that there will be other reads in short succession, so it waits and then checks for them and, if they're there, they move to the front of the line. The name comes from the tiny waiting period when it anticipates future reads.

      This is, of course, a condensed version of what I think I've learned from reading KernelTrap for the last few months. Someone's bound to tell you I'm talking arse.

    2. Re:Ok.. I'll bite... what's a Scheduler? by RainbowSix · · Score: 5, Informative

      Other forms of disk scheduling are a little more simple. Assume that the disk is really slow, and lots of requests are coming in that are buffered somewhere. Obviously you want to handle requests that are close to where the disk head currently is since it is faster and you won't have your head going all over the place.

      FCFS (first come first serve) - easy stupid way. Take requests as they come. If you need front end front end, performance suffers because obviously you want to do front front end end.

      SSTF (shortest seek time first) - do the request that is shortest to the head first. The problem with this is if you keep asking for stuff at the front of the disk and have a lone request for the end of the disk, the lone request could get ignored for a long time (starved) since the scheduler does the stuff at the front since seek times are much lower.

      SCAN - the head starts at one end of the disk and goes to the end, servicing requests along the way, but never going back so that that lone request from the previous method does get serviced. When it gets to the end the head moves back toward the front, servicing requests along the way. It keeps going back and forth.

      C-SCAN -Variant of SCAN where it doesn't go back and forth. It goes from front to back servicing requests then goes all the way back to the front before it starts servicing again. It gives more uniform times because if you're using SCAN and your request at the beginning is just missed by the head, you have to wait until it goes all the way to the other end and comes all the way back. In this method it goes to the end and then you're the next request to be serviced if you are at the beginning.

      LOOK - The same as CSCAN and SCAN except it doesn't blindly go to the end of the disk; it stops and turns around when there aren't any more requests in the direction. Of course, if you show up right after the head changes direction, sucks to be you :)

      --
      --------
      It's OK to be social, just don't tell anyone about it.
  18. Disk I/O, not CPU schedulers by Wesley+Felter · · Score: 4, Informative

    The blurb didn't mention that the article is comparing disk schedulers, not CPU schedulers.

    1. Re:Disk I/O, not CPU schedulers by Sloppy · · Score: 3, Funny

      Heh, an anticipatory CPU scheduler! "Yup, gcc wanted more time."

      --
      As copyright owner of this comment, I authorize everyone to defeat any technological measure which limits access to it.
  19. isn't this "news" quite old? by misof · · Score: 2, Interesting

    I remember Ingo Molnar introducing this scheduler running in O(1) time months ago, sometimes late in 2002... AFAIK it is a part of the 2.5 kernel for quite a long time.. and at the time it was first tested there were some benchmarks.. I vaguely remember something about "we tried to launch several hundreds of processes, w.o. the scheduler: 15 minutes, w. the scheduler: 2 seconds." So what is so new about some benchmarks being available?

    Or am I completely off-topic? ;)

    1. Re:isn't this "news" quite old? by Quixote · · Score: 2

      I think Ingo'a was a CPU scheduler; this one's a disk (I/O) scheduler.

  20. Good stuff, but... by Corbet · · Score: 5, Informative

    ...of course, LWN readers knew about the anticipatory scheduler back in January. We also looked at the SFQ and CFQ I/O schedulers two weeks ago.

    --
    Jonathan Corbet, LWN.net
  21. Re:Great! by Paslophunk · · Score: 2, Interesting

    I second that (albeit only 2 months). I used to have many problems compiling 2.5, but the newer releases are truly wonderful, also the new module system kick ass, esp. now when I can compile ALSA in and not worry about a thing. 2.5 is WAY easier to get up and running than 2.4, I really recommend trying it out, but be sure to read Documentation/Changes ! (although I run Debian/Woody and didn't bother to upgrade anything except module-init-tools, works for me ;)

    Oh, and while ur at it u might want to take a look at devfs too (I run it without devfsd and I didn't have any problems, u just need to change inittab from ttyX to vc/X, fstab and lilo/grub).

    The only kinks I had was with xine which doesn't like v4l, but mplayer works fine... Hmm, oh and same FPS for Q3, I doubt that any of u will feel much difference anywhere (unless u didn't use the preempt patch for 2.4). But I haven't played with NPTL yet, does anybody have any experience with that?

    --
    what goes up must come down, ask any sysop / sig11
  22. Check the mailing list for more info by Miles · · Score: 5, Informative

    If you're really curious, you can check out the mailing list for more info. Try searching for "IO scheduler benchmarking" or "iosched". To save the mailing lists, here's a few interesting benchmarks:

    Parallel streaming reads:
    Here we see how well the scheduler can cope with multiple processes reading
    multiple large files. We read ten well laid out 100 megabyte files in
    parallel (ten readers):

    for i in $(seq 0 9)
    do
    time cat 100-meg-file-$i > /dev/null &
    done

    2.4.21-pre4:

    0.00s user 0.18s system 2% cpu 6.115 total
    0.02s user 0.22s system 1% cpu 14.312 total ...(up to)
    0.01s user 0.16s system 0% cpu 37.007 total

    2.5.61+hacks:

    0.01s user 0.16s system 0% cpu 2:12.00 total
    0.01s user 0.15s system 0% cpu 2:12.12 total ...(up to)
    0.01s user 0.19s system 0% cpu 2:13.51 total

    2.5.61+CFQ:

    0.01s user 0.16s system 0% cpu 50.778 total
    0.01s user 0.16s system 0% cpu 51.067 total ...(up to)
    0.01s user 0.18s system 0% cpu 1:32.34 total

    2.5.61+AS

    0.01s user 0.17s system 0% cpu 27.995 total
    0.01s user 0.18s system 0% cpu 30.550 total ...(up to)
    0.01s user 0.16s system 0% cpu 34.832 total

    streaming write and interactivity:
    It peeves me that if a machine is writing heavily, it takes *ages* to get a
    login prompt.

    Here we start a large streaming write, wait for that to reach steady state
    and then see how long it takes to pop up an xterm from the machine under
    test with

    time ssh testbox xterm -e true

    there is quite a lot of variability here.

    2.4.21-4: 62 seconds
    2.5.61+hacks: 14 seconds
    2.5.61+CFQ: 11 seconds
    2.5.61+AS: 12 seconds

    Streaming reads and interactivity:
    Similarly, start a large streaming read on the test box and see how long it
    then takes to pop up an x client running on that box with

    time ssh testbox xterm -e true

    2.4.21-4: 45 seconds
    2.5.61+hacks: 5 seconds
    2.5.61+CFQ: 8 seconds
    2.5.61+AS: 9 seconds

    copy many small files:
    This test is very approximately the "busy web server" workload. We set up a
    number of processes each of which are reading many small files from different
    parts of the disk.

    Set up six separate copies of the 2.4.19 kernel tree, and then run, in
    parallel, six processes which are reading them:

    for i in 1 2 3 4 5 6
    do
    time (find kernel-tree-$i -type f | xargs cat > /dev/null ) &
    done

    With this test we have six read requests in the queue all the time. It's
    what the anticipatory scheduler was designed for.

    2.4.21-pre4:
    6m57.537s ...(up to)
    6m57.916s

    2.5.61+hacks:
    3m40.188s ...(up to)
    3m56.791s

    2.5.61+CFQ:
    5m15.932s ...(others)
    5m50.602s

    2.5.61+AS:
    0m44.573s ...(up to)
    0m53.087s

    This was a little unfair to 2.4 because three of the trees were laid out by
    the pre-Orlov ext2. So I reran the test with 2.4.21-pre4 when all six trees
    were laid out by 2.5's Orlov allocator:

    6m12.767s ...(up to)
    6m13.085s

    Not much difference there, although Orlov is worth a 4x speedup in this test
    when there is only a single reader (or multiple readers + anticipatory
    scheduler)

  23. Re:It would be neat... by norton_I · · Score: 4, Informative

    GCC (and I assume others) can do this. Basically, you compile with -fprofile-arcs, run the executable enough to generate sufficient data, then compile with -fbranch-probabilities. This will try to order basic blocks so that the CPU predicts branches correctly most often.

    I have never done it, but it is supposed to work. Unfortunately, it is pretty much limited to static analysis -- it doesn't allow for programs whose usage patterns change with time. For that you need some kind of dynamic recompilation, such as provided by HP's Dynamo, Transmeta's code morphing, or perhaps some Java JITs (I don't know if any of them implement this).

    Personally, I think profile directed optimization done by a static compiler is a waste of time. All optimizations should be done at the best place, and for many optimizations, that is the static compiler, but many others can be better done by run time optimizers, or the CPU, and this is one of them.

  24. Re:cache / copy / mirror of page is here (mod up!) by Anonymous Coward · · Score: 5, Informative

    here is the clickable link

    mirror of story to be found here

    http://www.stuwo.net/download/ktrap.html

  25. Re:Great! by DeeKayWon · · Score: 4, Informative

    The snippet you quote is from the cmd640 driver, which covers only the chipset by the same name. Subsequent CMD chips, including the 649, use the cmd64x driver and are not fucked.

  26. Re:What about other OSen? (*BSD, Windows) by CoolVibe · · Score: 2, Informative
    Well, the AS scheduler started life as a FreeBSD implementation (BSD dead? yeah right... whatever) but doing those benchmarks on other OSen on similar hardware is like comparing Apples and Oranges. Hardly worth it.

    Also, I doubt that one could alter the I/O scheduler (let alone install an alternative) in the win* operating systems.

    The AS I/O scheduler is very very interesting. I hope some kind soul would backport it to 2.4.

  27. Re:Great! by CoolVibe · · Score: 3, Interesting
    I'd love to try 2.5, but the closed nvidia drivers is the only thing that's keeping me grounded to 2.4.

    Although I _suspect_ they will run fine on 2.5, I don't want to risk it. It's still a little too bleeding edge for me. They call it bleeding edge for a reason, because you _will_ bleed and get hurt from time to time.

    I guess I am a big fat ninny when it comes to bleeding edge stuff (although I do lust for all the new toys, the waiting just increases my contentness when such cool stuff gets part of stable stuff) :-)

    Speaking of avoiding the bleeding edge, it would be sooo cool if this IO scheduler was backported to 2.4.

  28. 2.5 is the bomb so far, in so many ways.. by AxelTorvalds · · Score: 5, Insightful
    They should really call it 3.0...

    When I first started hacking on Linux, I was working with a seasoned Linux kernel hacker who my company hired as a consultant. He helped us with some I/O issues and such, did some other tweaks and gave us a ton of inspiration to go get after it ourselves. (You be amazed at how many people are afraid to just start making changes to kernel code) He is a wickedly cool individual and as someone whose had a lot of schooling and experience it was one of the best learning experiences I can remember.

    The first thing I started dorking with after that experience was the scheduler because I, like all other hakers, know how to schedule stuff. At the time, (early 2.x) the scheduler was also a fairly easy to digest piece of code that could have impacts on the system in great ways.

    Well all my stuff got bit bucketed. I called up our consultant guy who my friend by now, "what's the deal? Linus doesn't like my stuff. How do you mail him stuff?" And his answer was that pretty much every body wants to tweak the scheduler, everybody sends stuff in. Linus is sage in his wisdom, schedulers are freaking hard because there is always a pedantic worst case that sucks and actually shows up in the real world. Linus has always done fairly simple things that aren't best but certainly aren't worst. So 2.0 had pretty straight round robin. 2.2 and 2.4 they started to add queuing schedulers with niceness. 2.5 we're going to get a pretty killer scheduler that has taken a ton of effort to tweak and there are still discussions to expose parameters to the user via /proc or something because you can find cases were it doesn't perform as well.

    Now this IO scheduler is opening up a whole new can of worms, it's a new chunk of code called "scheduler" and all hackers know scheduling. In the past it has been fairly simple. It should be fun to watch and the kernel is going to kick mucho ass in the end. There will be a lot of talk and debate about this stuff. It's also distilled down to the trusted set that Linus will let play with things called "scheduler"

  29. WOW CS 162 Lecture by vandel405 · · Score: 3, Interesting

    I'm currently enrolled in cs 162 (OSs) at UC Berkeley, todays lecture was on different flavors of schedulers and this scheduler was mentioned breifly. For more theoretical info see http://webcast.berkeley.edu/courses/archive.html?p rog=116&group=52 for a webcast of the lecture or http://inst.eecs.berkeley.edu/~cs162/Lectures/L11. pdf for a pdf of the lecutre notes.

  30. File I/O primitives by anonymous+cupboard · · Score: 3, Informative
    It seems that the main problem is that the file I/O primitives in Linux are a little too primitive. On some operating systems, there is another layer sitting between the file system and the user which provides record and block management. If I open a file for sequential read or write then the record/block manager knows that it could use read-ahead or write-behind.

    The problem is that such I/O layers need to be implemented at least partially outside user-space in the case where the file is being simultaneously accessed to allow interprocess coordination. Also, to get best use, everything should use it.

    1. Re:File I/O primitives by Wesley+Felter · · Score: 3, Informative

      On Linux the kernel detects sequential I/O and does the readahead automatically. So it's not really clear what Linux is missing.

    2. Re:File I/O primitives by anonymous+cupboard · · Score: 2, Interesting
      Yes, but it doesn't seem to be getting it right hence the problem requiring adaptive I/O scheduling. Certainly ext2 should automatically determine that, for example, our html web page read by Apache is sequential and the data should be read-ahead buffered. However, this doesn't seem to be helping.

      At the same time I'm not quite sure where a solution like adaptive I/O scheduling would help on a real system because, in our example of an Apache server, whilst it is stalled writing a web page to you over TCP, it can be reading another page off disk for me. In a true server load, there is little think time because the next request comes in.

    3. Re:File I/O primitives by anonymous+cupboard · · Score: 2, Informative

      Your idea is quite good for minimalistic databases like MySQL but not so good for the Oracles or whatever that do their own I/O management. They are aware of the diffeernce between tables and values and attempt to logical about the way that they manage them. Frequently they have their own LRU cache and read-ahead strategies independent of the underlying OS.

  31. multiple write tasks, why ! que it with shell? by aaron_pet · · Score: 2, Interesting

    The article mentions multiple simultaneous writes and reads... Doing two tasks at once in much more expensive than doing them sequentially.

    Why not use the download manager programs... for all file transfering?

    My priorities:
    1. user interface responds effectively in realtime.
    2. CD writes don't fail
    3. Video doesn't skip
    4. files transfer quickly.

    I would actually like the ability to switch the mode of the file schedualer.

    If I am not doing 2. or 3. then why not switch to something that makes 4 happen?

    I saw something rediculous, like a 10 second wait for a login prompt??!?!

    The system should have that all ready ahead of time, and it should take no more than .5 second to get a login screen.

    --I don't care about spelling enough to spend the vast quantity of time to get this to the spell checker.

    --
    Please use [ informative / summarizing ] SUBJECT LINES
    Flame me here
  32. Not exactly by the+ed+menace · · Score: 2, Informative

    Actually Mach was developed at CMU under Rick Rashid. Tevanian was a graduate student of his. Most of the Mach team is at Microsoft Research, including Rashid (who heads up Microsoft Research). They tried to convince Tevanian to come there, but he decided instead to go to NeXT Computer, which also was based on the Mach microkernel. When Apple acquired NeXT, it took most of their OS and development philosophy also.

  33. Re:Finally by indefinite · · Score: 2, Interesting

    X11 tru, but not even what makes timing so different. it is windows taking care of its gui (or at least much of it) in process with the OS that really changes things. x11 has to go through system calls.

  34. Re:Finally by psamuels · · Score: 5, Interesting
    Windows simply handles multithreading better.

    Nah, it handles certain start-up costs for complex applications better. This may or may not have anything to do with multithreading per se.

    And you can tell the I/O is crap just by looking at KDE's performance when compared to Win2k. Windows just flies.

    I don't run KDE, but I understand that it has had speed issues in the past because it uses a lot of interconnected C++ shared libraries, which really tax the dynamic loader. The Windows link scheme, by the way, is much more primitive (read: fast at runtime). Microsoft also uses a hack (disk layout profiling) to speed up load time further. (Not that "hack" is necessarily a bad thing - after all it does get the job done.)

    A couple of years ago, Jakub Jelinek came up with a utility similar to IRIX Quickstart for ELF binaries / libraries, which does "prelinking" to dramatically reduce relocation overhead at runtime in the common cases (without sacrificing flexibility, for the uncommon cases). A side effect is reducing memory usage due to COW. I never heard what happened to that project - anyone know if it is considered production-quality yet, or if binutils / glibc will be shipping it any time soon? Apparently it helped KDE quite a bit.

    --
    "How can you claim that you are anti-crack, while still writing a window manager?" — Metacity README
  35. Preemption patches by Sits · · Score: 2, Informative

    Are you sure that you are not seeing the improved desktop interactivity from the kernel premption and low latency patches in 2.5? I suspect that they would affect desktop interactivity more than this scheduler...

  36. Re:Finally by Phosphan · · Score: 2, Informative
    Prelinking is already there. Have a look at this page for an introduction (well, with some gentoo-specific stuff).

    KDE has gained quite some speed with the last version changes. The gap is not as large as you remember.

  37. Anticipatory scheduling is: by master_p · · Score: 3, Informative

    Here is the explanation of what anticipatory scheduling is. From what I have understood (please correct me if I am wrong, I am not a kernel hacker), 'anticipatory scheduling' means the following:

    The I/O subsystem (the part of the operating system that reads/writes to/from the hard disk) waits a little longer before servicing an I/O request from an application other than the current one; if the current application issues another I/O request while the I/O subsystem is waiting, the overall system throughput is higher because the hard disk's head moves less.