CPython thread starvation

John Nagle nagle at animats.com
Sat Apr 28 00:47:34 EDT 2012


On 4/27/2012 9:20 PM, Paul Rubin wrote:
> John Nagle<nagle at animats.com>  writes:
>
>> The code that stored them looked them up with "getaddrinfo()", and
>> did this while a lock was set.
>
> Don't do that!!
>
>>     Added a local cache in the program to prevent this.
>> Performance much improved.
>
> Better to release the lock while the getaddrinfo is running, if you can.

    I may do that to prevent the stall.  But the real problem was all
those DNS requests.  Parallizing them wouldn't help much when it took
hours to grind through them all.

					John Nagle




More information about the Python-list mailing list