3 ms·
Performance is a myth too, performance of shared memory monoliths became uncompetitive long ago when they had to adopt to multi core systems, where locality, ba
by zzzcpan 7y ago
Performance is a myth too, performance of shared memory monoliths became uncompetitive long ago when they had to adopt to multi core systems, where locality, batching and asynchrony play very significant role. High performance research in networking and distributed system basically converged on asynchronously communicating isolated processes.
- gpderetta 7y agoit is quite the reverse: multicore systems means that shared memory monoliths need to be fast and a lot of transistors are spent to make sure that they are. There is a reason that multicore cpus do not look like networked machines. Cache coherency is optimistic, message passing is pessimistic.
- zzzcpan 7y agoNo amount of transistors can make shared memory monoliths fast on multicore systems, because the problem is in architecture unfriendly to such systems, not in hardware. Monoliths can be fast if they drop shared memory and use actor model, not atomics and mutexes and programming with shared memory. But then it would no longer make them monoliths. Basically what makes monoliths slow on multicore systems is also the thing that makes them not microkernels. I mean if you split everything into actors, why even run all of them in kernel? Group them into isolated OS processes.
- gpderetta 7y agoAnd yet the cell and the transputer have been relegated to the annals of computer history while NUMAcc is king.
- qznc 7y agoSynchronisation between two cores is fastest with hardware support, so shared memory with cache coherence protocol. Cache coherence protocol are all designed to keep everybody in sync. So if you scale to thousands of cores, you better sync selectively and application specific. Thus it makes sense to use message passing (actor model). It is unclear where the it makes sense to switch. Somewhere between 2 and 1000. Hybrids are also an option. Supercomputers often use OpenMP (shared memory) and MPI (message passing) in a two level way.
- adev_ 7y ago> Hybrids are also an option. Supercomputers often use OpenMP (shared memory) and MPI (message passing) in a two level way. Not some, almost all supercomputer nowadays use an hybrid model. For three main reasons: - Memory is a precious resource and separated process space + messaging is more memory hungry than a shared hybrid process space - Hybrid machines with CPU + GPU on every node are everywhere and they requires a shared memory model. - Debugging a pure MPI model at scale is a huge pain in the ass that take some of the most complex debugger in the planet.
- blattimwind 7y ago> There is a reason that multicore cpus do not look like networked machines. They don't? In practice cache coherency is a correctness mechanism; actually using shared memory concurrently R/W is problematic, performance wise. That's how we get scatter/gather-style systems, specifically to avoid concurrent R/W.
- topspin 7y ago> There is a reason that multicore cpus do not look like networked machines. Wait, what? I'm looking at an image of an unlidded Zen 2 CPU right now and it's a bunch of discrete compute devices surrounding a switch. Inside these devices are multilevel caches, just like real world network systems. The central "chiplet" multiplexes access to external buses over multiple serial PCI lanes; any network engineer would would recognize this pattern as trunking. All of this looks exactly like a network.
- gpderetta 7y agocores are definitely networked at the hardware level, what I meant is that they do not look like one at the software level.
- faissaloo 7y agoConsidering we're filling userland with crap like Node I don't even know if kernel performance is a relevant metric.