Y
Hacker News
new
|
ask
|
show
|
jobs
by
_9rq6
1864 days ago
is it GIL-free? Web servers are multi-core. Any fork of python should serve requests on all cores like golang and its scheduler does using goroutines.
1 comments
globular-toast
1864 days ago
You can easily do that by simply running N instances and distributing requests among them. No need for all the complication that would come with removing the GIL.
link
klibertp
1864 days ago
And pay in memory for that luxury: when using lots of complex libraries (like in ML) the Python process can eat quite a lot of RAM.
link
viraptor
1864 days ago
Since gc.freeze() got implemented (
https://docs.python.org/3/library/gc.html#gc.freeze
) having forked workers has much lower cost these days. As long as you can load your data pre-fork that is.
link
klibertp
1863 days ago
Wow, I missed its introduction. Nice. On a cursory glance Celery doesn't make use of it yet, unfortunately.
link
globular-toast
1864 days ago
Yes. Python is not without tradeoffs.
link