Re: Does Python Need Virtual Threads? (Posting On Python-List Prohibited)

Liste des GroupesRevenir à cl python 
Sujet : Re: Does Python Need Virtual Threads? (Posting On Python-List Prohibited)
De : ldo (at) *nospam* nz.invalid (Lawrence D'Oliveiro)
Groupes : comp.lang.python
Date : 17. Jun 2025, 03:12:03
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <102qiti$20fup$1@dont-email.me>
References : 1 2 3 4 5 6 7 8 9 10
User-Agent : Pan/0.162 (Pokrosvk)
On Sun, 15 Jun 2025 21:02:46 -0700, Paul Rubin wrote:

I'd be interested in seeing some benchmarks of multi-threaded Python
beating Erlang, if you have any to show.

Since you ask, I tried running up a simple program that creates lots of
dummy threads that do nothing but sleep for a few seconds, and reports on
its RAM usage by reading /proc/self/statm.

I am currently up to a bit over 25,000 threads (the default limit is
somewhere just under 26,000). The program reports its VM usage as over
200GB, which is way more than my total RAM + swap space, but in fact the
free(1) command reports that RAM and swap usage are nowhere that high. The
resident RAM usage while all the threads are running is reported at about
430MB.

In other words, multiply that by 40, and a million threads should get the
program’s RAM usage up to maybe 18GB.

Date Sujet#  Auteur
14 Jun 25 * Does Python Need Virtual Threads? (Posting On Python-List Prohibited)17Lawrence D'Oliveiro
14 Jun 25 +* Re: Does Python Need Virtual Threads? (Posting On Python-List Prohibited)10Paul Rubin
15 Jun 25 i`* Re: Does Python Need Virtual Threads? (Posting On Python-List Prohibited)9Lawrence D'Oliveiro
15 Jun 25 i `* Re: Does Python Need Virtual Threads? (Posting On Python-List Prohibited)8Paul Rubin
15 Jun 25 i  `* Re: Does Python Need Virtual Threads? (Posting On Python-List Prohibited)7Lawrence D'Oliveiro
15 Jun 25 i   `* Re: Does Python Need Virtual Threads? (Posting On Python-List Prohibited)6Paul Rubin
15 Jun 25 i    `* Re: Does Python Need Virtual Threads? (Posting On Python-List Prohibited)5Lawrence D'Oliveiro
15 Jun 25 i     `* Re: Does Python Need Virtual Threads? (Posting On Python-List Prohibited)4Paul Rubin
16 Jun 25 i      `* Re: Does Python Need Virtual Threads? (Posting On Python-List Prohibited)3Lawrence D'Oliveiro
16 Jun 25 i       `* Re: Does Python Need Virtual Threads? (Posting On Python-List Prohibited)2Paul Rubin
17 Jun 25 i        `- Re: Does Python Need Virtual Threads? (Posting On Python-List Prohibited)1Lawrence D'Oliveiro
14 Jun 25 `* Re: Does Python Need Virtual Threads? (Posting On Python-List Prohibited)6Mild Shock
23 Jun 25  `* async I/O via threads is extremly slow (Was: Does Python Need Virtual Threads?)5Mild Shock
23 Jun 25   `* What does stats = await asyncio.to_thread(os.stat, url) do? (Was async I/O via threads is extremly slow)4Mild Shock
23 Jun 25    `* What does the Async Detour usually cost (Was: What does stats = await asyncio.to_thread(os.stat, url) do?)3Mild Shock
23 Jun 25     `* Which Python System is affected? (Was: What does the Async Detour usually cost)2Mild Shock
24 Jun 25      `- Schachner, Joseph was the Big Moron [September 2021 16:30] (Was: Which Python System is affected?)1Mild Shock

Haut de la page

Les messages affichés proviennent d'usenet.

NewsPortal