[Python-Dev] Reworking the GIL
Antoine Pitrou
solipsis at pitrou.net
Mon Oct 26 19:10:12 CET 2009
Daniel Stutzbach <daniel <at> stutzbachenterprises.com> writes:
>
> Do we really need priority requests at all? They seem counter to your
> desire for simplicity and allowing the operating system's scheduler to do
> its work.
No, they can be disabled (removed) if we prefer. With priority requests
disabled, latency results becomes less excellent but still quite good.
Running ccbench on a dual core machine gives the following latency results,
first with then without priority requets.
--- Latency --- (with prio requests)
Background CPU task: Pi calculation (Python)
CPU threads=0: 0 ms. (std dev: 0 ms.)
CPU threads=1: 0 ms. (std dev: 2 ms.)
CPU threads=2: 0 ms. (std dev: 2 ms.)
CPU threads=3: 0 ms. (std dev: 2 ms.)
CPU threads=4: 0 ms. (std dev: 2 ms.)
Background CPU task: regular expression (C)
CPU threads=0: 0 ms. (std dev: 0 ms.)
CPU threads=1: 3 ms. (std dev: 2 ms.)
CPU threads=2: 3 ms. (std dev: 2 ms.)
CPU threads=3: 3 ms. (std dev: 2 ms.)
CPU threads=4: 4 ms. (std dev: 3 ms.)
Background CPU task: bz2 compression (C)
CPU threads=0: 0 ms. (std dev: 2 ms.)
CPU threads=1: 0 ms. (std dev: 2 ms.)
CPU threads=2: 0 ms. (std dev: 0 ms.)
CPU threads=3: 0 ms. (std dev: 2 ms.)
CPU threads=4: 0 ms. (std dev: 1 ms.)
--- Latency --- (without prio requests)
Background CPU task: Pi calculation (Python)
CPU threads=0: 0 ms. (std dev: 2 ms.)
CPU threads=1: 5 ms. (std dev: 0 ms.)
CPU threads=2: 3 ms. (std dev: 3 ms.)
CPU threads=3: 9 ms. (std dev: 7 ms.)
CPU threads=4: 22 ms. (std dev: 23 ms.)
Background CPU task: regular expression (C)
CPU threads=0: 0 ms. (std dev: 1 ms.)
CPU threads=1: 8 ms. (std dev: 2 ms.)
CPU threads=2: 5 ms. (std dev: 4 ms.)
CPU threads=3: 21 ms. (std dev: 32 ms.)
CPU threads=4: 19 ms. (std dev: 26 ms.)
Background CPU task: bz2 compression (C)
CPU threads=0: 0 ms. (std dev: 1 ms.)
CPU threads=1: 0 ms. (std dev: 2 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: 0 ms.)
More information about the Python-Dev
mailing list