3 ms·
One upside of code increasingly being written in languages that are predominantly single threaded like Python/JS is that these issues do not matter as much.
by dman 7y ago
One upside of code increasingly being written in languages that are predominantly single threaded like Python/JS is that these issues do not matter as much.
- anonuser123456 7y agoIf you want to exploit parallel execution for performance, not having parallelism is not a benefit.
- PeterCorless 7y agoWe do parallelism across CPUs and nodes. We run single-threaded to get the most out of a CPU in a shared-nothing architecture. Many single-threaded apps aren't written to really take advantage of all a CPU has to offer. But there are also prices to pay to run multi-threaded; context switches, etc.
- wongarsu 7y agoNot having (thread-level) parallelism encourages designs with small, well defined interfaces where data crosses threads. In a typical NodeJS server setup with one load balancer and a number of node processes that don't know about each other you will experience fewer concurrency bugs and care less about NUMA than in the equivalent ASP.NET app (requests scheduled onto a thread pool, code can share resources at will). Of course sometimes "small interface" isn't really viable from a performance standpoint and you want a well-engineered multicore application with lots of shared data, and you just can't do that with JS or Python (or at least it's very hard). That's a good reason to choose a different language.
- PeterCorless 7y agoIn the case of Scylla, we run on the Seastar engine, which runs single-threaded per core because it is very "greedy." Hence the CPU being pegged at 100%. It wasn't thrashing. We just squeezed everything we could out of it.
- dman 7y agoI think Scylla is a bit of an outlier in terms of software quality :) [I mean that as a compliment]
- retrovm 7y agoBeing a good-enough CPU for terrible software is a bit of a tragic conclusion, in my view.
- loeg 7y agoARM definitely doesn't win on single thread performance, so this is even worse for ARM. No?