The danger of the automatic overuse of CPUs is not only in the compilation, but also when watching some video for example on youtube.When I compile I set it manuallysysctl dev.cpu.0.freq=800
Burning up the CPU is not probable. All modern CPU's have thermal trip.burning the CPUs?
Some FreeBSD maintainers recommend using the system on older hardware because of the lack of drivers and support for modern hardware , and I wonder, the FreeBSD system can not by itself automatically limit the use of frequencies which carries the danger that CPUs burn out while compiling or just start watching a video on youtube, it is simply staying in the past obsolete, that does not happen in linux and windows , controls and regulates the frequency automatically while performing its activity.Because how and whether to control CPU frequency is not very standardized between machines. What works on a laptop with an Intel CPU doesn't necessarily work on a desktop with an AMD CPU, nor on an embedded system (router, NAS server) with a small CPU. There aren't even really standardized device drivers and interfaces for this that transcends OSes: what works on Linux doesn't work on AIX, nor on FreeBSD, and NetBSD handles it probably yet differently. Let's not even talk about MacOS.
Just to show you what's important to the people who designed this OS: There is a huge set of things you can do to adjust serial ports. Read the man pages for stty and tcsetattr sometime. That's because at the time the design decisions for the Unix family of OSes was frozen, adjusting serial port parameters was extremely important. Many machines had dozens (sometimes hundreds) of serial ports, connected to all manner of devices in many strange and different ways. There is elaborate machinery for controlling this. CPU frequency? Not so much.
Also consider that the requirements and wishes of the user(s) can be very different. Is this a laptop, where battery conservation is paramount, and we have to strive for maximum efficiency taking the non-linearity of batteries and cooling into account? Is this a mildly loaded cloud machine, where we have to minimize the carbon footprint? Is latency (instant gratification, fast response) important, such as in gaming? Is the problem being solved of the utmost urgency, and energy usage not important? Can we turn whole cores off, or is the program we're running inherently parallel and needs all cores (but perhaps all running more slowly)? Not everything is a desktop machine that does compilations for software engineers; in reality, that usage is probably 1/10th of a percent of all computer usage, or less.
The ability to adjust CPU frequency while running is actually a very recent addition; on a PDP or VAX or Sun-3, nobody would have ever thought of doing that. And until relatively recently, most computers were multi-user, and typically had a backlog of batch workload, so at most times you wanted to run the CPU as fast as possible (except on an IO-bound machine).
I have never heard that in the 16 years I've been running FreeBSD. I've also used all new hardware when building my workstation and servers.Some FreeBSD maintainers recommend using the system on older hardware because of the lack of drivers and support for modern hardware
If overheating is your primary concern, my own observations recently showed, that disabling Intel Turbo Boost on my system can reduce temperatures by as much as 10°C without significant loss of overall performance.limit the use of frequencies which carries the danger that CPUs burn out while compiling or just start watching a video on youtube
Because this is only a problem on laptop machines. Everything else should be designed to run at max for an unlimited time. If it isn't, just move more air thru the case. (Same would be applicable for laptops, but there proper fans may not be available, and/or the thing will get noisy.)Why doesn't FreeBSD have a moderate standard of automated hardware frequency usage that can reach 98% while compiling and burning the CPUs?
That depends on the specs of the individual chip. Some do benefit significantly from TurboBoost, some do not much.If overheating is your primary concern, my own observations recently showed, that disabling Intel Turbo Boost on my system can reduce temperatures by as much as 10°C without significant loss of overall performance.
How come? Watching a video will usually do this:The danger of the automatic overuse of CPUs is not only in the compilation, but also when watching some video for example on youtube.
dev.cpu.3.temperature: 40.0C
dev.cpu.3.coretemp.throttle_log: 0
dev.cpu.3.coretemp.tjmax: 105.0C
dev.cpu.3.coretemp.resolution: 1
dev.cpu.3.coretemp.delta: 65
Because this is only a problem on laptop machines. Everything else should be designed to run at max for an unlimited time. If it isn't, just move more air thru the case. (Same would be applicable for laptops, but there proper fans may not be available, and/or the thing will get noisy.)
That depends on the specs of the individual chip. Some do benefit significantly from TurboBoost, some do not much.
How come? Watching a video will usually do this:
* run one core at max, probably entering TurboBoost
* never allow the package to go to C-states
If this already gets the cpu too hot, then that case is quite misdesigned.
Anyway, you can always watch the temperature readings (at least with intel chips) in sysctl:
Code:dev.cpu.3.temperature: 40.0C dev.cpu.3.coretemp.throttle_log: 0 dev.cpu.3.coretemp.tjmax: 105.0C dev.cpu.3.coretemp.resolution: 1 dev.cpu.3.coretemp.delta: 65
So if this shows your machine getting near the limits, then that is an issue specific to your model of machine. It wouldn't be very difficult to monitor these values and switch cpu frequency accordingly. (I am doing just that to switch my extra fans on demand - but I am concerned mainly with disk temperatures, as disks won't throttle automatically.)
sysctl -a grep temperature
hw.acpi.thermal.tz0.temperature: 94,1C
dev.cpu.3.temperature: 96,0C
dev.cpu.2.temperature: 96,0C
dev.cpu.1.temperature: 92,0C
dev.cpu.0.temperature: 92,0C
$
powerd
, and insert an option to retrieve the temperature and set a limit there.#! /bin/sh
SYSCTL=/sbin/sysctl
SPEAKER=/dev/speaker
NCPU=`$SYSCTL -n hw.ncpu`
SLEEPTM=7
HWMTM=0
HWMPER=20
MODE1=0
MAX_SYS=0
MODE1_UTS=$1 # upper thresh
MODE1_LTS=$2 # lower thresh
alert()
{
local mode=$1
case $mode in
30) echo "T255 O4 CGAECB" > $SPEAKER ;;
31) echo "T255 O4 CGAEAC" > $SPEAKER ;;
esac
}
gethwm()
{
MAX_SYS=0
i=0
while test $i -lt $NCPU; do
eval cpu_$i=`$SYSCTL -n dev.cpu.$i.temperature | cut -f 1 -d .`
if test $i -gt $MAX_SYS; then
MAX_SYS=$i
fi
i=`expr $i + 1`
done
}
throttle()
{
/usr/sbin/service powerd stop
$SYSCTL dev.cpu.0.freq=200
# could also do something with 'rctl' here, if appropriate
}
release()
{
/usr/sbin/service powerd start
}
setcomp()
{
if test $1 -eq 1; then
throttle
alert 31
fi
if test $1 -eq 0; then
release
alert 30
fi
MODE1=$1
}
while true
do
CURTM=`date +%s`
# get sys data
if test `expr $HWMTM + $HWMPER` -lt $CURTM; then
gethwm
HWMTM=$CURTM
fi
NEW_MODE1=-1
if test $MAX_SYS -ge $MODE1_UTS; then
NEW_MODE1=1
fi
if test $MAX_SYS -le $MODE1_LTS; then
NEW_MODE1=0
fi
if test $NEW_MODE1 -ne -1 -a $NEW_MODE1 -ne $MODE1; then
setcomp $NEW_MODE1
fi
sleep $SLEEPTM
done
dev.cpu.0.temperature: 64.0C
On what CPU, how many cores, and freq.?Currently compiling 4 parallel ports. My desktop PC has a CPU temperature of ,
Code:dev.cpu.0.temperature: 64.0C
dev.cpu.7.temperature: 61.0C
dev.cpu.6.temperature: 61.0C
dev.cpu.5.temperature: 58.0C
dev.cpu.4.temperature: 58.0C
dev.cpu.3.temperature: 58.0C
dev.cpu.2.temperature: 63.0C
dev.cpu.1.temperature: 63.0C
dev.cpu.0.temperature: 63.0C
Funny, in Germany it's called "Wollmaus", which literally translates to "wool mouse".dust bunnies
In Polish they are called koty (meaning: "cats").
That's still within my safe zone. 100.0C is when you get the console message and beep saying it's too hot and getting ready to shut down.$sysctl -a grep temperature
Code:hw.acpi.thermal.tz0.temperature: 94,1C dev.cpu.3.temperature: 96,0C dev.cpu.2.temperature: 96,0C dev.cpu.1.temperature: 92,0C dev.cpu.0.temperature: 92,0C $
Nor in the old ones, because my Notebook was about 11 years old.https://github.com/lonkamikaze/powerdxx ? (doesn't work on newer Intel CPUs afaik)
It's available in ports
Eleven years? That's a lot of sugar for a dime. I once got about 12 years out of a Dell Dimension, but that was a heavy-duty tower configuration. How many years do you expect to get out of a notebook/laptop?Nor in the old ones, because my Notebook was about 11 years old.