Re: arm ldxr/stxr vs cas
Sujet : Re: arm ldxr/stxr vs cas
De : jseigh_es00 (at) *nospam* xemaps.com (jseigh)
Groupes : comp.archDate : 09. Sep 2024, 19:46:24
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <vbnfq0$2gpqh$1@dont-email.me>
References : 1
User-Agent : Mozilla Thunderbird
Some testing of the effects of backoff on contention.
$ lscpu -e
CPU NODE SOCKET CORE L1d:L1i:L2:L3 ONLINE MAXMHZ MINMHZ MHZ
0 0 0 0 0:0:0:0 yes 3400.0000 400.0000 799.9840
1 0 0 1 1:1:1:0 yes 3400.0000 400.0000 2296.7949
2 0 0 2 2:2:2:0 yes 3400.0000 400.0000 712.2160
3 0 0 3 3:3:3:0 yes 3400.0000 400.0000 1574.7550
4 0 0 0 0:0:0:0 yes 3400.0000 400.0000 799.9760
5 0 0 1 1:1:1:0 yes 3400.0000 400.0000 2600.7561
6 0 0 2 2:2:2:0 yes 3400.0000 400.0000 2599.2959
7 0 0 3 3:3:3:0 yes 3400.0000 400.0000 400.0000
so 4 cores, 2 threads / core
The options
-n #enqueues per producer
-p #producers
-c #consumers
-b backoff if > 0
-f 0 linear backoff 1 exponential backoff
-t queue type mpmc,spsc, spmc, mpsc default mpmc
taskset used to specify which cpus to run on.
There is a lot more stats being outputed but I'm
just showing the overall rate.
$ taskset -c 0-7 test/lfrbtest -n 4000000 -p6 -c2 -f 0 -b 0
overall rate = 5,988,679.5093 /sec
$ taskset -c 0-3 test/lfrbtest -n 4000000 -p6 -c2 -f 0 -b 0
overall rate = 7,206,319.9145 /sec
$ taskset -c 0-7 test/lfrbtest -n 4000000 -p6 -c2 -f 1 -b 12
overall rate = 7,243,427.7786 /sec
$ taskset -c 0-3 test/lfrbtest -n 4000000 -p6 -c2 -f 1 -b 12
overall rate = 8,722,397.3449 /sec
$ taskset -c 3 test/lfrbtest -n 4000000 -p6 -c2 -f 1 -b 12
overall rate = 19,950,919.8062 /sec
Some more threads than cpus timings ...
$ taskset -c 0-7 test/lfrbtest -n 1000000 -p24 -c8 -f 1 -b 0
overall rate = 6,454,866.9162 /sec
$ taskset -c 0-7 test/lfrbtest -n 1000000 -p24 -c8 -f 1 -b 12
overall rate = 7,350,906.2839 /sec
Some 1 producer 1 consumer timings ... (no contention so backoff setting
has no effect)
$ taskset -c 3,4 test/lfrbtest -n 10000000 -p1 -c1 -f 1 -b 0
overall rate = 15,329,272.1370 /sec
$ taskset -c 3,4 test/lfrbtest -n 10000000 -p1 -c1 -f 1 -b 12
overall rate = 15,063,074.6140 /sec
$ taskset -c 3 test/lfrbtest -n 10000000 -p1 -c1 -f 1 -b 0
overall rate = 19,983,735.6372 /sec
$ taskset -c 3 test/lfrbtest -n 10000000 -p1 -c1 -f 1 -b 12
overall rate = 19,935,213.3078 /sec
$ taskset -c 3 test/lfrbtest -n 10000000 -p1 -c1 -f 1 -b 12 -x n
overall rate = 32,921,077.1692 /sec
$ taskset -c 2,3 test/lfrbtest -n 10000000 -p1 -c1 -f 1 -b 12 -t spsc
overall rate = 38,620,404.6845 /sec
$ taskset -c 3 test/lfrbtest -n 10000000 -p1 -c1 -f 1 -b 12 -t spsc
overall rate = 109,891,021.6233 /sec
This is producer and consumer running on same thread so no thread
switching overhead
$ taskset -c 3 test/lfrbtest -n 10000000 -p1 -c1 -f 1 -b 12 -x n -t spsc
overall rate = 146,941,972.2478 /sec
Joe Seigh
Haut de la page
Les messages affichés proviennent d'usenet.
NewsPortal