How well does Linux handle multi-core? And multi-thread?
-
Just fine....probably better than Windows.
-
Yea I've heard about that a lot. But just fine is the intriguing part. Do you know how fine?
-
install an app that will monitor the different cores of your CPU and check it out yourself.
Conky and gkrellm are two good ones that come to mind. -
http://en.wikipedia.org/wiki/File:Operating_systems_used_on_top_500_supercomputers.svg -
With Core i7 coming out, I am specifically looking at this thread on anandtech and wondering how well OSes (Windows, Linux, OS X) on the desktop handles multi-core/multi-thread.
But probably this belongs in the more hardcore Linux forum anyway. -
Linux has very good thread and process handling, and has much less of a tendency to "lock up" under heavy processing loads than Windows does, at least in my experience. The software for the company I work for runs on Java and is threaded and memory intensive. We'll get performance boosts of 20%+ just switching from Windows to Linux on the same hardware. That's a very specific app, and not all apps show the same gains, but a properly programmed multithreaded app will not show many, if any slowdowns going to Linux, and quite possibly will be faster. I've got Windows 7 and Ubuntu 9.04 installed on an Athlon X2 4600+ machine with 6GB of RAM, so if I can run any threading benchmarks easily for you let me know. I'll think about some myself. You've got me curious
-
The OpenLDAP code runs about 2-3x faster on Linux than on Windows. (Mostly identical C source, with a few differences here and there for Winsock vs regular sockets...) It's heavily threaded, and has been tested using Linux on pretty large systems, e.g. 64 CPUs and 1TB of RAM. Windows can't get anywhere near touching that kind of performance.
-
Imagine a scenario, of a multi-core (say 4 cores) CPU system, where nothing is running on the CPU besides a multi-threaded app. And lets say it's been told to run on 2 cores. Now, that means there are 2 more cores free and not doing anything. Now, does the Linux kernel keep the app running on the two cores, or does it switch the app to the other two free cores unnecessarily? If you can do that test some how, that would be great. Because timing a particular app on two different platforms doesn't tell much, because they were probably designed to do some other extra stuff because of the different OSes. While overall you get which OS will run the software faster, what I am trying to figure out here is how efficient the thread and process handler for Linux.
I don't know what version of Windows those people in the anandtech forum are talking about, most likely Vista since I read that XP is really lame at handling multi-core/multi-thread. -
That would be a discussion for kernel.org and the lkml
I'm not enough of a gearhead to know what all the specific tweaks in the schedulers are, but I do know that you can choose your process/thread scheduler at compile time which can significantly affect how different jobs are prioritized. Ubuntu ships with both a -server and a -generic kernel, the generic one being tuned for desktop use and low-latency, and the server being tuned for backend loads like databases and web serving.
Linux and multi-cores
Discussion in 'Linux Compatibility and Software' started by f4ding, Jun 2, 2009.