But the author literally starts by explaining that that's a typical argument for webservers because they're mostly I/O bound. Anyone working with code that's more CPU bound will have very different numbers, and interpret them differently.
But the author literally starts by explaining that that's a typical argument for webservers because they're mostly I/O bound. Anyone working with code that's more CPU bound will have very different numbers, and interpret them differently.
I'm not a web person, but can't you also gain I/O from parallelization? The I/O bound is waiting on responses right? So parallelization should increase I/O because you can make multiple asynchronous requests and even if there is dependence you can often stage or do partial computation in the mean time (at least this is common in scientific computing). (And if disk, well reading/writing to disk in parallel is far faster than serial but idk why you'd read/write to disk with pure python. Though it seems people do). So wouldn't this have significant effects that are more than the 36ms that we see in TFA? Or am I missing something and can someone explain why my guess is wrong?
All of this is why the GIL wasn't removed 20 years ago. There are real trade-offs here.
This is the reason why previous attempts were rejected. But those attempts came from single individuals and not from a photo sharing website.
This matters if --disable-gil becomes the default in the future and is forced on everyone.
https://dabeaz.blogspot.com/2011/08/inside-look-at-gil-remov...
However, PEP 703 specifically points out that performance-critical container operations (__getitem__/iteration) avoid locking, so I'm still highly skeptical that those locks are the cause of the 30-50%.
https://peps.python.org/pep-0703/#optimistically-avoiding-lo...
But I think you're right be sceptical that somehow this is to blame for the Python perf leak.
If a Linux process wants a million locks that's fine, that's just 4MB of RAM now.