Попробуйте установить языковой пакет, который может исправить ваши проблемы с кодировкой, например
sudo apt-get install language-pack-en
Это обеспечит обновление данных перевода на английском языке для всех поддерживаемых пакетов (включая Python).
См. Также: UnicodeEncodeError: кодек 'ascii' не может кодировать символ.
В противном случае задайте параметры локали вручную, например
$ locale -a | grep "^en_.\+UTF-8"
en_GB.UTF-8
en_US.UTF-8
$ export LC_ALL=en_GB.UTF-8
$ export LANG=en_GB.UTF-8
Связано: UnicodeEncodeError: кодек ascii не может кодировать символ
Я думаю, что этот комментарий @ doug-smythies отвечает на вопрос.
Однако я понял, что просто посмотреть, работают ли все процессоры на одном уровне - я мог бы это сделать:
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%)
Я думаю, что этот комментарий @ doug-smythies отвечает на вопрос.
Однако я понял, что просто посмотреть, работают ли все процессоры на одном уровне - я мог бы это сделать:
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%)
Я думаю, что этот комментарий @ doug-smythies отвечает на вопрос.
Однако я понял, что просто посмотреть, работают ли все процессоры на одном уровне - я мог бы это сделать:
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%)
(Я предполагаю, что у вас есть процессор с несколькими ядрами, каждый из которых имеет несколько потоков)
Вы можете использовать инструмент с именем sysbench.
Установите его с помощью sudo apt-get install sysbench
По умолчанию это тестирование одного потока.
sysbench --test=cpu run
или
sysbench --test=threads --num-threads=1 --thread-locks=1 run
Но я не могу понять, как заблокировать его до определенного нить. Кто-нибудь?
Вы можете попробовать сами, прочитав страницы руководства:
man sysbench
(Я предполагаю, что у вас есть процессор с несколькими ядрами, каждый из которых имеет несколько потоков)
Вы можете использовать инструмент с именем sysbench.
Установите его с помощью sudo apt-get install sysbench
По умолчанию это тестирование одного потока.
sysbench --test=cpu run
или
sysbench --test=threads --num-threads=1 --thread-locks=1 run
Но я не могу понять, как заблокировать его до определенного нить. Кто-нибудь?
Вы можете попробовать сами, прочитав страницы руководства:
man sysbench
(Я предполагаю, что у вас есть процессор с несколькими ядрами, каждый из которых имеет несколько потоков)
Вы можете использовать инструмент с именем sysbench.
Установите его с помощью sudo apt-get install sysbench
По умолчанию это тестирование одного потока.
sysbench --test=cpu run
или
sysbench --test=threads --num-threads=1 --thread-locks=1 run
Но я не могу понять, как заблокировать его до определенного нить. Кто-нибудь?
Вы можете попробовать сами, прочитав страницы руководства:
man sysbench