This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author pitrou
Recipients DazWorrall, alex, brian.curtin, carljm, coderanger, dabeaz, eric.smith, flox, jcea, jhylton, karld, kevinwatters, loewis, mahmoudimus, nirai, pitrou, rcohen, rh0dium, tarek
Date 2010-03-25.14:21:49
SpamBayes Score 0.00025836407
Marked as misclassified No
Message-id <1269526912.6.0.87485298842.issue7946@psf.upfronthosting.co.za>
In-reply-to
Content
> I use clock_gettime() to get the thread running time to calculate slice depletion.

Ouch. CLOCK_THREAD_CPUTIME_ID is not a required part of the standard. Only CLOCK_REALTIME is guaranteed to exist.

By the way, it's not obvious cpued tests anything meaningful. I understand the bias you are trying to avoid but constructing artificial test cases is not very useful, because we are playing with heuristics and it's always possible to defeat some expectations. That's why benchmarks should try to model/represent real-world situations.


I've tried ccbench with your patch and there's a clear regression in latency numbers:

Background CPU task: Pi calculation (Python)

CPU threads=0: 0 ms. (std dev: 0 ms.)
CPU threads=1: 1 ms. (std dev: 0 ms.)
CPU threads=2: 0 ms. (std dev: 2 ms.)
CPU threads=3: 0 ms. (std dev: 2 ms.)
CPU threads=4: 2 ms. (std dev: 8 ms.)

Background CPU task: regular expression (C)

CPU threads=0: 0 ms. (std dev: 0 ms.)
CPU threads=1: 969 ms. (std dev: 577 ms.)
CPU threads=2: 1050 ms. (std dev: 577 ms.)
CPU threads=3: 1217 ms. (std dev: 577 ms.)
CPU threads=4: 1416 ms. (std dev: 577 ms.)

Vanilla py3k and py3k+gilinter both don't have this problem (on the regular expression workload).

IO bandwidth numbers are similar between the BFS patch:

Background CPU task: Pi calculation (Python)

CPU threads=0: 6952.7 packets/s.
CPU threads=1: 4350.3 ( 62 %)
CPU threads=2: 3332.2 ( 47 %)
CPU threads=3: 2632.0 ( 37 %)
CPU threads=4: 2052.0 ( 29 %)

and py3k + gilinter:

Background CPU task: Pi calculation (Python)

CPU threads=0: 7023.4 packets/s.
CPU threads=1: 5019.4 ( 71 %)
CPU threads=2: 4474.6 ( 63 %)
CPU threads=3: 2728.5 ( 38 %)
CPU threads=4: 2244.9 ( 31 %)
History
Date User Action Args
2010-03-25 14:21:52pitrousetrecipients: + pitrou, loewis, jhylton, jcea, eric.smith, kevinwatters, tarek, karld, carljm, coderanger, nirai, alex, brian.curtin, flox, DazWorrall, rh0dium, rcohen, dabeaz, mahmoudimus
2010-03-25 14:21:52pitrousetmessageid: <1269526912.6.0.87485298842.issue7946@psf.upfronthosting.co.za>
2010-03-25 14:21:50pitroulinkissue7946 messages
2010-03-25 14:21:49pitroucreate