News for hackers. Stuff that matters.
Re:Show HN: Universal Pause Button by ars on Tuesday June 09, 2015 @02:29PM (#9687693)
On debian the program is cpulimit.
Re:Show HN: Universal Pause Button by leni536 on Tuesday June 09, 2015 @04:42PM (#9688418)
I think using nice or renice is better practice. Hard throttling is way more inefficient.
Re:Show HN: Universal Pause Button by curun1r on Tuesday June 09, 2015 @06:06PM (#9688824)
It may be, but it doesn't solve some of the problems that cputhrottle does. My main use for cputhrottle is to limit the CPU usage of Flash. It's not that I want to use the CPU for something else, at least not at the moment, but I don't want my laptop's fans to turn on, the whole thing to heat up and it to kill my battery life. [re]nice will only allow another process to get CPU priority, it won't keep the CPU utilization low.

The bizarre part, when it comes to Flash, is that I've yet to see an actual difference in the application behavior when I throttle down it's CPU usage. I would think that if it normally maxes out 7 of my 8 logical cores, being limited to 40% of one core would make introduce slowness. But I guess that's just an indication of how poorly written the OS X flash client it.

Re:Show HN: Universal Pause Button by dx211 on Tuesday June 09, 2015 @06:41PM (#9688998)
You might not notice the difference, but that guy at Apple who's only getting 5% of his usual haul of bitcoins this month sure will!
Re:Show HN: Universal Pause Button by tehwalrus on Wednesday June 10, 2015 @03:57AM (#9690590)
Flash is running an event engine like JS under there. Your comment made it occur to me that they might busywait, rather than having a proper scheduler. This seems insanely lazy.
Re:Show HN: Universal Pause Button by ars on Wednesday June 10, 2015 @03:45PM (#9694784)
It's not a busywait, they use the extra CPU to render additional animation frames. But half the time the difference is not visible anyway.
Re:Show HN: Universal Pause Button by anom9999 on Wednesday June 10, 2015 @03:51AM (#9690579)
Only yesterday I was raging at Flash for continually chewing up my CPU and RAM. I hadn't even considered setting limits on the processes. So thank you for the suggestion.
Re:Show HN: Universal Pause Button by ars on Tuesday June 09, 2015 @07:33PM (#9689216)
Nice solves a different problem: Making sure that less important programs don't hog cpu time.

I use cpulimit to force a CPU bound program to slow down. I also use it for programs that always max out the CPU for no good reason, and work fine with less CPU.

Nice won't help with either of those.

Re:Show HN: Universal Pause Button by jokr004 on Tuesday June 09, 2015 @03:09PM (#9687937)
The kill -STOP command works on linux too
Re:Show HN: Universal Pause Button by ars on Tuesday June 09, 2015 @03:15PM (#9687966)
It does, but cpulimit repeatedly stops/continues the program to keep it within a certain amount of CPU.

It works pretty good, but I have had flash games crash if you limit them too low for a while.

Re:Show HN: Universal Pause Button by jokr004 on Tuesday June 09, 2015 @03:58PM (#9688189)
Ok I had a total brain-fart there.. I didn't realize that you were responding about the cputhrottle command. Whoops