[issue7946] Convoy effect with I/O bound threads and New GIL

Nir Aides report at bugs.python.org
Tue Mar 16 22:17:33 CET 2010


Nir Aides <nir at winpdb.org> added the comment:

I tried Florent's modification to the write test and did not see the effect on my machine with an updated revision of Python32.

I am running Ubuntu Karmic 64 bit.
7s - no background threads.
20s - one background thread.

According to the following documentation the libc condition is using scheduling policy when waking a thread and not FIFO order:
The following documentation suggests ordering in Linux is not FIFO:
http://www.opengroup.org/onlinepubs/000095399/functions/pthread_cond_timedwait.html#tag_03_518_08_06

I upload a quick and dirty patch (linux-7946.patch) to the new GIL just to reflect this by avoiding the timed waits.  

On my machine it behaves reasonably both with the TCP server and with the write test, but so does unpatched Python 3.2.

I noticed high context switching rate with dave's priority GIL - with both tests it goes above 40K/s context switches.

----------
Added file: http://bugs.python.org/file16567/linux-7946.patch

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue7946>
_______________________________________


More information about the Python-bugs-list mailing list