Summary ======= Results for ccbench latency and bandwidth test run on Ubuntu Karmic 64bit, q9400 2.6GHz, all Python versions built with computed gotos optimization. Old GIL: Hi level of context switching and reduced performance. ~90ms IO latency with pure Python CPU bound background threads and low IO bandwidth results. Old GIL with sys.setcheckinterval(2500) as done by Zope: Context switching level back to normal. IO latency shoots through the roof. ~950ms (avg) is the maximum recordable value in this test since CPU load duration is 2sec. New GIL: The expected 5ms wait related IO latency and low IO bandwidth. BFS patch: Behaves. Results ======= ~/dev/python$ ~/build/python/py31/python ccbench.py -lb == CPython 3.1.2 (release31-maint:81209) == == x86_64 Linux on '' == --- Latency --- Background CPU task: Pi calculation (Python) CPU threads=0: 0 ms. (std dev: 0 ms.) CPU threads=1: 90 ms. (std dev: 101 ms.) CPU threads=2: 89 ms. (std dev: 71 ms.) CPU threads=3: 50 ms. (std dev: 62 ms.) CPU threads=4: 217 ms. (std dev: 174 ms.) Background CPU task: regular expression (C) CPU threads=0: 0 ms. (std dev: 1 ms.) CPU threads=1: 967 ms. (std dev: 577 ms.) CPU threads=2: 1007 ms. (std dev: 577 ms.) CPU threads=3: 1043 ms. (std dev: 573 ms.) CPU threads=4: 976 ms. (std dev: 577 ms.) Background CPU task: bz2 compression (C) CPU threads=0: 0 ms. (std dev: 0 ms.) CPU threads=1: 0 ms. (std dev: 1 ms.) CPU threads=2: 0 ms. (std dev: 0 ms.) CPU threads=3: 0 ms. (std dev: 1 ms.) CPU threads=4: 0 ms. (std dev: 1 ms.) Background CPU task: SHA1 hashing (C) CPU threads=0: 0 ms. (std dev: 1 ms.) CPU threads=1: 0 ms. (std dev: 0 ms.) CPU threads=2: 0 ms. (std dev: 0 ms.) CPU threads=3: 0 ms. (std dev: 1 ms.) CPU threads=4: 7 ms. (std dev: 7 ms.) --- I/O bandwidth --- Background CPU task: Pi calculation (Python) CPU threads=0: 12347.4 packets/s. CPU threads=1: 6.9 ( 0 %) CPU threads=2: 7.1 ( 0 %) CPU threads=3: 9.0 ( 0 %) CPU threads=4: 4.8 ( 0 %) ~/dev/python$ ~/build/python/py31/python ccbench.py -lb -i2500 == CPython 3.1.2 (release31-maint:81209) == == x86_64 Linux on '' == --- Latency --- Background CPU task: Pi calculation (Python) CPU threads=0: 0 ms. (std dev: 0 ms.) CPU threads=1: 958 ms. (std dev: 577 ms.) CPU threads=2: 943 ms. (std dev: 601 ms.) CPU threads=3: 891 ms. (std dev: 579 ms.) CPU threads=4: 985 ms. (std dev: 573 ms.) Background CPU task: regular expression (C) CPU threads=0: 0 ms. (std dev: 0 ms.) CPU threads=1: 980 ms. (std dev: 577 ms.) CPU threads=2: 987 ms. (std dev: 567 ms.) CPU threads=3: 1021 ms. (std dev: 553 ms.) CPU threads=4: 845 ms. (std dev: 647 ms.) Background CPU task: bz2 compression (C) CPU threads=0: 0 ms. (std dev: 1 ms.) CPU threads=1: 0 ms. (std dev: 1 ms.) CPU threads=2: 0 ms. (std dev: 1 ms.) CPU threads=3: 7 ms. (std dev: 7 ms.) CPU threads=4: 0 ms. (std dev: 1 ms.) Background CPU task: SHA1 hashing (C) CPU threads=0: 0 ms. (std dev: 1 ms.) CPU threads=1: 0 ms. (std dev: 0 ms.) CPU threads=2: 4 ms. (std dev: 4 ms.) CPU threads=3: 0 ms. (std dev: 1 ms.) CPU threads=4: 0 ms. (std dev: 1 ms.) --- I/O bandwidth --- Background CPU task: Pi calculation (Python) CPU threads=0: 12322.9 packets/s. CPU threads=1: 0.0 ( 0 %) CPU threads=2: 0.7 ( 0 %) CPU threads=3: 0.0 ( 0 %) CPU threads=4: 0.0 ( 0 %) ~/dev/python$ ~/build/python/py3k/python ccbench.py -lb == CPython 3.2a0.0 (py3k:81209) == == x86_64 Linux on '' == --- Latency --- Background CPU task: Pi calculation (Python) CPU threads=0: 0 ms. (std dev: 0 ms.) CPU threads=1: 7 ms. (std dev: 10 ms.) CPU threads=2: 7 ms. (std dev: 5 ms.) CPU threads=3: 121 ms. (std dev: 172 ms.) CPU threads=4: 146 ms. (std dev: 140 ms.) Background CPU task: regular expression (C) CPU threads=0: 0 ms. (std dev: 1 ms.) CPU threads=1: 6 ms. (std dev: 1 ms.) CPU threads=2: 12 ms. (std dev: 4 ms.) CPU threads=3: 14 ms. (std dev: 6 ms.) CPU threads=4: 30 ms. (std dev: 32 ms.) Background CPU task: bz2 compression (C) CPU threads=0: 0 ms. (std dev: 1 ms.) CPU threads=1: 0 ms. (std dev: 1 ms.) CPU threads=2: 0 ms. (std dev: 1 ms.) CPU threads=3: 0 ms. (std dev: 1 ms.) CPU threads=4: 10 ms. (std dev: 15 ms.) Background CPU task: SHA1 hashing (C) CPU threads=0: 0 ms. (std dev: 1 ms.) CPU threads=1: 2 ms. (std dev: 5 ms.) CPU threads=2: 0 ms. (std dev: 0 ms.) CPU threads=3: 3 ms. (std dev: 7 ms.) CPU threads=4: 8 ms. (std dev: 12 ms.) --- I/O bandwidth --- Background CPU task: Pi calculation (Python) CPU threads=0: 12581.2 packets/s. CPU threads=1: 109.0 ( 0 %) CPU threads=2: 659.7 ( 5 %) CPU threads=3: 113.2 ( 0 %) CPU threads=4: 54.8 ( 0 %) ~/dev/python$ ~/build/python/bfs/python ccbench.py -lb == CPython 3.2a0.0 (py3k) == == x86_64 Linux on '' == --- Latency --- Background CPU task: Pi calculation (Python) CPU threads=0: 0 ms. (std dev: 0 ms.) CPU threads=1: 0 ms. (std dev: 0 ms.) CPU threads=2: 0 ms. (std dev: 0 ms.) CPU threads=3: 0 ms. (std dev: 0 ms.) CPU threads=4: 0 ms. (std dev: 1 ms.) Background CPU task: regular expression (C) CPU threads=0: 0 ms. (std dev: 0 ms.) CPU threads=1: 1 ms. (std dev: 1 ms.) CPU threads=2: 1 ms. (std dev: 1 ms.) CPU threads=3: 1 ms. (std dev: 1 ms.) CPU threads=4: 1 ms. (std dev: 1 ms.) Background CPU task: bz2 compression (C) CPU threads=0: 0 ms. (std dev: 1 ms.) CPU threads=1: 0 ms. (std dev: 0 ms.) CPU threads=2: 0 ms. (std dev: 0 ms.) CPU threads=3: 0 ms. (std dev: 1 ms.) CPU threads=4: 11 ms. (std dev: 8 ms.) Background CPU task: SHA1 hashing (C) CPU threads=0: 0 ms. (std dev: 1 ms.) CPU threads=1: 0 ms. (std dev: 0 ms.) CPU threads=2: 8 ms. (std dev: 5 ms.) CPU threads=3: 7 ms. (std dev: 5 ms.) CPU threads=4: 0 ms. (std dev: 1 ms.) --- I/O bandwidth --- Background CPU task: Pi calculation (Python) CPU threads=0: 12426.6 packets/s. CPU threads=1: 7419.9 ( 59 %) CPU threads=2: 4421.8 ( 35 %) CPU threads=3: 4515.1 ( 36 %) CPU threads=4: 3526.5 ( 28 %)