Personal computing discussed

Moderators: SecretSquirrel, notfred

 
Greyguy 1948
Gerbil
Topic Author
Posts: 15
Joined: Wed Mar 29, 2017 6:32 am

Multithreading Linux vs Windows

Thu Mar 30, 2017 3:26 am

http://numberworld.org/y-cruncher/guides/multithreading.html

I am a bit confused about this link.
Normally Linux is doing well regarding multithreading for example in Spec 2006 and Geekbench 4.
Anything abnormal with Ubunto?
 
just brew it!
Gold subscriber
Administrator
Posts: 49711
Joined: Tue Aug 20, 2002 10:51 pm
Location: Somewhere, having a beer

Re: Multithreading Linux vs Windows

Thu Mar 30, 2017 8:08 am

Greyguy 1948 wrote:
http://numberworld.org/y-cruncher/guides/multithreading.html

I am a bit confused about this link.
Normally Linux is doing well regarding multithreading for example in Spec 2006 and Geekbench 4.
Anything abnormal with Ubunto?

While the article does specifically mention Ubuntu, it seems likely that this is not an Ubuntu-specific problem. More likely it is a performance regression in the specific Linux kernels used by those two Ubuntu versions. I have no idea whether the author tested any versions other than 15.04 and 15.10, but both of those are non-LTS "throw something over the fence and see what happens" releases, and IMO it is premature to draw any conclusions from just those two data points.

A more interesting test would be to compare the 14.04 and 16.04 Ubuntu LTS releases (or, say, Debian Squeeze with Debian Jessie). IOW, use kernels which are considered to be long-term stable production releases by major distros (so bugs and performance regressions are more likely to get addressed).
Nostalgia isn't what it used to be.
 
cheesyking
Minister of Gerbil Affairs
Posts: 2664
Joined: Sun Jan 25, 2004 7:52 am
Location: That London (or so I'm told)
Contact:

Re: Multithreading Linux vs Windows

Thu Mar 30, 2017 8:24 am

The exact same push pool code that achieves 4.24x speed up on 4 cores + HT on Windows achieves only 4.07x on Linux. The CPU utilization is significantly lower in Linux than in Windows. So far, this situation has resisted all attempts to study it. But everything seems to point at the kernel scheduler.


TBH it's a bit beyond what I've had to deal with in Linux but I understand the scheduler is said to be a bit weak.

https://blog.acolyer.org/2016/04/26/the-linux-scheduler-a-decade-of-wasted-cores/
Fernando!
Your mother ate my dog!
 
notfred
Maximum Gerbil
Posts: 4392
Joined: Tue Aug 10, 2004 10:10 am
Location: Ottawa, Canada

Re: Multithreading Linux vs Windows

Thu Mar 30, 2017 11:56 am

Interesting, looks like a few bugs in the scheduler and patches for them. Would be interesting to see if these patches got picked up by the kernel.
 
Greyguy 1948
Gerbil
Topic Author
Posts: 15
Joined: Wed Mar 29, 2017 6:32 am

Re: Multithreading Linux vs Windows

Thu Mar 30, 2017 12:01 pm

Thank you for your replies!
I were believing almost all Linux were the same (if they are X86_64).
This is from Debian:
http://benchmarksgame.alioth.debian.org/u64q/measurements.php?lang=gpp
All results are with Core 2 Quad. Some multi-threding alternatives are tested like Open MP.

Looking at SPEC almost everything Linux is Red Hat Enterprise. I guess Enterprise is needed for the biggiast system but anything Linux should do the small.
 
Glorious
Gold subscriber
Grand Admiral Gerbil
Posts: 10302
Joined: Tue Aug 27, 2002 6:35 pm

Re: Multithreading Linux vs Windows

Fri Mar 31, 2017 11:05 am

cheesyking wrote:
TBH it's a bit beyond what I've had to deal with in Linux but I understand the scheduler is said to be a bit weak.


For NUMA.

http://www.ece.ubc.ca/~sasha/papers/eur ... inal29.pdf

Hence, If you don't have a machine with NUMA (i.e. a "computer" that is a cluster of individual computers, or something with 2+ sockets that costs more than a light truck), these performance "bugs" aren't relevant to you. Even then, the paper is dealing with 8 memory domains, not the 2 or 4 you might see with an obscenely expensive high-end E5 or E7 system.
 
cheesyking
Minister of Gerbil Affairs
Posts: 2664
Joined: Sun Jan 25, 2004 7:52 am
Location: That London (or so I'm told)
Contact:

Re: Multithreading Linux vs Windows

Fri Mar 31, 2017 4:56 pm

Ah, i thought one of those bugs wasn't numa specific but there you go.

Would have been interesting in the author of the original numberworld link had tried a different scheduler since that's what he blamed for the performance difference.

What are your thoughts on that link?
Fernando!

Your mother ate my dog!
 
Glorious
Gold subscriber
Grand Admiral Gerbil
Posts: 10302
Joined: Tue Aug 27, 2002 6:35 pm

Re: Multithreading Linux vs Windows

Mon Apr 10, 2017 8:10 am

cheesyking wrote:
Would have been interesting in the author of the original numberworld link had tried a different scheduler since that's what he blamed for the performance difference.

What are your thoughts on that link?


Well, the std::async thing is obvious(and there no mention of what version of gcc either), and since there is no information given on their homegrown "push pool" implementation, it's difficult to say. It's not open source, but from what they say and from their other source-available tools, I'd suspect that they're using C++ and using some high-level abstraction that gcc doesn't handle as efficiently as it could. That's a very common situation.

They're sort of jumping the gun by pointing at the Linux scheduler in my opinion. They should be looking very hard at MSVC versus GCC, especially if they are using newer C++ features...

Who is online

Users browsing this forum: No registered users and 3 guests