| View previous topic :: View next topic |
| Author |
Message |
SpiderPigLoki n00b

Joined: 22 Aug 2008 Posts: 45
|
Posted: Sat Feb 25, 2012 6:14 pm Post subject: CPU running Hot - How can Portage help? |
|
|
Hey Forum.
Please escuse the cryptic title above, I'll explain that later.
My problem is, that my CPU gets ULTRA hot if I compile something heavy (e.g. Thunderbird, Firefox, Libreoffice). To be exact it only occured with these three so far.
| Code: |
sensors
acpitz-virtual-0
Adapter: Virtual device
temp1: +94.0°C (crit = +99.0°C)
thinkpad-isa-0000
Adapter: ISA adapter
fan1: 4366 RPM
coretemp-isa-0000
Adapter: ISA adapter
Physical id 0: +95.0°C (high = +86.0°C, crit = +100.0°C)
Core 0: +93.0°C (high = +86.0°C, crit = +100.0°C)
Core 1: +95.0°C (high = +86.0°C, crit = +100.0°C)
|
emerge --info --> http://gentoo.pastebin.ca/2121363
| Code: |
cat /etc/make.conf
CFLAGS="-O2 -pipe -march=native"
CXXFLAGS="${CFLAGS}"
CHOST="x86_64-pc-linux-gnu"
LINGUAS="de_DE de"
EMERGE_DEFAULT_OPTS="--jobs=4 --load-average=1.5"
MAKEOPTS="-j5"
FEATURES="${FEATURES} parallel-fetch candy"
VIDEO_CARDS=intel
INPUT_DEVICES="evdev keyboard synaptics"
USE="automount avahi bash-completion cpudetection dhcp dhcpcd gnome gtk gtk3
mmx nautilus networkmanager offensive policykit resolvconf sna sse sse2
sse4_1 ssse3 symlink thinkpad tor vim vim-syntax virtualbox xinerama xosd
-accessibility -bluetooth -exceptions -gpm -kde -kdecards -kdepim -kdm
-kdrive -ppp -qt -qt-bundled -qt-dbus -qt-faststart -qt-static -qt-webkit
-qt3support -qt4 -qthelp -qtscript"
PORTAGE_RSYNC_EXTRA_OPTS="--exclude-from=/etc/portage/rsync_excludes"
DISTDIR="/var/portage/distfiles"
|
| Code: |
cat /etc/portage/package.env
app-office/libreoffice home_tmp.conf
mail-client/mozilla-thunderbird home_tmp.conf
www-client/firefox home_tmp.conf |
| Code: |
cat /etc/portage/env/home_tmp.conf
PORTAGE_TMPDIR="/home/portage"
EMERGE_DEFAULT_OPTS="--jobs=1 --load-average=0.1"
MAKEOPTS="-j1" |
Note: I set the MAKEOPTS and jobs for these so low, because I hoped, that it would give the CPU some room to breathe...which it did not...
I opened this thread in Portage, because I'm using a Thinkpad X220i, so can't (read: don't want) modify the cooling fan etc.
Hope you can help me - SPL |
|
| Back to top |
|
 |
smartass Tux's lil' helper

Joined: 04 Jul 2011 Posts: 142 Location: right behind you ... (you did turn around, didn't you?)
|
Posted: Sat Feb 25, 2012 8:02 pm Post subject: |
|
|
Compiling code is always CPU intensive, not much you can about that.
However, you may be surprised, but Portage can actually help you
Look into the make.conf (5) manpage, and get to know the PORTAGE_NICENESS and possibly (if your HDD gets very warm too) PORTAGE_IONICE_COMMAND variables.
If you aren't familiar with niceness on *NIX systems, read the nice (1) manpage.
Note that setting these variables in /etc/make.conf will make compiling take longer, but will not put such direct load on your system.
BTW, I let my laptop compile with a book under its edge to make more space under the fan vents and set my PORTAGE_NICENESS=15 and my internal temp does not go beyond 65 C |
|
| Back to top |
|
 |
Hu Watchman

Joined: 06 Mar 2007 Posts: 7610
|
Posted: Sat Feb 25, 2012 10:08 pm Post subject: |
|
|
Adjusting the niceness does not necessarily make the build run any cooler. A niced build will more readily defer to other tasks on the system, so the system remains responsive. However, if you have made no other changes, then given the choice between running a nice task or sitting idle, the kernel will choose to run the nice task. Some CPU governors can be configured to treat nice processes as equivalent to idle, in which case a niced build will not bring the CPU up to a higher clock speed. You may also be able to reduce the temperature by using the CPU governor powersave, which locks the CPU to its minimum supported clock speed. This will slow down the compilation, possibly substantially, but it can reduce heat generation.
By far, your best bet is to stop compiling large packages on a system with inadequate cooling. Improve your cooling or switch to a distributed build so that the laptop just installs prebuilt packages. |
|
| Back to top |
|
 |
NeddySeagoon Administrator


Joined: 05 Jul 2003 Posts: 29972 Location: 56N 3W
|
Posted: Sat Feb 25, 2012 10:24 pm Post subject: |
|
|
SpiderPigLoki,
First, why do you think the reported temps are correct?
Its very easy to set up lm-sensors for the wrong scale factor and or the wrong sensror type.
Get your CPU nice and warm, then reboot and check the CPU temps in the BIOS. They will be lower, even if lm-sensors is correct as the CPU will cool during the reboot process.
Is this a home made system or assembled by a well known source?
Running hot in home made systems is typically caused by no/too much heatsink compound. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
| Back to top |
|
 |
SpiderPigLoki n00b

Joined: 22 Aug 2008 Posts: 45
|
Posted: Sat Feb 25, 2012 10:28 pm Post subject: |
|
|
| NeddySeagoon wrote: | | Get your CPU nice and warm, then reboot and check the CPU temps in the BIOS. They will be lower, even if lm-sensors is correct as the CPU will cool during the reboot process. |
Will do.
| NeddySeagoon wrote: | | Is this a home made system or assembled by a well known source? |
I'm pretty certain, that the Laptop came out of the factory of Lenovo untouched by the seller. |
|
| Back to top |
|
 |
NeddySeagoon Administrator


Joined: 05 Jul 2003 Posts: 29972 Location: 56N 3W
|
Posted: Sat Feb 25, 2012 10:37 pm Post subject: |
|
|
SpiderPigLoki,
Laptop designs make serious compromises in the cooling department.
When you are building things prop the laptop edges up on two thick books to allow air to circulate underneath.
It that looks ugly, you can invest a substantial sum of money in a 'laptop cooler'.
Depending on the airflow path, standing the laptop on edhe may be better, if that allows used cooling air to exit at the 'top' _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
| Back to top |
|
 |
Naib Advocate


Joined: 21 May 2004 Posts: 3928 Location: UK - Birmingham
|
Posted: Sat Feb 25, 2012 11:38 pm Post subject: |
|
|
Those 3 are 3 of the biggest packages in the tree with enough bloat in them to take a long time to compile resulting in no real pause during the process (to allow some period to cool).
those 3 packages are available in -bin format as well. It may be worth considering using the -bin variants. But yes duing cpu intensive work will result in increased cpu temperature _________________ A free press is the unsleeping guardian of every other right that free men prize; it is the most dangerous foe of tyranny. Where men have the habit of liberty, the Press will continue to be the vigilant guardian of the rights of the ordinary citizen. |
|
| Back to top |
|
 |
Genone Retired Dev


Joined: 14 Mar 2003 Posts: 8862 Location: beyond the rim
|
Posted: Fri Mar 02, 2012 3:14 pm Post subject: |
|
|
| Obvious options would include lowering the numbers for the jobs parameter of both make and emerge, and/or add a load parameter to make as well. |
|
| Back to top |
|
 |
EatMeerkats Apprentice


Joined: 15 Mar 2006 Posts: 234
|
Posted: Fri Mar 02, 2012 4:19 pm Post subject: |
|
|
I wouldn't even worry about it… I'm also using an X220, and modern CPUs are smart enough to perform thermal throttling when they get too hot. I don't have any CPU temp monitors installed, but I'm compiling Wine right now and can see using http://lxr.free-electrons.com/source/tools/power/x86/turbostat/turbostat.c that even though my scaling governor is set to "performance", the CPU is running slower than normal:
| Code: | core CPU %c0 GHz TSC %c1 %c3 %c6 %c7 %pc2 %pc3 %pc6 %pc7
99.80 2.37 2.59 0.20 0.00 0.00 0.00 0.00 0.00 0.00 0.00
0 0 99.91 2.37 2.59 0.09 0.00 0.00 0.00 0.00 0.00 0.00 0.00
0 1 99.84 2.37 2.59 0.16 0.00 0.00 0.00 0.00 0.00 0.00 0.00
1 2 99.85 2.37 2.59 0.15 0.00 0.00 0.00 0.00 0.00 0.00 0.00
1 3 99.61 2.37 2.59 0.39 0.00 0.00 0.00 0.00 0.00 0.00 0.00 |
You should also be able to see messages about it in dmesg. |
|
| Back to top |
|
 |
thumper Guru


Joined: 06 Dec 2002 Posts: 406 Location: Venice FL
|
Posted: Sat Mar 03, 2012 9:57 pm Post subject: |
|
|
I had a similar problem, it's that time of the year when I have to vacuum out the machine but I won't get to it for another week.
It does have filters but there is work to be done to close the leaks, but thats another topic.
My thermal alarm was going off during some emerges, I have a quad core Phenom II 3.4GHz, making these changes was enough to keep it from hitting critical temps.
| Code: | PORTAGE_NICENESS="19"
MAKEOPTS="-j3" |
George |
|
| Back to top |
|
 |
SpiderPigLoki n00b

Joined: 22 Aug 2008 Posts: 45
|
Posted: Tue Mar 06, 2012 5:08 pm Post subject: |
|
|
Thank you guys so far.
I will try the new make.conf right now.... |
|
| Back to top |
|
 |
sligo n00b

Joined: 17 Oct 2011 Posts: 39
|
Posted: Wed May 02, 2012 2:56 pm Post subject: |
|
|
Just came across this thread and wanted to add how i fixed this problem for me.
Having a Thinkpad X61, i always had a heat problem while compiling or running cpu intensive tasks. I've cleaned the fan a couple of times and even bought a new one once. Usually i'm having tpfand running to have a better control over the fan. This way i can have it running at the maximum speed (disengaged mode). Still i was having the problem of getting over 85°C CPU temps crashing my computer, especially in summer times.
The first thing i've tried was cpufreqd. You can set it up to clock up and down the cpu if it gets to hot. Sadly the configuration won't let you finetune much or i might have done it wrong. I was never happy with it.
Later i've choose to manually clock the CPU up and down with cpufreq-set. This works very well but you'll have to do it manualy.
In the end i decided to hack some script to read the temps and tune the CPU to it the way i need it. I am not to much into coding C or else, so its just a short bash script. I run the script from Cron every minute. The Script then runs itself every 2 seconds for a minute. While running it checks the current CPU temp and clocks up or down as defined.
| Code: |
#!/bin/bash
debug=0
i=0
while [ $i -lt 30 ]; do
echo "running for round" $i
temp=`awk '{print $2}' /proc/acpi/ibm/thermal`
if [ $debug == 1 ]; then
echo "CPU Temp: "$temp
fi
if [ $temp -gt 78 ]; then
if [ $debug == 1 ]; then
echo "setting cpu to 800Mhz"
fi
cpufreq-set -c0 -u 800mhz
cpufreq-set -c1 -u 800mhz
elif [[ $temp -gt 72 && $temp -lt 78 ]]; then
if [ $debug == 1 ]; then
echo "setting cpu to 1200Mhz"
fi
cpufreq-set -c0 -u 1200mhz
cpufreq-set -c1 -u 1200mhz
elif [[ $temp -lt 72 && $temp -gt 65 ]]; then
if [ $debug == 1 ]; then
echo "setting cpu to 1600Mhz"
fi
cpufreq-set -c0 -u 1600mhz
cpufreq-set -c1 -u 1600mhz
elif [ $temp -lt 65 ]; then
if [ $debug == 1 ]; then
echo "setting cpu to 2000Mhz"
fi
cpufreq-set -c0 -u 2000mhz
cpufreq-set -c1 -u 2000mhz
fi
if [ $debug == 1 ]; then
cpufreq-info
fi
sleep 2
i=$(( i + 1 ))
done
|
Probably not the perfect solution. But my Thinkpad stopped burning.
This is my tpfand.conf line for the cpu:
| Code: |
0. Sensor 0 = 0:0 15:2 50:5 65:7 78:256
|
Be careful using this!
It might break you machine!
Its just tuned for my computer and might not be working on other Thinkpads out of the box! |
|
| Back to top |
|
 |
|