The Notebook Review forums were hosted by TechTarget, who shut down them down on January 31, 2022. This static read-only archive was pulled by NBR forum users between January 20 and January 31, 2022, in an effort to make sure that the valuable technical information that had been posted on the forums is preserved. For current discussions, many NBR forum users moved over to NotebookTalk.net after the shutdown.
Problems? See this thread at archive.org.

    Linux and multi-cores

    Discussion in 'Linux Compatibility and Software' started by f4ding, Jun 2, 2009.

  1. f4ding

    f4ding Laptop Owner

    Reputations:
    261
    Messages:
    2,085
    Likes Received:
    0
    Trophy Points:
    55
    How well does Linux handle multi-core? And multi-thread?
     
  2. Thomas

    Thomas McLovin

    Reputations:
    1,988
    Messages:
    5,253
    Likes Received:
    0
    Trophy Points:
    205
    Just fine....probably better than Windows.
     
  3. f4ding

    f4ding Laptop Owner

    Reputations:
    261
    Messages:
    2,085
    Likes Received:
    0
    Trophy Points:
    55
    Yea I've heard about that a lot. But just fine is the intriguing part. Do you know how fine?
     
  4. Dillio187

    Dillio187 Notebook Evangelist

    Reputations:
    56
    Messages:
    341
    Likes Received:
    0
    Trophy Points:
    30
    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.
     
  5. Bog

    Bog Losing it...

    Reputations:
    4,018
    Messages:
    6,046
    Likes Received:
    7
    Trophy Points:
    206
  6. f4ding

    f4ding Laptop Owner

    Reputations:
    261
    Messages:
    2,085
    Likes Received:
    0
    Trophy Points:
    55
    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.
     
  7. Pitabred

    Pitabred Linux geek con rat flail!

    Reputations:
    3,300
    Messages:
    7,115
    Likes Received:
    3
    Trophy Points:
    206
    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 ;)
     
  8. highlandsun

    highlandsun Notebook Evangelist

    Reputations:
    66
    Messages:
    615
    Likes Received:
    6
    Trophy Points:
    31
    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.
     
  9. f4ding

    f4ding Laptop Owner

    Reputations:
    261
    Messages:
    2,085
    Likes Received:
    0
    Trophy Points:
    55
    But is there any test done to show that there's no thread bouncing in Linux? The only legendary super efficient thread and process handler I've heard is with FreeBSD. I frankly have not heard much about Linux kernel in this area, although I've heard a lot of "in general it's better than Windows"....which is most likely true, but that's probably because Linux is used for servers more so it could be people just assume that.

    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.
     
  10. Pitabred

    Pitabred Linux geek con rat flail!

    Reputations:
    3,300
    Messages:
    7,115
    Likes Received:
    3
    Trophy Points:
    206
    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.