Slashdot Mirror


Linux Gains Support for NUMA

soosterh writes "CNet has an article about a NUMA patch from IBM. It says that the improvement adds some support in Linux for nonuniform memory access, or NUMA, a design for higher-end servers with many processors. Linus Torvalds, the original creator of the operating system and still its top authority, accepted the update this month into version 2.5, the current test version of the software."

37 of 143 comments (clear)

  1. Isn't there some other numa stuff already in? by eyez · · Score: 4, Insightful

    I thought that I'd seen some other NUMA stuff in previous runs of 'make menuconfig'-- Can anyone explain what's already there and what this patch adds?

    --
    get 0wned. irc.w30wnzj00.com
    1. Re:Isn't there some other numa stuff already in? by hansendc · · Score: 2, Informative

      NUMA refers to a wide range of features. Everything from multipatch networking or SCSI, to memory allocation, to placing processes close to "good" memory. This particular patch simply makes processes run on CPUs where they're likely to be close to memory which they will need.

    2. Re:Isn't there some other numa stuff already in? by Error27 · · Score: 3, Informative

      You are correct. The LWN article on this just became available to non-subscribers and you can read it here:http://lwn.net/Articles/20741/

      (BTW. Everyone should subscribe to LWN. It's an exceptional value)

  2. Imagine a beowulf... by Gordonjcp · · Score: 3, Informative

    Seriously, this is something that will close one of the last remaining gaps between Linux and Solaris. Not that it will do much good for 99% of users out there, but if you need this, you *really* need it.

  3. And AMD... by addaon · · Score: 5, Informative

    And, of course, also support for the Hammer architecture, which is (smaller scale) NUMA. Each processor in an x86-64 system has its own memory bus, so time to access memory depends on whether the memory is directly connected to a given processor, or whether another processor needs to mediate, the definition of NUMA.

    --

    I've had this sig for three days.
    1. Re:And AMD... by addaon · · Score: 4, Insightful

      Transparently? Well, yes, from a programmatic point of view. Your old code will run fine. But not optimally. It would take different memory allocation algorithms to get optimum performance on a Hammer box. Hopefully, this will hape with that.

      --

      I've had this sig for three days.
  4. NUMA by Anonymous Coward · · Score: 5, Informative
    NUMA
    Short for Non-Uniform Memory Access, a type of parallel processing architecture in which each processor has its own local memory but can also access memory owned by other processors. It's called non-uniform because the memory access times are faster when a processor accesses its own memory than when it borrows memory from another processor.

    NUMA computers offer the scalability of MPP and the programming ease of SMP.
  5. What about the feature freeze? by Screaming+Lunatic · · Score: 3, Informative
    I thought there was a feature freeze. There must have been some NUMA code in kernel already and this cleans up all the loose ends.

    Someone correct me if I'm wrong.

    1. Re:What about the feature freeze? by greppling · · Score: 5, Informative
      The NUMA-aware scheduler was merged recently despite the feauture freeze. The patch was considered non-intrusive (and safe for non-NUMA architectures). Feature freeze is not code freeze.

      See the good discussion in the LWN article on this topic.

  6. NUMA? by Are+We+Afraid · · Score: 2, Funny

    This article says the code was submitted by Martin Bligh, not Dirk Pitt.

    Clearly it's a typo. I'll have to e-mail Clive about this.
    --
    Rot-13 my address to e-mail me.
    "So I hurry back to little earth / For another life another birth"
  7. Not just for big iron by awptic · · Score: 4, Interesting

    Not only is this beneficial for large computers, but also on smaller SMP systems with hyperthreading. On CPU's with hyperthreading,
    it's often faster for a process to reside on the same CPU but not necessary the same 'virtual' CPU when accessing memory.
    And alot of 8way+ systems are NUMA whether or not they are advertised as such.

    1. Re:Not just for big iron by be-fan · · Score: 2, Interesting

      Actually, the previous 2.5 scheduler handled hyperthreading just fine. The real draw is that this new patch makes hyperthreading just a subset of NUMA, which makes things much cleaner.

      --
      A deep unwavering belief is a sure sign you're missing something...
    2. Re:Not just for big iron by Merlin42 · · Score: 2, Informative

      Actually the HT implementation in the P4/Xeon chips does not act as you suggest in 1. When doing HT the cache is cut in half and each virtual CPU gets a half cache ... which is probably the main reason HT can yeild inferior performance for some applications.

      There is a very good reason for doing it this way. The P4 cache uses VIRTUAL addresses so if each virtual cpu is executing in a different virtual address space(which is allowed) then you need a way to differentiate which cache lines belong to each virtual cpu since they might very well both reference lets say virtual address 0xDEADBEEF which translates into a different physical address (and hence different data). Intel engineers went with the simple solution of splitting the cache in two, instead of adding an extra tag to each cache line which would have created extra overhead/latency on every cache access.

      I apologize for overusing the word virtual ... but I really couldn't help it too much. It just seems to be an overused word in CS/EE.

  8. Re:32/64 by larien · · Score: 2, Informative
    I'd imagine it's mainly for 64-bit as that's the kind of systems which tend to ship with NUMA (usually with MIPS or Itanium). Without knowing more, I couldn't comment as to whether it will work under 32-bit or not, but I can't see how it would be so limited.

    Also, I seriously doubt if any desktop machine will use NUMA; it's primarily about systems which use system boards, where there are CPUs & RAM on a board which slots into the system & a CPU can access memory on a local board faster than that on other boards. Desktops tend to use one "system board" (i.e. the motherboard) so there isn't the difference in speed for accessing the data.

  9. Re:A lot of talk about NUMA by Twirlip+of+the+Mists · · Score: 3, Informative

    Oh, for cryin' out loud. Dude, there's this thing called Google. Try it out some time.

    That said, I'll give you a hint: non-uniform memory access. If you've got a computer that uses different banks of memory as a single physical address space, then that computer has a NUMA architecture.

    If you want to maintain cache coherency across a NUMA system, you have to employ some tricks. These tricks are sufficiently complex to warrant their own name: ccNUMA.

    --

    I write in my journal
  10. Re:32/64 by hansendc · · Score: 2, Informative

    I'd imagine it's mainly for 64-bit as that's the kind of systems which tend to ship with NUMA (usually with MIPS or Itanium). Without knowing more, I couldn't comment as to whether it will work under 32-bit or not, but I can't see how it would be so limited.

    That is an incredibly naive comment. NUMA systems have been around for quite a while (think Sequent), the current generation of IBM x440 are NUMA. These are all 32-bit Intel architectures.

    This patch didn't even address memory, it only dealt with scheduling processes anyway.

  11. Re:Linux lacks democracy by AlecC · · Score: 4, Insightful

    You misunderstand the way Open Source works. Linux actually has perfect democracy - *anybody* can take charge. Anybody - even you - could fork the kernel any time you wanted to. Of course, until you show why your stream is better than the main stream, you'll be pretty lonely on your fork.

    The only reason that Linus is still the controlling authority on the Linux kernel is that he is doing it pretty well. And he isn't without advice from others - there are hundreds of people only too willing to favour him with their advice.

    Every functioning organisation needs a chief executive - someone who makes the final decision. Even when you have executive committees - and, informally, most Open Source projects do - someone still has to make the final decision, to jusdge what the consensus actually is.

    Anybody can "call an election" on an Open Source project any time, by proposing a fork. That is much closer to perfect democracy, it seems to me, than one where you only choosw the Chief Exec every few years.

    As it is, Linux is a roaring success with Linus in charge. It ain't broke. don't fix it.

    --
    Consciousness is an illusion caused by an excess of self consciousness.
  12. SGI's systems (was Re:32/64) by grey1 · · Score: 3, Informative

    the MIPS/Itanium systems the parent refers to are (I assume) the SGI Origin and Altix multiprocessor servers, both 64bit, the first MIPS/IRIX, the second Itanium/Linux:

    Origin

    Altix

    --
    "we demand rigidly defined areas of doubt and uncertainty!"
  13. One learns something new every day by Bemmu · · Score: 5, Funny

    Thank you for explaining who Linus Torvalds is.

  14. Re:Linux lacks democracy by Anonymous+Hack · · Score: 2, Interesting
    Of course, until you show why your stream is better than the main stream, you'll be pretty lonely on your fork.

    Unfortunately it's not JUST showing someone you're better, it's "marketing" too. That's pretty hard in the case of Linux, because you can't use the name "Linux" anywhere - it's trademarked by Linus. If i made some funkyass Linux fork and called it Finnix, it wouldn't get the press Linux would, and you'd effectively be ten years back in time, building up a name etc. With BSD it's a little easier, because "BSD" in and of itself isn't trademarked, though it's doubtful whether you'd be able to get away with calling your Soviet Russia fork "NyetBSD".

    That said, i pretty much agree. Linux has so much stuff in it right now as a kernel (in the sense of running on a zillion architectures with a zillion features) i'd say Linus is pretty much pleasing everyone in the end. Most Alan Cox stuff gets rolled in, most commercial stuff does too. It's all good.

    --
    I got a sig so you would remember me.
  15. Re:Linux lacks democracy by Lussarn · · Score: 2, Informative

    You do not have to run Linus stock kernel.

    Not two vendors ship the same kernel. So in the end it's up to the vendor you use to tweak your kernel. Redhats are heavily patched to suit (what they belive) is there users needs..

    I think thats a good system.

  16. Re:Accepted by? by snofla · · Score: 2, Insightful

    the decision of linus to not accept the NUMA patches right away was correct. we now have a patch that doesn't affect non-NUMA archs...

    --
    i don't like style guides
  17. Re:ram question then by jericho4.0 · · Score: 2, Interesting
    If the NUMA patch can handle latencies on the order of a few milliseconds, you might be able to use this to safely fool your kernel into thinking you have 120 gigs of RAM (from storage).

    Of course, actually doing this would involve jumping through a few hoops, and I have to think hard to come up with situations why this would be the way to go.

    Gees, any MB I've bought in the last several years can take more RAM than I'm willing to buy for it. I wonder what kind of memory limits the OP was asking about.

    --
    "A language that doesn't affect the way you think about programming, is not worth knowing" - Alan Perlis
  18. You know Slashdot is going "mainstream" when ... by rlowe69 · · Score: 4, Funny

    Linus Torvalds, the original creator of the operating system and still its top authority.

    You know Slashdot is going "mainstream" when people have to explain who Linus is.

    --
    ----- rL
  19. SGI must have added NUMA support as well by Anonymous Coward · · Score: 2, Interesting
    Hi,

    SGI must have added NUMA support for their Itanium-based Altix-servers as well. On their web-page it says: "Enhanced Operating System for High-Productivity Computing" [aka Linux] with "High-performance NUMA support".

    Anyone ever seen a patch for this?

    - jarman

  20. Linus' Acceptance... by sd790 · · Score: 2, Informative

    ...can be found here.

  21. It's time to stop reading slashdot when... by nibelung · · Score: 4, Informative

    they are copying Linux related news from CNET.

  22. Re:Linux lacks democracy by gilesjuk · · Score: 5, Insightful

    You underestimate the intelligence of Linus, he initially refused the NUMA patch as it affected performance on non NUMA systems. So the author of the patch got some help with it and the patch now works without hindering non NUMA systems.

    Surely this is quality control at its finest? every project has its project manager. Everyone is free to write their own applications without Linus controlling them, he just looks after his project which happens to be the kernel. Without strict quality control the kernel would be a right old dogs dinner by now.

  23. Re:Accepted by? by Queuetue · · Score: 2, Insightful

    It's not a SPF - if you want to run a kernel without the NUMA, go right ahead. If you want to run a kernel with DRM support, go right ahead. It's opensource - that's the whole point.

    Linus decides what goes into his tree. You decide what goes into your tree. If you don't have the time or skill to build your own tree, pick someone you trust, and use thiers.

  24. Recent Patch Modification by LJPeixoto · · Score: 5, Informative

    "More recently, the NUMA scheduler patch has been reworked (by Martin Bligh, Erich Focht, Michael Hohnbaum, and others) around a simple observation: most of the NUMA problems can be solved by simply restricting the current scheduler's balancing code to processors within a single node. If the rebalancer - which moves processes across CPUs in order to keep them all busy - only balances inside a node, the worst processor imbalances will be addressed without moving processes into a foreign-node slow zone. A simple (three-line) patch which did nothing but add the within-node restriction yielded most of the benefits of the full NUMA scheduler; indeed, it performed better on some benchmarks. Real-world loads, however, will require a scheduler which can distribute processes evenly across nodes. Occasionally it is necessary, even, to move processes to a slower node; a lot of CPU time on a lightly-loaded node will give better performance than waiting in the run queue on a heavily-loaded node. So a bit of complexity had to be added back into the new scheduler to complete the job."

    Extracted from:
    http://lwn.net/Articles/20741/

  25. Re:ram question then by larien · · Score: 3, Informative
    Er, why use a hard drive as RAM when you can just add loads of swap space? The VM will handle that space more efficiently if it knows it's hard disk rather than RAM.

    However, the main way you might be able to add RAM over and above the MB limit is via some kind of PCI card with DIMMS on it. I'm not sure how that would work over PCI (even 66MHz/64bit) or how it would work at a lower level, but it might get by some limits. The limits OP was asking about may be of the order of trying to get over 1GB of RAM for some simulation code. Of course if you need over 1GB of RAM, buy a system which supports it.

    In any event, from what people are saying, the NUMA patch is a change to the scheduler, to ensure that processes run on the CPU nearest the RAM bank storing the data. I don't think it addresses trying to add RAM from other sources (either disk or hypothetical PCI card)

  26. In Other News by crawling_chaos · · Score: 2, Funny

    Richard Stallman has sent an angry e-mail demanding a name change to GNUMA.

    --
    You can only drink 30 or 40 glasses of beer a day, no matter how rich you are.
    -- Colonel Adolphus Busch
  27. Linux has history by NoWhereMan · · Score: 2, Insightful
    Unfortunately it's not JUST showing someone you're better, it's "marketing" too. That's pretty hard in the case of Linux, because you can't use the name "Linux" anywhere - it's trademarked by Linus.

    Sorry if this seems rude, but it sounds like someone crying 'sour grapes.' Do a little research and you can easily find news group discussions about the profiteer who wanted to charge people to use the name Linux. The parent post is correct about your opportunity to fork a better implementation. It's a good thing my moderation points elapsed. I would have been looking for a crybaby option ;-)

  28. Re:ram question then by juanillodgn · · Score: 2, Insightful
    Oh, my god!!! You've just reinvented EMS in 32-bit systems


    Remember those good ol' days?

  29. NUMA support was improved, not added by slavemowgli · · Score: 3, Informative

    Contrary to what is said in the post, NUMA support has been in Linux for quite a while already. The recent patches accepted by Linus merely add NUMA awareness to the scheduler, which, while certainly being a prerequisite for Linux being used on production NUMA boxen, is not at all required for NUMA support in general.

    --
    quidquid latine dictum sit altum videtur.
  30. And how does this relate to SGI? by wfrp01 · · Score: 2, Interesting

    SGI has also integrated NUMA technology into the linux kernel to support their new Altix servers. How do these two efforts relate? Is SGI's code generic enough that it could also be considered for inclusion in the mainstream kernel? Or is it specific to SGI's NUMA architecture? Is IBM's code generic enough that it would work on an Altix? What functional characteristics distinguish the two?

    --

    --Lawrence Lessig for Congress!
  31. Re:Linux Community Can't Hack It by DarkMan · · Score: 2, Insightful
    ... the Linux
    community just can't hack it and make it
    without feeding off of the proprietary
    companies that it so despises.


    Proproetary companies are not despised. Most proprietary software is. Hardware companies that refuse to release driver level documentation are. Companies are not (unless everything that they do falls into the above catagories).

    Thus: Proprietry hardware companies that give open documentation are not 'despised'. Companies that write GPL code are not 'despised'. They are valuable members of the linux comunity.


    If your development model and community are so wonderful why do you accept handouts from proprietary companies?


    Because if it's GPL, and good, it gets in. It's not any more a handout than if you wrote some code, and submited it. There is nothing special about corporate ownership. If you have a problem with corporate submissions, you can modifiy the kernel, to remove their work. It's not a problem for me, or for the vast majority of the linux using comunity. I think that you seem to percive (or hold) an anti-corporate stance that is not representative of the comunity at large.