Comment puis-je comparer des cœurs individuels? Je veux voir s'ils fonctionnent tous à la même vitesse. Je suis un peu confus si mon appareil Cortex A53 a big.LITTLE ou non, je lis des informations contradictoires sur Internet, je souhaite donc les tester moi-même.
Je pense que ce commentaire de @ doug-smythies répond à la question.
Cependant, je me suis rendu compte juste pour voir si tous les processeurs fonctionnaient au même niveau - je pouvais le faire:
root@amlogic:~# stress-ng --cpu 1 --cpu-method matrixprod --metrics-brief --perf -t 10
stress-ng: info: [5921] dispatching hogs: 1 cpu
stress-ng: info: [5921] cache allocate: using built-in defaults as unable to determine cache details
stress-ng: info: [5921] cache allocate: default cache size: 2048K
stress-ng: info: [5921] successful run completed in 10.94s
stress-ng: info: [5921] stressor bogo ops real time usr time sys time bogo ops/s bogo ops/s
stress-ng: info: [5921] (secs) (secs) (secs) (real time) (usr+sys time)
stress-ng: info: [5921] cpu 21 10.93 10.02 0.02 1.92 2.09
stress-ng: info: [5921] cpu:
stress-ng: info: [5921] 14,108,856,703 CPU Cycles 1.29 B/sec
stress-ng: info: [5921] 13,710,373,770 Instructions 1.25 B/sec (0.972 instr. per cycle)
stress-ng: info: [5921] 927,478,656 Cache References 84.76 M/sec
stress-ng: info: [5921] 43,400,148 Cache Misses 3.97 M/sec ( 4.68%)
stress-ng: info: [5921] 36,225,340 Branch Misses 3.31 M/sec ( 0.00%)
root@amlogic:~# stress-ng --cpu 4 --cpu-method matrixprod --metrics-brief --perf -t 10
stress-ng: info: [5867] dispatching hogs: 4 cpu
stress-ng: info: [5867] cache allocate: using built-in defaults as unable to determine cache details
stress-ng: info: [5867] cache allocate: default cache size: 2048K
stress-ng: info: [5867] successful run completed in 11.56s
stress-ng: info: [5867] stressor bogo ops real time usr time sys time bogo ops/s bogo ops/s
stress-ng: info: [5867] (secs) (secs) (secs) (real time) (usr+sys time)
stress-ng: info: [5867] cpu 51 10.80 41.05 0.47 4.72 1.23
stress-ng: info: [5867] cpu:
stress-ng: info: [5867] 59,953,532,588 CPU Cycles 5.19 B/sec
stress-ng: info: [5867] 31,357,210,848 Instructions 2.71 B/sec (0.523 instr. per cycle)
stress-ng: info: [5867] 2,127,678,244 Cache References 0.18 B/sec
stress-ng: info: [5867] 101,073,952 Cache Misses 8.75 M/sec ( 4.75%)
stress-ng: info: [5867] 82,805,524 Branch Misses 7.17 M/sec ( 0.00%)
root@amlogic:~# stress-ng --cpu 8 --cpu-method matrixprod --metrics-brief --perf -t 10
stress-ng: info: [5892] dispatching hogs: 8 cpu
stress-ng: info: [5892] cache allocate: using built-in defaults as unable to determine cache details
stress-ng: info: [5892] cache allocate: default cache size: 2048K
stress-ng: info: [5892] successful run completed in 11.53s
stress-ng: info: [5892] stressor bogo ops real time usr time sys time bogo ops/s bogo ops/s
stress-ng: info: [5892] (secs) (secs) (secs) (real time) (usr+sys time)
stress-ng: info: [5892] cpu 126 10.50 81.49 0.58 12.00 1.54
stress-ng: info: [5892] cpu:
stress-ng: info: [5892] 118,145,351,216 CPU Cycles 10.24 B/sec
stress-ng: info: [5892] 94,066,812,704 Instructions 8.16 B/sec (0.796 instr. per cycle)
stress-ng: info: [5892] 6,383,299,240 Cache References 0.55 B/sec
stress-ng: info: [5892] 304,757,784 Cache Misses 26.43 M/sec ( 4.77%)
stress-ng: info: [5892] 248,569,352 Branch Misses 21.55 M/sec ( 0.00%)
(Je suppose que vous avez un processeur avec plusieurs cœurs qui ont chacun plusieurs threads)
Vous pouvez utiliser un outil nommé sysbench.
Installez-le avec Sudo apt-get install sysbench
Par défaut, cela teste un seul thread.
sysbench --test=cpu run
ou
sysbench --test=threads --num-threads=1 --thread-locks=1 run
Mais je n'arrive pas à comprendre comment le verrouiller à un fil spécifique. Quelqu'un?
Vous pouvez l'essayer vous-même en lisant les pages de manuel:
man sysbench