Linux May Need a Rewrite Beyond 48 Cores 462
An anonymous reader writes "There is interesting new research coming out of MIT which suggests current operating systems are struggling with the addition of more cores to the CPU. It appears that the problem, which affects the available memory in a chip when multiple cores are working on the same chunks of data, is getting worse and may be hitting a peak somewhere in the neighborhood of 48 cores, when entirely new operating systems will be needed, the report says. Luckily, we aren't anywhere near 48 cores and there is some time left to come up with a new Linux (Windows?)."
Original Source and Actual Paper (Score:5, Informative)
It appears that the problem, that affect the available memory in a chip when multiple cores are working on the same chunks of data, is getting worse and may be hitting a peak somewhere in the neighborhood of 48 cores, when entirely new operating systems will be needed, the report says.
Seriously? You picked that over my submission?
I submitted this earlier this morning I guess my submission was lacking [slashdot.org]. But if you're interested in the original MIT article [mit.edu] and the actual paper [mit.edu] (PDF):
eldavojohn writes "Multicore (think tens or hundreds of cores) will come at a price for current operating systems. A team at MIT found that as they approached 48 cores their operating system slowed down [mit.edu]. After activating more and more cores in their simulation, a sort of memory leak occurred whereby data had to remain in memory as long as a core might need it in its calculations. But the good news is that in their paper [mit.edu] (PDF), they showed that for at least several years Linux should be able to keep up with chip enhancements in the multicore realm. To handle multiple cores, Linux keeps a counter of which cores are working on the data. As a core starts to work on a piece of data, Linux increments the number. When the core is done, Linux decrements the number. As the core count approached 48, the amount of actual work decreased and Linux spent more time managing counters. But the team found that 'Slightly rewriting the Linux code so that each core kept a local count, which was only occasionally synchronized with those of the other cores, greatly improved the system's overall performance.' The researchers caution that as the number of cores skyrockets [slashdot.org], operating systems will have to be completely redesigned [slashdot.org] to handle managing these cores and SMP [wikipedia.org]. After reviewing the paper, one researcher is confident Linux will remain viable for five to eight years without need for a major redesign."
I don't know, guess I picked a bad title or something?
Luckily we aren't anywhere near 48 cores and there is some time left to come up with a new Linux (Windows?).
Again, seriously? What does "(Windows?)" even mean? As you pass a certain number of cores, modern operating systems will need to be redesigned to handle extreme SMP. It's going to differ from OS to OS but we won't know about Windows until somebody takes the time to test it.
Re:Original Source and Actual Paper (Score:5, Funny)
What does "(Windows?)" even mean?
I read that as saying "Windows is the new Linux!". Clearly the submitter is trying to incite violence in the Slashdot community.
Re:Original Source and Actual Paper (Score:4, Funny)
Wait, Macs don't suck?
Re:Original Source and Actual Paper (Score:5, Interesting)
Re:Original Source and Actual Paper (Score:5, Interesting)
The thing is eldavojohn practically *is* an editor for /. , just check out his submission page. Despite having such a high UID he's got a solid reputation, a good writing style, and offers good commentary on a wide variety of topics.
Re:Original Source and Actual Paper (Score:5, Insightful)
So what the fuck is he doing here then? (Score:5, Funny)
Lets drive the greenhorn OUT! No filthy high UID's with their spelling and gramar and solid well researched non-sensationlist writing. I want my editors to rape the language (bonus points if it is several languages at once) and sent my heart racing by raising my bile and fear of the unknown and known.
Headlines sell adverts. Truth, accuracy, honesty do not. Accept it, you are reading slashdot, it works.
Re:So what the fuck is he doing here then? (Score:4, Insightful)
No, I read /. because of comments like eldavojohn's. If they were to disable the comments I'd unsubscribe it from my feeds immediately.
Re: (Score:3, Funny)
Which is exactly why he _cant_ be a /. editor.
Re:Original Source and Actual Paper (Score:5, Insightful)
The very act of summarization constitutes an act of commentary. You're saying "I think the pertinent parts of this story are these, and the most important questions raised are those."
A good summary invites commentary and frames the questions in a way which makes for better discussion, but don't for a second imagine the OP ought to be value-neutral (if such a thing could even exist.)
Re:Original Source and Actual Paper (Score:5, Interesting)
Yes it is lacking: it's too long for a /. "story". Editors want small, easily digested soundbites, not articles with actual information.
Re:Original Source and Actual Paper (Score:4, Informative)
The original summary was lacking but the alternative proposed summary was WAY too long.
It's just supposed to pique my interest enough to read the article, not run several pages.
Re:Original Source and Actual Paper (Score:5, Informative)
I just laughed at the "we aren't anywhere near 48 cores" comment - there are already commercial products with more than 48 cores now. I mean even a crappy old T5220 pretends to have 64 CPUs due to the 8 CPU, 8 thread design.
Re:Original Source and Actual Paper (Score:4, Informative)
Got a pile of AIX servers here like that:
http://www-03.ibm.com/systems/power/hardware/780/index.html [ibm.com]
I was kind of wondering about the "modern operating systems" comment... I think he meant "desktop operating systems".
Many of the big OS vendors (IBM, DEC (now HP), CRAY, etc) are well beyond this point. Even OS/2 could scale to 1024 processors if I recall correctly.
Re: (Score:3, Informative)
OS/2's SMP support is a joke. I'm sure that somewhere in that tangle is a comment like "up to 1024 processors". But it's as relevant as a sticker on a Ford Cortina warning not to exceed the speed of sound.
Officially the SMP version of OS/2 "Warp Server" supported 64 processors. In practice anything other than an embarrassingly parallel task would see rapidly diminishing returns after just a couple of CPUs. The stuff that this article is moaning about, that Linux doesn't do well enough on 48 CPUs? OS/2 doesn
Re: (Score:3, Funny)
Re:Original Source and Actual Paper (Score:5, Insightful)
I was kind of wondering about the "modern operating systems" comment... I think he meant "desktop operating systems".
What's a "desktop operating system" these days ? The only mainstream OS that hasn't seen extensive use and development in SMP server environments for a decade plus is OS X. For all the others, "desktop" vs "server" is just a matter of the bundled software and kernel tuning.
Even OS/2 could scale to 1024 processors if I recall correctly.
Yeah. Just like those old PPC Macs were "up to twice as fast" as a PC.
Re: (Score:3, Informative)
nevermind quite an standard server, a dual xeon 6core HT... total reported CPUs is 24, and it's quite a lot used and nothing special.
Re:Original Source and Actual Paper (Score:5, Informative)
and YET...that's irrelevant, because as many people have pointed out the problem is the cores that share L2 cache. There have been large systems with many, many processors for a long time, some of which run Linux. The problem that was described was 48cores on a single die, sharing the same cache. Sun's die-to-die tech isn't relevant to this problem, nor is putting more than 6 8-core CPUs in a single system.
Re: (Score:3, Insightful)
I just read the original article that said they used 8 6-core processors to _simulate_ 48-core processor. It would be hard to experiment on a real 48-core processor as those are not readily available.
Re:Original Source and Actual Paper (Score:5, Insightful)
Re: (Score:3, Insightful)
Elaborate please. I'm ignorant and curious.
Re: (Score:3, Informative)
Re:Original Source and Actual Paper (Score:4, Interesting)
You can also think of it as the difference between rooms and buildings. Multiple cores may exist in a single CPU just like multiple rooms may exist in a building. Getting around between rooms in the same building isn't such a big deal. But getting from Room A in Building 1 to Room B in Building 2 requires you to leave Building 1 and then enter Building 2, which takes more time. Some motherboards support multiple CPUs (buildings) but most do not. Those that do are usually more expensive than the ones that support only a single CPU.
Re:Original Source and Actual Paper (Score:4, Interesting)
And multiple threads per core can be thought of as say, movable dividers in rooms. Yeah, it's really one room, but you can divide it into 2 "sort of", and it doesn't really mean you have twice as many rooms, but there are certain benefits you can get from doing so.
Re: (Score:3, Insightful)
Think of in terms of cars. The processes are roads, the CPUs are cars and the cores are the seats in the cars, only the seats can each travel on different roads independently and share resources with the other seats in the same car. If you have a 2-seater and the seats are on different roads, they can obviously only go half as fast as if they are on the same road. Now if you have 48 seats in a car, than it isn't a car anymore, it's a bus, so obviously you'd have to make fundamental changes to the OS.
When
Re:Original Source and Actual Paper (Score:4, Informative)
To elaborate slightly further... If you had two CPUs on your motherboard with 8 cores each and four threads of execution per core, you'd have a total of: 2 CPUs, 16 cores, and 64 threads of execution.
Re:Original Source and Actual Paper (Score:4, Interesting)
And it's worth noting that the most common application for that kind of machine is to partition it and run several different operating systems on it. Solaris has already had some major redesign work for scaling that well. For example, the networking stack is partitioned both horizontally and vertically. Separate connections are independent except at the very bottom of the stack (and sometimes even then, if they go via different NICs), and each layer in the stack communicates with the ones above it via message passing and runs in a separate thread.
However, it sounds like this paper is focussing on a very specific issue: process accounting. To fairly schedule processes, you need to work out how much time they have spent running already, relative to others. I'm a bit surprised that Linux actually works as they seem to be describing, since their 'change' was to make it work in the same way as pretty much every other SMP-aware scheduler that I've come across; schedule processes on cores independently and periodically migrate processes off overloaded cores and onto spare ones.
There are lots of potential bottlenecks. The one I was expecting to hear about was cache contention. In a monolithic kernel, there are some data structures that must be shared among each core and every tim you do an update on one core you must flush the caches on all of them, which can start to hurt performance when you have lots of concurrent updates. A few important data structures in the Linux kernel were rewritten in the last year to ensure that unrelated portions of them ended up in different cache lines, to help reduce this.
Even then, it's not a problem that's easy to solve at the software level. Hardware transactional memory would go a long way towards helping us scale to 128+ processors, but the only chip I know of to implement it (Sun's Rock) was cancelled before it made it into production.
Re:Original Source and Actual Paper (Score:5, Informative)
Unfortunately, the summary as well as the short articles on the web were more or less completely missing the point. The actual paper ( http://pdos.csail.mit.edu/papers/linux:osdi10.pdf [mit.edu] ) explains what was done.
Essentially they benchmarked a number of applications, figured out where the bottlenecks were, and fixed them. Some of the things they fixed where done by introducing "sloppy counters" in order to avoid updating a global counter. Others were to switch to more fine-grained locking, switching to per-cpu data structures, and so forth. In other words, pretty standard kernel scalability work. As an aside, a lot of the VFS scalability work seems to clash with the VFS scalability patches by Nick Piggin that are in the process of being integrated into the mainline kernel.
And yes, as the PDF article explains, the Linux cpu scheduler mostly works per-core, with only occasional communication with schedulers on other cores.
Re:Original Source and Actual Paper (Score:5, Informative)
You're trying to compare a 48-cylinder engine with a bunch of 4-cylinder engines working together.
Re: (Score:2, Informative)
I don't know, guess I picked a bad title or something?
No. Your summary was too long.
Seriously, the purpose of a summary is not to include every last fact and detail mentioned in the article; it's to give the reader enough information to decide whether reading the full article is worth it. Don't try to put everything in there.
Re: (Score:3, Informative)
the purpose of a summary is not to include every last fact and detail mentioned in the article; it's to give the reader enough information to decide whether reading the full article is worth it.
If you think a summary can actually help get a /. reader to RTFA, you must be new here...
Re:Original Source and Actual Paper (Score:5, Informative)
If the summary was too long, the editor should have got off his arse rather than wait for the summary that fits the word count to come along.
Re:Original Source and Actual Paper (Score:4, Insightful)
Yes, but the submission that got accepted has a bullshit headline.
Of course "Linux May Need to Continue Making Incremental Changes Like It Has Been Doing For The Last Several Years To Scale Beyond 48 Cores" doesn't draw in as many clicks.
Re: (Score:3, Informative)
I've seen longer stories about lamer things get published...
Re: (Score:3, Funny)
it's to give the reader enough information to decide whether reading the full article is worth it.
We are supposed to read the articles? Why didn't anyone tell me about this before?!!
Re: (Score:2)
I thought he was implying that we will also need to come up with a new Windows.
Re:Original Source and Actual Paper (Score:4, Interesting)
Scare piece.
Your submission wasn't scaring enough. From your submission, it seems that it's not that big of a deal and rather easy solution. This submission makes it sound like linux kernel needs a complete rewrite ground-up, as in starting from scratch.
Plus yours was a bit long and lots of details.
Windows 7 scales to 256 cores (Score:2)
Windows 7 supposedly scales upto 256 cores.
See http://channel9.msdn.com/shows/Going+Deep/Mark-Russinovich-Inside-Windows-7/ [msdn.com]
Re:Windows 7 scales to 256 cores (Score:4, Insightful)
Linux supposedly scales to 1024 or something like that. This is not what they supposedly scale to, but the performance impact of actually trying to use that many cores.
Re:Windows 7 scales to 256 cores (Score:4, Insightful)
The point isn't that NT Scales to 256 cores, the point is how efficient it is when scaling to this many processors. The NT Kernel in Win7 was adjusted so that systems with 64 or 256 CPUs have a very low overhead handling the extra processors.
Linux in theory (just like NT in theory) can support several thousand processors, but there is a level that this becomes inefficient as the overhead of managing the additional processors saturates a single system. (Hence other multi-SMP models are often used instead of a single 'system')
Just simply Google/Bing: windows7 256 Mark Russinovich
You can find nice articles and even videos of Mark talking about this in everyday terms to make it easy to understand.
Re: (Score:3, Informative)
The point is the article dealing with a simulated theoretical cpu with 48+ cores on a single die with shared l2 cache.
The changes made are incremental and I imagine will be dealt with long before this actually becomes an issue when (or if) we get cpus with that many cores on a single die.
multi socket systems are already immune to this the way it is setup, you could have an 8 socket system with each cpu having 8 cores and it would not show the problems shown in the article.
In other words, business as usual,
Re: (Score:3, Insightful)
I don't know, guess I picked a bad title or something?
Slashdot: dramatically overstated news for nerds... since that seems to be the evolution of news services for some reason?
I'm working on a submission: Fox news just had a bit about the internet, I'm assuming that their headline is something like "WILL USING OBAMANET 'IPv6' KILL YOU AND MAKE YOUR CHILDREN TERRORISTS?"
Re: (Score:3, Informative)
If it is any consolation this straw is the one that broke the RSS feed's back.
I have unsubscribe from Slashdot today due to the trend typified in your article VS the one published. (No this is not a new trend, but I'm fed up and finished with it.) See you on Reddit's Science/Linux/Everything else
Re: (Score:3, Interesting)
you are not in the club of liked submitters. Honestly the number of crap submissions that get picked over well thought out and very well cited ones is nuts to the point that I simply stopped submitting stories here. Its a waste of time.
Re: (Score:3, Insightful)
Completely agree.
Of course, this all ignores the fact that Linux already scales well beyond 48 cores. Even more so, it appears the group is confusing bus contention for OS scalability. The problem is, using modern CPUs (cores), they are sharing caching, which is all too frequently the real problem. The shared cache leads to cache contention.
Linux, right now, is capable of scaling well beyond 128 cores (err...cpus)...and more... Its just not standard code because the overhead is less optimal for 99.999% of t
Re: (Score:3, Funny)
Re: (Score:3, Funny)
Fuck, dude, we hurd you the first time. and "GNU Plus Linux" is terrible marketing.
Re:Original Source and Actual Paper (Score:5, Insightful)
Trolling, I'm sure, but to people who take "GNU/Linux" seriously: how much of any given distro is really GNU code anymore? While GNOME may still be preferred by Ubuntu, there are also a lot of Kbuntu users, and many other distros seem to prefer KDE. Neither XFree86 nor X.Org were ever GNU. Smaller installations, like smartphones and home gateways (which often do run Linux, even if you can't install a custom version like DD-WRT), use busybox for their basic command line tools, and almost certainly do not use glibc. Debian even went for the eglibc fork [osnews.com], partially because Ulrich Drepper makes Theo DeRaadt look like a nice guy. HURD has gone nowhere for 20 years now, even if it does have some neat ideas.
Non-GNU GUI applications and libraries now make up a huge percentage of a desktop distro, Apache and custom web apps make up a big chunk of server code, and smartphones may or may not have any GNU code at all.
So what's left of GNU code now? Well, gcc is likely to keep being the world's de facto C compiler (though even this was mainly because of the egcs fork way back when). I'm sure there will be legions of emacs users for years to come, and I guess a lot of people still prefer GNOME. GNU's basic command line tools and bash will no doubt still be used on servers and desktops. But is this really sufficient to warrant a "GNU/Linux" nomenclature, not to mention all the pedantry that surrounds it?
To the AnonCow troll above: GNU code has nothing to do with how the kernel handles multicore processors, so your whole point is moot within this context.
Comment removed (Score:4, Insightful)
Re:Original Source and Actual Paper (Score:5, Informative)
Actually, I doubt that is true. At this point, the commercial UNIX vendors and the BSDs seem to be putting their weight behind Clang/LLVM/LLDB, in large part due to GCC going GPLv3. In addition to being a cleaner architecture that's easier to enhance than GCC, it is also faster, and it often produces much better code as well. The GNU toolchain's days as the de facto standard are numbered, IMHO.
Back on topic, it occurs to be that large clusters with hundreds of cores start to inherently behave a lot more like NUMA and really need to be treated that way. Note that lots of modern OSes, including Linux, have supported NUMA in the past, so suggesting that it requires a completely rewritten OS is a preposterous assertion. That's not at all what this article is saying. What this article is saying is that tasks often are not easily divisible into tasks small enough to take advantage of multiple cores, and that managing processor affinity to ensure that threads working on the same data are run on the cores within the same physical die starts to become an unmanageable problem past a certain point.
In effect, what it is saying is that barring interconnect improvements, for many classes of problems, the performance penalty caused by multiple cores needing to access the same data exceeds the performance gain from adding additional cores at or around 48 cores. No OS change will help this, and in many cases, no software changes can help this, either. Most computing tasks are simply not massively parallelizable. This conclusion should be entirely expected by anybody who has ever tried to parallelize software to any real degree, but it's always good to see studies that bear out.
Put another way, once you exceed about 48 cores, the cores start to act more like clusters than cores. You start to see more and more accesses in which one CPU has to force data out of another CPU's cache. The nonuniformity of memory accesses starts to dominate the access times. Thus, past about that point (and probably much lower for most problems), adding more cores no longer improves performance. Even for massively parallelizable problems like video compression, once you exceed a certain number of nodes doing the work, the time spent assembling the final data actually exceeds the performance win achieved by adding additional processing nodes. This is completely straightforward, completely understood by real-world computer programmers, and shouldn't really be a surprise to anyone.
I'm not convinced an OS change can fix this, nor even an architectural change, though both can help to some degree by making parallelization easier (e.g. by providing APIs for supporting work units arranged in a dependency graph like GCD as an alternative to raw thread-based APIs). At some point, though, you're bounded by the number of distinct pieces that a problem can be divided into that don't depend on the output of any other piece, and once you hit that limit, adding additional computational units can only hinder performance, not help it. Your only real choices, then, are to find new and interesting ways to refactor the problem so that this is no longer the case, to change the structure of the input data to remove dependencies, to increase the speed of the individual CPU cores, or to turn the machines loose processing more than one problem at any given time to keep the remaining cores occupied.
Oh, yeah, and there's one other change that helps a lot: keep your read-only data in read-only pages, and write your code so that results go somewhere else. Read-only pages can be cached in every CPU without any real cache coherency overhead, at least in theory (I'm assuming that most modern CPUs do this), which means that input data sharing between CPUs doesn't matter. This design, combined with lockless work unit APIs, can make a huge difference in how many CPU
Re:Original Source and Actual Paper (Score:4, Informative)
This is not Amdahl's law, this is the dispatcher being inefficient.
You're Welcome! (Score:3, Funny)
However, posting your own post [slashdot.org] in your own post is a bit excessive, and there could have been better ways to do this than just repost your entire freakin story as the first comment.
Yo dawg, I heard you liked my post so I put a post inside my post so you could enjoy it while you're enjoying my post!
Re: (Score:3, Informative)
Re:Original Source and Actual Paper (Score:4, Informative)
I saw earlier today on another news site a post about something similar saying that no OS commercially made can support more than 32 cores.
One of the followup postings was someone with an IBM 780 doing a prtconf|grep proc and showing 64 virtual processors on an LPAR. AIX supports up to 256 CPUs (physical or virtual.) I'm sure Solaris can do similar without breaking a sweat.
Re:Original Source and Actual Paper (Score:4, Informative)
SGI runs Single System Image Linux systems with over 1000 cores, that's not the problem. If you read the article it seems that they aren't talking about the number of cores in the system, they're talking about the number of cores on a chip. Multicore chips use shared caches. the problem is that the algorithms used to handle CPU caching don't scale to really huge numbers of cores sharing the cache in a single chip. Having 4X16 core chips will work fine, having a single 64 core chip will present difficulties. At least that's how I understand the article.
Re: (Score:3, Funny)
SGI runs Single System Image Linux systems with over 1000 cores, that's not the problem.
640 cores should be enough for anyone.
Re: (Score:3, Funny)
Nah, jokes like "64xx should be enough for anybody" actually suck the humor out of the reader due to old age. The GP is probably an inmate in the Home for the Terminally Bland.
Re: (Score:3, Insightful)
I'm willing to bet that when mainstream 64-core general-purpose CPUs arrive, they will be NUMA and be partitioned in groups with shared cache. I will be surprised if all the cores have a shared cache other than possibly a large slow write-through level-4 cache. It would be very tricky to make an efficient modern cache with deferred writeback and access by 64 cores, and the gains over e.g. 4 smaller caches would be modest. The memory bandwidth requirements of a 64-core chip also make it very tempting to impl
Re: (Score:3, Informative)
While NT was originally supposed to be called OS/2 3.0, it was a new OS developed by Cutler and some other devs from DEC, not continued development of the OS/2 code.
Linux already runs on thousands of cores (Score:3, Insightful)
SGI has some awfully big single-system-image linux boxes.
I saw a comment on the kernel mailing list about someone running into problems with 16 terabytes of RAM.
Comment removed (Score:5, Interesting)
Re:Linux already runs on thousands of cores (Score:5, Informative)
I thought this as well, but after more carefully reading the article, I *think* I see what the problem is. It's not really a problem with large numbers of cores in a system, so much as a problem with large numbers of cores on a chip. Since the multicore chips share caches (level 2 cache is shared, level 1 cache isn't IIRC, but I could be wrong) it's actually cache memory where the issue lies. I've worked on single system image SGI systems with 512 cores, but those systems were actually 256 dual core chips. That works fine, and assuming well written SMP code performance scales as you'd expect with number of cores.
Re: (Score:3, Interesting)
Re:Linux already runs on thousands of cores (Score:4, Interesting)
SGI has some awfully big single-system-image linux boxes.
Not really. SGI has big NUMA machines, with a single Linux kernel per node (typically under 8 processors), some support for process / thread migration between nodes, and a very clever memory controller for automatically handle accessing and caching remote RAM. Each kernel instance is only responsible for a few processes. They also have a lot of middleware on top of the kernel that handles process distribution among nodes.
It's an interesting design, and the SGI guys have given a lot of public talks about their systems so it's easy to find out more, but it is definitely not an example of Linux scaling to large multicore systems.
Re:Linux already runs on thousands of cores (Score:4, Interesting)
Error in their math (Score:5, Funny)
They have an one-off error in their math, it's actually 9 times a 6 core CPU. So, at 42 cores a rewrite is needed.
Not close yet? (Score:2)
Dunno... I am typing this on a system with 12 cores and 24 virtual cores. And the GPU has somewhere around 1600 cores... Other systems I've worked with have hundreds to thousands of cores so I think we are pretty close...
Seriously though, these issues have been known for a while but will have to trickle down to desktop OSs to deal with caching and shared memory.
Enough (Score:3, Funny)
Re: (Score:3, Funny)
lol i dont see why people cant be happy with a quad it gets the job done if you need more than 4 cores you should just shoot yourself
I'll hand out guns to the scientists then. Maybe they'll be willing to donate their punctuation to you as well.
What are they talking about (Score:5, Insightful)
Re:What are they talking about (Score:5, Informative)
What they are talking about really reduces to a variant of Ahmdals Law, but simply put scaling is always non-linear. There will be overheads per core for communication (why is why SMP over 16 CPUs is such a headache) and overheads per core within the OS for housekeeping (knowing what core a specific thread is running on, whether it is bound to that core, etc, and trying to schedule all threads to make best use of the cores available).
The more cores you have, the more state information is needed for a thread and the more possible permutations the scheduler must consider in order to be efficient. Which, in turn, means the scheduler is going to be bulkier.
(Scheduling is a variant of the box-packing problem, which is an NP-Complete problem, but it has the added catch that you only get a very short time to pack the threads in and scheduling policies - such as realtime and core-binding - must also be satisfied in addition to packing all the threads in.)
The more of this extra data you need, the slower task-switching becomes and the more of the cache you are hogging with stuff not actually tied to whatever the threads are actually doing. At some point, the degradation in performance will exactly equal the increase in performance for the extra cores. The claim is that this happens at 48 cores for modern OS'. This is plausible but it is unclear if it is an actual problem. Those same OS' are used on supercomputers of 64+ cores, by segregating the activities in each node. MOSIX, Kerrighd and other such mechanisms have allowed Linux kernels to migrate tasks from one node to another transparently. (ie: You don't know or care where the code runs, the I/O doesn't change at all.) The only reason Linux doesn't have clustering as standard is that Linus is waiting for cluster developers to produce a standard mechanism for process migration that also fits within the architectural standards already in use.
If you clustered a couple of hundred nodes, each with 48 cores, you're looking at having around 2000+ on the system. It wouldn't take a "rewrite" per-se, merely a few hooks and a standard protocol. To support a single physical node with more than 48 cores, you might need to split it into virtual nodes with 48 or fewer cores in each, but Linux already has support for virtualization so that's no big deal either.
Only Linux? (Score:4, Interesting)
Re:Only Linux? (Score:4, Insightful)
Re: (Score:3, Informative)
The problem isn't scaling to that number of cores but the overhead in doing so. That's what i took from it
Re: (Score:3, Informative)
They did not "rewrite the kernel" for 7. They updated the code, just like every other piece of software normally does when it moves from version to version. Rewriting the kernel implies that they tore it down and started over, which is most certainly not true. Vista/2008 is NT version 6.0, 7/2008 R2 is NT version 6.1, not a rewrite.
Re: (Score:3, Insightful)
No, their rewrite is also subject to to this issue. Go publicize Windows somewhere else.
No, it isn't subject to this issue. They removed the dispatcher lock. Go bash Windows somewhere else.
based on a 1970s OS and language (Score:2, Troll)
Re:based on a 1970s OS and language (Score:5, Insightful)
Hahaha. Oh arrogances from ignorance, how I loath you.
64 cores (Score:3, Interesting)
At my last job we had a bunch of Sun T5120s which housed 64 cores. So yeah, we are "anywhere near 48".
Jaguar? (Score:2, Insightful)
48 cores? (Score:4, Funny)
I'm still waiting for Windows to work well on ONE.
Re: (Score:3, Interesting)
OK, I just use it on this box because there are a couple of programs I like not available for native Linux yet but at least it's not Vista or ME bad.
One trick in business and politics is to offer a bad choice next to a worse one so it doesn't seem as bad by comparison. Every time I see or hear that comment the conspiracy theorist in me wonders whether ME and Vista were deliberately bad to soften the shock of adjustment to XP and 7.
seeing as Linux does 10240 cores already, WTF? (Score:5, Interesting)
No kidding. SGI's Altix is a huge box full of multi-core IA-64 processors. 512 to 2048 cores is more normal, but they were reaching 10240 last I checked. This is SMP (NUMA of course), not a cluster. I won't say things work just lovely at that level, but it does run.
48 cores is nothing.
Re:seeing as Linux does 10240 cores already, WTF? (Score:4, Informative)
I think specifically they are talking about having 48 cores behind an L2 cache. Or 48 cores on a single die. Multi-CPU boxes generally communicate between CPU dies via the bus and from what little I can gather, that helps reduce or eliminate the issue they're describing..
that's crazy (Score:3, Funny)
Nobody's every going to need more than 640 cores
how is this news? (Score:4, Insightful)
We've known about this problem for ... well, as long as we've had more than one core - actually as long as we've had SMP... You increase the number of cores/CPUs, you decrease available memory thruput per core, which was already the bottleneck anyway. Am I missing something here?
Patches available (Score:4, Informative)
So, they found scalability problems in some microbenchmarks. Well, some of the scalability paths cited in the paper [mit.edu] will be fixed when Nick Piggin's VFS scalability patchset gets merged. But it's not like you need to rewrite every operative system to scale beyond 48 cores, it's just the typical scalability stuff, and the kind of scalability issues found these days are mostly corner cases (Piggin's VFS being an exception).
Just the cache problem (Score:5, Informative)
What they're saying is basically two things:
First, there's a bottleneck in the on-chip caches. When a core's working on data it needs to have it in it's cache. And if two cores are working on the same block of memory (block size being determined by cache line size), they need to keep their copies of the cache synchronized. When you get a lot of cores working on the same block of memory, the overhead of keeping the caches in sync starts to exceed the performance gains from the additional cores. That's not new, we've known that in multi-threaded programming for decades: when you've got a lot of threads dependent on the same data items, the locking overhead's going to be the killer. And we've known the solution for just as long: code to avoid lock contention. The easiest is to make it so you don't have multiple threads (cores) working on the same (non-read-only) memory at the same time, that just requires some thinking on the part of the developers.
Second, you only gain from additional cores if there's workload to spread to them usefully. If you've got 8 threads of execution actually running at any given time, you won't gain from having more than 8 cores. And on modern computers often we don't have more than a few threads actually using CPU time at any given moment. The rest are waiting on something and don't need the CPU and, as long as we aren't thrashing execution contexts too badly, they can be ignore from a performance standpoint. To take advantage of truly large numbers of cores, we need to change the applications themselves to parallelize things more. But often applications aren't inherently multi-threaded. Games, yes. Computation, yes. But your average word processor or spreadsheet? It's 99% waiting on the human at the keyboard. You can do a few things in the background, file auto-save and such, but not enough to take advantage of a large number of cores. The things that really take advantage of lots of cores are things like Web servers where you can assign each request to it's own core. And no, browsers don't benefit the same way. On the client side there are so (relatively) few requests and network I/O's so slow relative to CPU speed that you can handle dozens of requests on a single core and still have cycles free assuming you use an efficient I/O model. But it all boils down to the developers actually thinking about parallel programming, and I've noticed a lot of courses of study these days don't go into the brain-bending skull-sweat details of juggling large numbers of threads in parallel.
K42: these problems were already tackled (Score:5, Informative)
The K42 project [ibm.com] at IBM Research investigated the benefit of a complete OS rewrite with scalability to very large SMP systems in mind. This is an open source operating system supporting Linux-compatible API and ABI.
Their target systems, "next generation SMP systems", back in 2003 seems to have become the current generation of SMP/multi-core systems in the meantime.
Tilera? (Score:3, Informative)
Tilera Corp. already has CPU architecture with 16-100 cores per chip.
TILE-Gx family [tilera.com]
Support for these is already being included in the mainline kernel.
Slashdot (Score:4, Funny)
...there is some time left to come up with a new Linux (Windows?).
Windows, the new Linux.
You read it here first...
Linux now works for 4096 cores! (Score:5, Funny)
(But a non-proprietary NVIDIA driver will still not play your Flash movies smoothly. [xkcd.com] :P)
BS on not being near 48 cores... I have 34 already (Score:3, Informative)
Re: (Score:3, Informative)
An E10K is a glorified network computing cluster.
It's not what's being discussed at all.
Re: (Score:3, Informative)
Yes, you can play smooth full-screen video in Linux with the "Square" preview release [adobe.com] (which includes 64 bit support). Full-screen 720p video only uses 30-40% of the CPU on my crappy Intel graphics chip, and it's completely smooth.
Re: (Score:3, Funny)
If you have 4,096 CPUs I don't think that "smooth flash playback" is a problem.
4,095 CPUs however...
Re: (Score:3, Informative)
OpenSolaris is dead. Solaris sucks to use without GNU userland anyway and being sued by oracle is no fun. Besides you troll, this would not need a new linux, just some small changes to the current one.
Re: (Score:3, Interesting)
Re: (Score:3, Insightful)
PER CPU. As was pointed out in many other comments. Linux has already scaled to thousands of cores across many cpus.