Sujet : Re: Does Python Need Virtual Threads? (Posting On Python-List Prohibited)
De : ldo (at) *nospam* nz.invalid (Lawrence D'Oliveiro)
Groupes : comp.lang.pythonDate : 16. Jun 2025, 02:14:34
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <102nr5q$17pa6$2@dont-email.me>
References : 1 2 3 4 5 6 7 8
User-Agent : Pan/0.162 (Pokrosvk)
On Sun, 15 Jun 2025 14:33:28 -0700, Paul Rubin wrote:
Lawrence D'Oliveiro <ldo@nz.invalid> writes:
>
Let's see how CPython holds up with a million OS threads running.
>
Linux can already run hundreds of thousands of processes/threads
To misquote Austin Powers, "one MILLLLLION threads". Here Erlang does
it in less than 1GB of memory:
https://hauleth.dev/post/beam-process-memory-usage/
Just a note that Erlang dates from before the current state of CPU
architectures, where you have a 100:1 disparity between RAM-access speeds
and CPU register-access speeds.
In other words, you do not want to copy stuff between processes if you can
help it. With threads sharing common memory, that data can reside in
caches that multiple threads in the same process context can share without
copying.