modern smp power mgt pretty good
by lazardo from LinuxQuestions.org on (#6QKTZ)
no-load/idle, runlevel 3, 4 or 16 cpus == no wattage difference.
I use to offline cpus, esp laptops.
Scaling gov: conservative, scaling driver: amd-pstate, 6.6.50 kernel, up-to-date 15.0.
Code:$ for i in cpu{4..15}; do echo 0 | sudo tee /sys/devices/system/cpu/$i/online > /dev/null; done
$ lscpu | head -10; watts 12
Architecture: x86_64
CPU op-mode(s): 32-bit, 64-bit
Address sizes: 48 bits physical, 48 bits virtual
Byte Order: Little Endian
CPU(s): 16
On-line CPU(s) list: 0-3
Off-line CPU(s) list: 4-15
Vendor ID: AuthenticAMD
Model name: AMD Ryzen 9 5900HX with Radeon Graphics
CPU family: 25
watts avg cpu loadavg
4.584 4.584 4 0.11 0.12 0.09 1/369 27906
4.374 4.479 4 0.09 0.12 0.09 1/367 27918
4.351 4.436 4 0.08 0.11 0.09 1/367 27934
4.362 4.417 4 0.07 0.11 0.09 1/367 27948
4.374 4.409 4 0.06 0.11 0.09 1/367 27966
4.362 4.401 4 0.05 0.10 0.09 2/367 27976
4.386 4.399 4 0.04 0.10 0.09 2/367 27990
4.386 4.397 4 0.19 0.13 0.10 1/367 28000
4.374 4.394 4 0.16 0.12 0.09 1/366 28012
4.351 4.390 4 0.13 0.12 0.09 3/366 28022
4.374 4.388 4 0.26 0.15 0.10 1/366 28032Code:$ for i in cpu{4..15}; do echo 1 | sudo tee /sys/devices/system/cpu/$i/online > /dev/null; done
$ lscpu | grep ^On-line; watts 12
On-line CPU(s) list: 0-15
watts avg cpu loadavg
4.374 4.374 16 0.18 0.14 0.10 1/403 28145
4.374 4.374 16 0.16 0.13 0.10 2/402 28156
4.386 4.378 16 0.13 0.13 0.09 1/405 28172
4.397 4.382 16 0.11 0.12 0.09 1/405 28182
4.374 4.381 16 0.09 0.12 0.09 1/406 28193
4.386 4.381 16 0.08 0.11 0.09 2/405 28203
4.456 4.392 16 0.15 0.13 0.09 1/405 28213
4.386 4.391 16 0.20 0.14 0.10 2/405 28223
4.374 4.389 16 0.17 0.13 0.10 1/404 28252
4.397 4.390 16 0.14 0.13 0.09 1/405 28263
4.409 4.392 16 0.12 0.12 0.09 1/405 28273
I use to offline cpus, esp laptops.
Scaling gov: conservative, scaling driver: amd-pstate, 6.6.50 kernel, up-to-date 15.0.
Code:$ for i in cpu{4..15}; do echo 0 | sudo tee /sys/devices/system/cpu/$i/online > /dev/null; done
$ lscpu | head -10; watts 12
Architecture: x86_64
CPU op-mode(s): 32-bit, 64-bit
Address sizes: 48 bits physical, 48 bits virtual
Byte Order: Little Endian
CPU(s): 16
On-line CPU(s) list: 0-3
Off-line CPU(s) list: 4-15
Vendor ID: AuthenticAMD
Model name: AMD Ryzen 9 5900HX with Radeon Graphics
CPU family: 25
watts avg cpu loadavg
4.584 4.584 4 0.11 0.12 0.09 1/369 27906
4.374 4.479 4 0.09 0.12 0.09 1/367 27918
4.351 4.436 4 0.08 0.11 0.09 1/367 27934
4.362 4.417 4 0.07 0.11 0.09 1/367 27948
4.374 4.409 4 0.06 0.11 0.09 1/367 27966
4.362 4.401 4 0.05 0.10 0.09 2/367 27976
4.386 4.399 4 0.04 0.10 0.09 2/367 27990
4.386 4.397 4 0.19 0.13 0.10 1/367 28000
4.374 4.394 4 0.16 0.12 0.09 1/366 28012
4.351 4.390 4 0.13 0.12 0.09 3/366 28022
4.374 4.388 4 0.26 0.15 0.10 1/366 28032Code:$ for i in cpu{4..15}; do echo 1 | sudo tee /sys/devices/system/cpu/$i/online > /dev/null; done
$ lscpu | grep ^On-line; watts 12
On-line CPU(s) list: 0-15
watts avg cpu loadavg
4.374 4.374 16 0.18 0.14 0.10 1/403 28145
4.374 4.374 16 0.16 0.13 0.10 2/402 28156
4.386 4.378 16 0.13 0.13 0.09 1/405 28172
4.397 4.382 16 0.11 0.12 0.09 1/405 28182
4.374 4.381 16 0.09 0.12 0.09 1/406 28193
4.386 4.381 16 0.08 0.11 0.09 2/405 28203
4.456 4.392 16 0.15 0.13 0.09 1/405 28213
4.386 4.391 16 0.20 0.14 0.10 2/405 28223
4.374 4.389 16 0.17 0.13 0.10 1/404 28252
4.397 4.390 16 0.14 0.13 0.09 1/405 28263
4.409 4.392 16 0.12 0.12 0.09 1/405 28273