You are not logged in.

#1 2013-02-24 22:08:20

Lockheed
Member
Registered: 2010-03-16
Posts: 1,521

How to manually set the governor?

I'm trying to do this

$ sudo do echo conservative > /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor
bash: /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor: ambiguous redirect

but as you can see, I get an issue. I have two cores.

Offline

#2 2013-02-24 22:18:15

Meyithi
Member
From: Wirral, UK
Registered: 2009-06-21
Posts: 550
Website

Re: How to manually set the governor?

/sys/devices/system/cpu/cpufreq will set stuff for all cores  - and I don't have a scaling_governor file just a folder which is related to the loaded module.  You should check the wiki page for cpufreq/cpupower - a lot of stuff has changed from how it was 12 or so months back.


The mind roams more freely in empty rooms.
dwm - colours - ncmpcpp - system
irc://irc.freenode.net:meyithi

Offline

#3 2013-02-24 22:26:24

elkoraco
Member
Registered: 2013-02-18
Posts: 140

Re: How to manually set the governor?

as root:

 cpupower frequency-set -r -g conservative

It used to be cpufreq-set. The switches say: -r means set for all CPUs and -r means set the for governor. cpupower frequency-set --help will give you some more info.

Offline

#4 2013-02-24 22:41:38

Gusar
Member
Registered: 2009-08-25
Posts: 3,605

Re: How to manually set the governor?

Using echo with sudo is a common thing, you could've easily found it with a simple search.

And may I ask why you want to use the conservative governor? Have you forgotten about this: https://bbs.archlinux.org/viewtopic.php?id=151263 ?

Offline

#5 2013-02-25 00:01:56

Lockheed
Member
Registered: 2010-03-16
Posts: 1,521

Re: How to manually set the governor?

I can't use cpufreq or similar methods because of undervolting I am running.

@Gusar, thanks for pointing me in 'sudo' direction. However:

sudo sh -c "echo conservative > /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor"
sh: /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor: No such file or directory

which is strange, because if I run in inside a script

/for i in /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor; do opt $i conservative; done

it works. But then again - it's not echo. What could I use to make it work?

As for the other thread, I find the argument for not using lower freq governors entirely invalid as it is derived from a faulty premiss, which I already explained there.

Last edited by Lockheed (2013-02-25 00:05:45)

Offline

#6 2013-02-26 17:07:53

Gusar
Member
Registered: 2009-08-25
Posts: 3,605

Re: How to manually set the governor?

Lockheed wrote:

I can't use cpufreq or similar methods because of undervolting I am running.

This makes no sense. What do you think using the conservative governor is, if not exactly "using cpufreq"? The governor controls how cpufreq should behave. The only way to not use cpufreq is to not load the acpi_cpufreq module, but that would be silly.

Lockheed wrote:

As for the other thread, I find the argument for not using lower freq governors entirely invalid as it is derived from a faulty premiss, which I already explained there.

You didn't explain anything, the examples you gave were faulty. The premise comes from Intel engineers. Are you claiming Intel engineers are wrong? That you know how a CPU works better than those who actually designed said CPU?

Offline

#7 2013-02-26 22:31:50

Lockheed
Member
Registered: 2010-03-16
Posts: 1,521

Re: How to manually set the governor?

Gusar wrote:

You didn't explain anything, the examples you gave were faulty. The premise comes from Intel engineers. Are you claiming Intel engineers are wrong? That you know how a CPU works better than those who actually designed said CPU?

Engineering has nothing to do with it. It is pure logic and working for Intel, or any other credentials (or lack of them) of the author have nothing to do with the fact whether the statement is logically sound or not.
I gave a very good example, but if you insist on hearing one again, here it goes:


Situation: Opera browser with ~40 tabs, open all day long.

Problem: Flash on Linux sucks which means it produces CONSTANT, UNPRODUCTIVE and UNNECESSARY 100% load on CPU cores, while doing nothing.

Result: overheating cpu, waste of power, and possible more grave problems on boards affected with faulty NVIDIA chips.

How exactly is your ideology of ondemand purity going to help with that?
Perhaps you'd like to reimburse, say, users of laptops affected with NVIDIA bug for hastening of deterioration of their systems by ill-advising them on use of governors?


I don't mean to be mean, but such statements so clearly flawed yet repeatedly made, and in a way exuding stench of false (sic!) rational superiority of the author really press my buttons.



On a separate note - thanks for informing me about cpufreq. I learnt something today. Perhaps you could do the same.

Offline

#8 2013-02-26 23:42:50

Gusar
Member
Registered: 2009-08-25
Posts: 3,605

Re: How to manually set the governor?

Engineering has nothing to do with it. It is pure logic and working for Intel, or any other credentials (or lack of them) of the author have nothing to do with the fact whether the statement is logically sound or not.

So you are claiming that the Intel engineers are wrong?

Engineering has *everything* to do with it. You can't make statements without knowing how the hardware works. And no one knows better how the hardware works than the very people who designed it.

Problem: Flash on Linux sucks which means it produces CONSTANT, UNPRODUCTIVE and UNNECESSARY 100% load on CPU cores, while doing nothing.

First, there is no mention of flash in that other thread, so saying "I gave a very good example" is just plain false. Second, not all flash apps misbehave like that, in fact it's more exception than the norm. Third, who runs a misbehaving flash app all day long?

Ok, you did come up with a valid example. But the exact point of it is what, that ondemand shouldn't be used because a flash app might misbehave? From a thermal management and power consumption standpoint, it makes much more sense to identify the misbehaving app and close it, rather than not use ondemand.

Perhaps you'd like to reimburse, say, users of laptops affected with NVIDIA bug for hastening of deterioration of their systems by ill-advising them on use of governors?

What exactly are you trying to say, that people shouldn't be advised to use ondemand because Nvidia some years ago sold a batch of defective graphic cards? There's only one possible reaction to this: huh??

Sense. You're making none. You want to use conservative, even though the very people who created your CPU are telling you that you shouldn't. And bringing in Nvidia Bumpgate is just bizarre.

Offline

#9 2013-02-27 00:17:09

Lockheed
Member
Registered: 2010-03-16
Posts: 1,521

Re: How to manually set the governor?

Gusar wrote:

So you are claiming that the Intel engineers are wrong?

I explained quite clearly what I'm claiming.

Gusar wrote:

Engineering has *everything* to do with it. You can't make statements without knowing how the hardware works. And no one knows better how the hardware works than the very people who designed it.

What Intel engineers have anything to do with it anyway? It's absurd!

Gusar wrote:

First, there is no mention of flash in that other thread, so saying "I gave a very good example" is just plain false.

No, you are mistaken. I gave you analogical example based on exactly the same premise - CPU running at 100% doing the work that could have been done in the same way on much lower clock.
Want another example? Try running an undemanding Dos game (like NFS from 1995) in DosBOX window and see what does it do to your CPU load on ondemand. I could multiply those examples all night long, but that's beside the point as just one is enough to prove the argument of ondemand-always-for-everyone is just plain wrong.

Gusar wrote:

Second, not all flash apps misbehave like that, in fact it's more exception than the norm.

Then you are lucky enough to never use eBay or 60% of other flash-based pages. Cudos.

Gusar wrote:

Third, who runs a misbehaving flash app all day long?

Again, those are web sites, and people run them all day long because that's what internet is for.

Gusar wrote:

Ok, you did come up with a valid example. But the exact point of it is what, that ondemand shouldn't be used because a flash app might misbehave?

NO. The point of it is that there is a multitude of everyday situations when running CPU on limited speed in order to save power and reduce temperature is THE right thing to do.
I don't know your computer pattern use, but in mine that is the case for easily 70-80% of the time the computer is running.

Gusar wrote:

From a thermal management and power consumption standpoint, it makes much more sense to identify the misbehaving app and close it, rather than not use ondemand.

OMG! Why didn't I think about it? It's so simple – I should just close the web browser and don't use internet – then I can run ondemand at all times without worries of badly written software code. And while I'm at it, I could even sell my laptop (cause what's the use of it, anyway) and invest the money in gardening hobby...

Gusar wrote:

What exactly are you trying to say, that people shouldn't be advised to use ondemand because Nvidia some years ago sold a batch of defective graphic cards? There's only one possible reaction to this: huh??

And the answer is: Duh!
But seriously, I'm sick and tired of the Nvidia-bug subject. That was just the most serious (yet sadly frequent) consequence to which your ill advice could lead to.

Gusar wrote:

Sense. You're making none.

I am afraid I could say exactly the same about you, but I think there's no point of stating the obvious.


In the ideal world, we could all use ondemand as the permanent governor, but this ideal has nothing to do with reality, whether you are willing to accept it or not.

Just don't try to dress your argument as logically valid, because that is just insulting. The idea of  “ondemand-always-for-everyone” is simply wrong and there is no way around it.

Offline

#10 2013-02-27 01:07:05

Gusar
Member
Registered: 2009-08-25
Posts: 3,605

Re: How to manually set the governor?

Lockheed wrote:

What Intel engineers have anything to do with it anyway? It's absurd!

They wrote this: https://lesswatts.org/projects/applicat … o-idle.php <- that's how today's processors work. And it's because of *that*, that one should always use ondemand.

Lockheed wrote:

No, you are mistaken. I gave you analogical example based on exactly the same premise - CPU running at 100% doing the work that could have been done in the same way on much lower clock.

You gave some examples to which this didn't apply, and then a vague "there is plenty", but didn't provide any of those "plenty". So no, I am not mistaken.

Lockheed wrote:

Want another example? Try running an undemanding Dos game (like NFS from 1995) in DosBOX window and see what does it do to your CPU load on ondemand.

Games are the one valid example *I* gave in that thread.

But your particular example is wrong actually, and here's why: Dosbox is an emulator, it runs at a fixed number of cycles per second. In order for NFS to run at full speed, the number of cycles can be such that the CPU will not be at 100%. I *know*, because I actually play NFS in Dosbox. For some Dosbox games you do need to run the emulator at the highest number of cycles per second the CPU can take, but for most you don't.

Lockheed wrote:

I could multiply those examples all night long

Please do. The more, the merrier. Because right now we have only two - a game without vsync and a misbehaving flash app.

Lockheed wrote:

but that's beside the point as just one is enough to prove the argument of ondemand-always-for-everyone is just plain wrong.

No, one is *not* enough. In order for ondemand to be a bad solution, any of the processes that hog the CPU 100% have to run all the time. But only a very few do.

Lockheed wrote:

Again, those are web sites, and people run them all day long because that's what internet is for.

All day long, without pause? Please. My brother is on facebook a lot. But playing games on there is only a fraction of the entire time he's at facebook. Also, these games do not hog the CPU 100%. An exception is possible, but such a game would be just that - an exception.

Lockheed wrote:

NO. The point of it is that there is a multitude of everyday situations when running CPU on limited speed in order to save power and reduce temperature is THE right thing to do.

Nope, there aren't. You constantly repeat that you have many examples, but you only managed to provide *a single* valid one - the misbehaving flash.

Lockheed wrote:

I don't know your computer pattern use, but in mine that is the case for easily 70-80% of the time the computer is running.

Really? What exactly is it that you do? Play games without vsync 70-80% of the time? Encode videos 70-80% of the time?

Lockheed wrote:

OMG! Why didn't I think about it? It's so simple – I should just close the web browser and don't use internet – then I can run ondemand at all times without worries of badly written software code. And while I'm at it, I could even sell my laptop (cause what's the use of it, anyway) and invest the money in gardening hobby...

Resorting to such hyperbole is a sign that you've run out of arguments.

Lockheed wrote:

And the answer is: Duh!
But seriously, I'm sick and tired of the Nvidia-bug subject. That was just the most serious (yet sadly frequent) consequence to which your ill advice could lead to.

You're sick and tired of the subject you yourself brought up?

Also, Bumpgate wasn't caused by people running the "wrong" governor. It was caused by defective hardware! Trying to use one case of defective hardware as an argument that one shouldn't use ondemand is beyond ridiculous. As is calling such cases "frequent". Name one other case similar to Nvidia Bumpgate.

Lockheed wrote:

In the ideal world, we could all use ondemand as the permanent governor, but this ideal has nothing to do with reality, whether you are willing to accept it or not.
Just don't try to dress your argument as logically valid, because that is just insulting. The idea of  “ondemand-always-for-everyone” is simply wrong and there is no way around it.

Yep, you really are claiming you're smarter than Intel engineers and kernel developers (like Matthew Garret, he wrote the blog post linked to in the other thread). That's just... wow...

Offline

#11 2013-02-27 02:21:10

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: How to manually set the governor?

Lockheed, why do you bother asking for help when you are so clearly against the idea of listening/learning? If you are convinced you know best, just get a blog and post to that.

This is tantamount to trolling: your next ban will be permanent.


Closing


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

Board footer

Powered by FluxBB