News for hackers. Stuff that matters.
Re:Is Parallel Programming Hard, and, If So, What Can You Do... by formerly_proven on Monday February 20, 2023 @03:24AM (#34866199)
Parallel programs are often way less efficient. Sure, communication is expensive and parallelism requires communication. On the other hand, they're often 2x less efficient or more. Poor scaling means you go beyond X-number of core/nodes (often a lower number than you'd like) and 90, 95, 99 % of the extra CPU power you throw at the application is burnt up in pure overhead.

A recent example I stumbled over is in backup tools. Borg (Python) uses less than half the CPU time of either Restic (Go) or Rustic (Rust) for the same work. The latter two are a bit faster (but not that much), but also use 4x and 2x more memory (also common for parallel programs, and more of an issue for messaging/queue-based approaches where a final bottleneck, like I/O, might produce large, full queues across the board). Interestingly enough none of these tools exceed 80 % CPU utilisation, so the -stic tools didn't actually need multiple threads and their inefficiencies in the first place.

There are no comments on this comment yet.