Hacker News new | ask | show | jobs
by stefantalpalaru 4862 days ago
"Multi-threaded software goes up to about four cores, but past that point, it fails to get any benefit from additional cores."

Is there any basis for this affirmation or just the fact that his system has only 4 cores?

2 comments

My desktop is 6 hyperthreaded cores (12 "cores" total).

It's a general principle of why mobile phone CPUs aren't putting a lot more cores in their devices, and why they didn't go the Atom route of hyperhreading: code on cellphones fail to take advantage of the additional cores.

This article speaks in broad generalities that seemed to be based on the authors particular interests.

There is no reason why multi-threaded software can't scale near linearly for the right problems.

My point was to talk about the wrong problems.

Networking is actually a "right" problem, and should be nearly embarrassingly parallel since two cores and process two unrelated packets at the same time. But, if you look at network stacks on open-source projects, you see a lot of fail. That's the point of my post, as a reference to point to why that spinlock in your networking code is a bad idea, and why it's probably better to replace it with an atomic operation or a lock-free alternative.

> There is no reason why multi-threaded software can't scale near linearly for the right problems.

For the other problems, you're limited by Amdahl.