Nir Aides <n...@winpdb.org> added the comment:

Yet another update to bfs.patch.

I upload a variation on Florent's write test which prints progress of 
background CPU bound threads as: thread-name timestamp progress

Here are some numbers from Windows XP 32bit with Intel q9400 (4 cores). Builds 
produced with VS express (alas - no optimizations, so official builds may 
behave differently).

BFS - 
33% CPU, 37,000 context switches per second

z:\bfs\PCbuild\python.exe y:\writes.py
t1 2.34400010109 0
t2 2.42199993134 0
t1 4.67199993134 1
t2 4.79699993134 1
t1 7.01600003242 2
t2 7.20300006866 2
t1 9.375 3
t2 9.625 3
t1 11.7039999962 4
t2 12.0309998989 4
t1 14.0469999313 5
t2 14.4219999313 5
t1 16.4070000648 6
t2 16.7809998989 6
t1 18.7820000648 7
t2 19.125 7
t1 21.1570000648 8
t2 21.4839999676 8
t1 23.5 9
t2 23.8589999676 9
t1 25.8599998951 10
t2 26.2339999676 10
t1 28.2349998951 11
28.2189998627

gilinter - starves both bg threads and high rate of context switches.
45% CPU, 203,000 context switches per second

z:\gilinter\PCbuild\python.exe y:\writes.py
t1 13.0939998627 0
t1 26.4219999313 1
t1 39.8129999638 2
t1 53.1559998989 3
57.5470001698

PyCON - starves one bg thread and slow IO thread 
Py32 - starves IO thread as expected.

Note, PyCON, gilinter and py32 starve the bg thread with Dave's original 
buffered write test as well - http://bugs.python.org/issue7946#msg101116

----------
Added file: http://bugs.python.org/file16968/writes.py

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue7946>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to