I run FreeBSD with my laptop, it is so hot when make buildworld. I hope there is a way can limit the CPU usage for makebuild world and also make install clean for ports.
Is that possible?
Is that possible?
-j max_jobs
Specify the maximum number of jobs that make may have running at
any one time. Turns compatibility mode off, unless the -B flag
is also specified.
# sysctl dev.cpu.0. | grep freq
dev.cpu.0.freq: 2200
dev.cpu.0.freq_levels: 2200/95000 2000/79848 1800/66229 1000/30917
#/etc/rc.d/powerd stop
Stopping powerd.
Waiting for PIDS: xxxxx
# sysctl dev.cpu.0.freq=1000
dev.cpu.0.freq: 2200 -> 1000
# sysctl dev.cpu.0. | grep freq
dev.cpu.0.freq: 1000
dev.cpu.0.freq_levels: 2200/95000 2000/79848 1800/66229 1000/30917
Or instead, write powerd_flags="-M 1000" into rc.conf which causes powerd to not clock higher then 1000Mhz.User23 said:If you have a multicore CPU you can use [CMD=""]make -j1 buildworld[/CMD] to force only 1 process at any one time.
Code:-j max_jobs Specify the maximum number of jobs that make may have running at any one time. Turns compatibility mode off, unless the -B flag is also specified.
---
If your CPU is supported by the cpufreq framework, you can use it to force CPU itself to slow down.
Check for supported frequency steps with [CMD=""]sysctl dev.cpu.0. | grep freq[/CMD]
Code:# sysctl dev.cpu.0. | grep freq dev.cpu.0.freq: 2200 dev.cpu.0.freq_levels: 2200/95000 2000/79848 1800/66229 1000/30917
After powerd is stopped you can use [CMD=""]sysctl dev.cpu.0.freq=1000[/CMD] to force this low frequency.
Code:#/etc/rc.d/powerd stop Stopping powerd. Waiting for PIDS: xxxxx # sysctl dev.cpu.0.freq=1000 dev.cpu.0.freq: 2200 -> 1000 # sysctl dev.cpu.0. | grep freq dev.cpu.0.freq: 1000 dev.cpu.0.freq_levels: 2200/95000 2000/79848 1800/66229 1000/30917
Be aware, after reboot the powerd will run again, if it is enabled in /etc/rc.conf
---
Anyway, if your hardware is overheating, something may be wrong with it.