News for hackers. Stuff that matters.
Re:Single-chip processors have reached their limits by bob1029 on Monday April 04, 2022 @04:22PM (#30911526)
Despite the limitations apparently present in single chip/CPU systems, they can still provide an insane amount of performance if used properly.

There are also many problems that are literally impossible to make faster or more correct than by simply running them on a single thread/processor/core/etc. There always will be forever and ever. This is not a "we lack the innovation" problem. It's an information-theoretic / causality problem you can demonstrate with actual math & physics. Does a future event's processing circumstances maybe depend on all events received up until now? If yes, congratulations. You now have a total ordering problem just like pretty much everyone else. Yes, you can cheat and say "well these pieces here and here dont have a hard dependency on each other", but its incredibly hard to get this shit right if you decide to go down that path.

The most fundamental demon present in any distributed system is latency. The difference between L1 and a network hop in the same datacenter can add up very quickly.

Again, for many classes of problems, there is simply no handwaving this away. You either wait the requisite # of microseconds for the synchronous ack to come back, or you hope your business doesnt care if john doe gets duplicated a few times in the database on a totally random basis.

Re:Single-chip processors have reached their limits by tgamblin on Tuesday April 05, 2022 @12:11AM (#30915214)
All of this is true, but I’ll just be nitpicky to make a point:

> Does a future event's processing circumstances maybe depend on all events received up until now?

In a parallel prefix sum, the final sum does depend on all prior inputs, but a good parallel implementation runs in O(log(n)) time. It is, of course, not a total ordering problem, but that’s not obvious at first glance — I’ve always thought it was a beautiful example of something that appears to be entirely sequential but actually parallelizes really well.

All of which is to say that, yeah, we’re latency bound at the end of the day, but there’s a lot more innovation and performance left to be wrung out of most systems. A little creativity goes a long way, and I like the idea of a universe where the software is the main determinant of performance — where you can’t get away with just waiting for the next generation of chips.

Re:Single-chip processors have reached their limits by hvidgaard on Tuesday April 05, 2022 @02:50AM (#30916031)
It's a very simple example and knowing that addition is commutative, it's obvious that there is no ordering.
Re:Single-chip processors have reached their limits by pfdietz on Tuesday April 05, 2022 @08:15AM (#30918010)
Prefix sum depends on associativity, not commutativity.
Re:Single-chip processors have reached their limits by AnthonyMouse on Monday April 04, 2022 @06:10PM (#30912633)
The alternative is speculative execution. If you can guess what the result is going to be, you can proceed to the next calculation and you get there faster if it turns out you were right.

If you have parallel processors, you can stop guessing and just proceed under both assumptions concurrently and throw out the result that was wrong when you find out which one it was. This is going to be less efficient, but if your only concern is "make latency go down," it can beat waiting for the result or guessing wrong.

Re:Single-chip processors have reached their limits by tsimionescu on Monday April 04, 2022 @06:29PM (#30912820)
Not necessarily. There are problems you can't speed up even if you are given a literal infinity of processors - the problems in EXP for example (well, EXP - NP). Even for NP problems, the number of processors you need for a meaningful speed up grows proportionally to the size of the problem (assuming P!=NP).
Re:Single-chip processors have reached their limits by AnthonyMouse on Monday April 04, 2022 @06:40PM (#30912923)
Computational complexity and parallelism are orthogonal. Many EXP algorithms are embarrassingly parallel. You still have to do 2^n calculations, but if you have 1000 processors then it will take 1000 times less wall clock time because you're doing 1000 calculations at once.

The reason parallelism doesn't "solve" EXP problems is that parallelism grows linearly against something whose time complexity grows exponentially. It's not that it doesn't work at all, it's that if you want to solve the problem for 2n in the same time as for n, you need to double the number of processors. So the number of processors you need to solve the problem in whatever you define as a reasonable amount of time grows exponentially with n, but having e.g. 2^n processors when n is 1000 is Not Gonna Happen.

Having 1000 processors will still solve the problem twice as fast as 500, but that's not much help in practice when it's the difference between 50 billion billion years and 100.

Re:Single-chip processors have reached their limits by tsimionescu on Tuesday April 05, 2022 @05:07AM (#30916824)
A problem that is not in NP is, by definition, a problem that can't be solved in polynomial time even with an infinity of processors (or equivalently, with speculative execution given a perfect oracle). So, it can't be embarrassingly parallel.

So, a problem in EXP - NP (that is, it can be solved in exponential time, but it can't be solved in polynomial time even if given an infinity of processors) will require exponentially more time to solve for a higher n than a lower n, regardless of how many processors you have - even up to infinity. You may get some kind of speed-up with more processors, but it will not be enough to remove the exponential runtime blow-up.

An example of a problem like this is the Travelling Salesman Problem. As far as is known right now, there isn't even a non-determinstic algorithm that can solve the problem in polynomial time. Even if you had an infinity of processors, and could solve the problem for 1000 cities in 1 minute, you would still need ~2^1000 minutes to solve the problem for 2000 cities. Note: this bound is not proven, there may be some non-deterministic algorithm that can solve it in polynomial time.

I will also note that even for a problem that is in EXP and in NP, so an EXP problem that is embarrassingly parallel, doubling the problem size would require 2^n more processors to keep the same run time, not 2n (assuming it's time complexity is O(2^n)).

Re:Single-chip processors have reached their limits by chii on Monday April 04, 2022 @11:32PM (#30915032)
But what if the processor may be made organic, or encoded in DNA, so that replication and protein synthesis is akin to solving the problem? The "computer" grows exponentially, rather than linearly, and so for larger problems, it grows to the size that solves the problem?

Or we end up with grey goo...

Re:Single-chip processors have reached their limits by AbbeSomething on Tuesday April 05, 2022 @03:57AM (#30916396)
Are there any examples of reusable "computers" like this? I've seen some demonstrations but they are not generic to the problem and reusable, they seem to have the data encoded in the makeup of the "computer" itself.

I write computers in quotation marks because even if they solve computational problems they are so different from what we are calling computers today, eg: mold growing in a maze and similar.

Re:Single-chip processors have reached their limits by chii on Tuesday April 05, 2022 @05:27AM (#30916941)
None that are usable i'm sure - it's merely a theoretical idea.
Re:Single-chip processors have reached their limits by ReactiveJelly on Monday April 04, 2022 @09:28PM (#30914227)
Except that synchronizing two or more cores is, as a rule of thumb, too expensive to do per-instruction?
Re:Single-chip processors have reached their limits by josefx on Tuesday April 05, 2022 @10:00AM (#30919067)
It would have to be done on the same hidden low level register manipulation as current speculation already does. Instead of rolling back to the wrong branch and starting over you would just drop it and continue with the correct computation.

The issue would be if you have a slow (value load from memory) and a fast (cached value) branch, currently only the most often used one gets predicted, so if you always hit the fast branch the predictor will never touch the slow branch. I think if you evaluate both in parallel you end up having no way to avoid the penalties introduced by the slow path. Imagine having your CPU cache constantly invalidated by code that never "runs".

Re:Single-chip processors have reached their limits by userbinator on Monday April 04, 2022 @11:39PM (#30915065)
they can still provide an insane amount of performance if used properly.

In other words, software bloat has eaten up the bulk of the performance.

Re:Single-chip processors have reached their limits by eslaught on Tuesday April 05, 2022 @12:18AM (#30915251)
Like the sibling comments have indicated, many apparently sequential computations are actually parallelizable. I'll just add finite automata as another example in this category. On the surface it looks quite sequential (process one input at a time), but there are nice parallel algorithms that you can even implement on a GPU!

So yeah, there's a lot of nonobvious parallelism in the world. Just because something seems sequential doesn't mean it is.

I think the real reason why a lot of software is sequential/inefficient in practice is because we're just not smart enough to figure out how to optimize it (or don't have the proper incentives/it's not a priority). But that's something that's conceivably solvable; it's not limited by laws of physics the way hardware is.

Re:Single-chip processors have reached their limits by apbytes on Tuesday April 05, 2022 @02:42AM (#30915986)
Wait what‽ Do you have any resources you can point to for parallelism in finite automata?
Re:Single-chip processors have reached their limits by eslaught on Tuesday April 05, 2022 @02:46PM (#30923170)
It's been a while, but here are a couple things I found on Google for the search "finite automata gpu":

https://github.com/vqd8a/DFAGE

https://onlinelibrary.wiley.com/doi/epdf/10.1002/stvr.1796

Re:Single-chip processors have reached their limits by xyzzy21 on Tuesday April 05, 2022 @04:28PM (#30924576)
Good Coding is still in major deficit these days so absolutely true.

Going back to "coding intensity" that used to be common in 8-bit processors to overcome bloatware is still open territory. One may themselves code with libraries efficiently but the libraries are very seldom very efficient.

This is still one of the better ways of "extending Moore's Law" - stop bloating code.

Architecture innovation is another.

Chiplets is probably the best physical/electronics way right now to continue the status quo of laziness.