2

I use Arch Linux. I run the closed-source application Spotify. Recently, it's been displaying a very nasty bug though where it will use 100% of my CPU. My computer has been having some cooling problems(need to install some fans) and so this application can actually cause my computer to shut itself down.

Anyway, I have a 6-core processor, but somehow this application manages to utilize 100% of all 6 of my cores. While I wait for this application to get patched, I'd like to still be able to listen to music. Spotify only enters this state sometimes as well, usually when trying to play certain songs(I can tell because it ends up just going silent when it happens).

My main problem is the overheating bit. While I wait for some fans to come in, what is the best way to throttle this application so that my computer doesn't overheat?

1

2 Answers 2

6

You could take a look at the nice utility. As the name suggests, this is telling the app to "be nice", or even "nicer" -- depending on the level you pass it. Giving an example:

nice -n 19 spotify

would ask spotify to be really nice to other processes in terms of ressources (i.e. leave them lots of ressources, consuming only little itself). The nicelevel specified may range from 19 ("I'm not worthy, I'm not worthy...") to -20 (negative number; "I'm king, get to your knees!")

1
  • 2
    Actually, more positive numbers are nicer ("I'm not worthy"). And renice to change the level of an already running program. Jul 14, 2012 at 11:35
2

check out this program:

https://github.com/Sepero/temp-throttle

it throttles the frequency of your cpu when it gets too hot, so that it doesn't overheat. once the temperature is below an acceptable level, it increases the frequency again.

i tested it out, and it seems to work quite well. i haven't had any overheating issues, even on days where the surrounding air was well over 90 degrees fahrenheit, and with cpu on full blast. (as a caveat, i had also applied a bios update before testing it, but the program did show that it was throttling and un-throttling throughout the day.) i use the program with the suggested upper limit of 80 degrees celcius.

EDIT: I currently use cpufreqd to throttle my CPU:

$ cat /etc/cpufreqd.conf
[General]
pidfile=/var/run/cpufreqd.pid
poll_interval=2
verbosity=4
[/General]

[acpi]
acpid_socket=/var/run/acpid.socket
[/acpi]

[Profile]
name=High
minfreq=0000000
maxfreq=2000000
policy=conservative
[/Profile]

[Profile]
name=Medium
minfreq=0000000
maxfreq=1400000
policy=conservative
[/Profile]

[Profile]
name=Low
minfreq=0000000
maxfreq=1100000
policy=powersave
[/Profile]



[Rule]
name=Default
acpi_temperature=thermal_zone0:0-65
profile=High
[/Rule]

[Rule]
name=CPU Getting Hot
acpi_temperature=thermal_zone0:65-75
profile=Medium
[/Rule]

[Rule]
name=CPU Almost Too Hot
acpi_temperature=thermal_zone0:75-200
profile=Low
[/Rule]
2
  • 3
    this would throttle the frequency of my entire CPU, that's not desired. I just want to limit how much a single application can utilize my CPU
    – Earlz
    May 31, 2013 at 14:04
  • i agree, it's not exactly what you're looking for, but at least it will help people whose computers are crashing from overheating, when the cpu is 100% active (as mine was). 'nice' doesn't change how much cpu gets used as much as it changes program priority. so it lets the cpu hog eat every remaining cycle, but only after the chickens and piglets have eaten everything they want first.
    – andrew-e
    Jun 12, 2013 at 3:27

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .