Отключение технологии Intel Hyper-Threading
1. Выключить в BIOS режим HT (Hyperthreading) процессора
2. Выключить в BIOS режимы энергосбережения процессора "Intel SpeedStep" и "C-State"
$ lscpu
Architecture: x86_64
CPU op-mode(s): 32-bit, 64-bit
Byte Order: Little Endian
CPU(s): 8
On-line CPU(s) list: 0-7
Thread(s) per core: 2
Core(s) per socket: 4
Socket(s): 1
NUMA node(s): 1
....
....
$ lscpu --extended
CPU NODE SOCKET CORE L1d:L1i:L2:L3 ONLINE MAXMHZ MINMHZ
0 0 0 0 0:0:0:0 yes 4200,0000 800,0000
1 0 0 1 1:1:1:0 yes 4200,0000 800,0000
2 0 0 2 2:2:2:0 yes 4200,0000 800,0000
3 0 0 3 3:3:3:0 yes 4200,0000 800,0000
4 0 0 0 0:0:0:0 yes 4200,0000 800,0000
5 0 0 1 1:1:1:0 yes 4200,0000 800,0000
6 0 0 2 2:2:2:0 yes 4200,0000 800,0000
7 0 0 3 3:3:3:0 yes 4200,0000 800,0000
$ nano htdisable.sh
Вставить текст:
#!/bin/bash
for cpunum in $(cat /sys/devices/system/cpu/cpu*/topology/thread_siblings_list | cut -s -d, -f2- | tr ',' '\n' | sort -un)
do
echo 0 > /sys/devices/system/cpu/cpu$cpunum/online
done
Сохранить.
sudo sh htdisable.sh
$ lscpu --extended
CPU NODE SOCKET CORE L1d:L1i:L2:L3 ONLINE MAXMHZ MINMHZ
0 0 0 0 0:0:0:0 yes 4200,0000 800,0000
1 0 0 1 1:1:1:0 yes 4200,0000 800,0000
2 0 0 2 2:2:2:0 yes 4200,0000 800,0000
3 0 0 3 3:3:3:0 yes 4200,0000 800,0000
4 - - - ::: no 4200,0000 800,0000
5 - - - ::: no 4200,0000 800,0000
6 - - - ::: no 4200,0000 800,0000
7 - - - ::: no 4200,0000 800,0000
$ lscpu
Architecture: x86_64
CPU op-mode(s): 32-bit, 64-bit
Byte Order: Little Endian
CPU(s): 8
On-line CPU(s) list: 0-3
Off-line CPU(s) list: 4-7
Thread(s) per core: 1
Core(s) per socket: 4
Socket(s): 1
NUMA node(s): 1
Как отключить ядро процессора на Ubuntu / Debian
$ cat /proc/cpuinfo
$ echo 0 | sudo tee /sys/devices/system/cpu/cpu3/online
$ echo 0 | sudo tee /sys/devices/system/cpu/cpu2/online
$ echo 0 | sudo tee /sys/devices/system/cpu/cpu1/online
$ echo 1 | sudo tee /sys/devices/system/cpu/cpu3/online
$ echo 2 | sudo tee /sys/devices/system/cpu/cpu2/online
$ echo 3 | sudo tee /sys/devices/system/cpu/cpu1/online
Комментариев нет:
Отправить комментарий