You are not logged in.

#1 2013-08-07 05:44:53

kjslag
Member
Registered: 2009-11-03
Posts: 43

"ondemand/ignore_nice_load" functionality replacement

tl;dr EDIT: I want to be able to run low priority processes in the background without making my laptop hot and loud and without slowing down other (higher priority) processes using the new intel powersave governor. ignore_nice_load, which isn't provided by the new intel powersave governor, achieved this by running niced processes at a low CPU frequency. (To temporary solution is to just stick with the less efficient ondemand governor.)

Below is my original post:
---

Does anyone know if there's a replacement for the "ondemand/ignore_nice_load" functionality? When I updated my kernel to 3.10, I noticed that the cpu governor ondemand is no longer part of the kernel and has apparently been replaced with a more efficient powersave governor. This seems to be related:
https://bbs.archlinux.org/viewtopic.php?id=163524&p=1


Why "ondemand/ignore_nice_load" seems useful and what it does:

Sometimes, I find it preferable to run a process on the lowest frequency possible. For example, if I'm encoding video on a laptop (while plugged into the wall) and I don't care if the encoding takes twice as long but I do care if my laptop gets loud and hot, then I want the encoder to run with a low CPU frequency. With ondemand, I could do this by running the encoder with "nice" (which I often want to do anyways) and
# echo 1 > /sys/devices/system/cpu/cpufreq/ondemand/ignore_nice_load
which tells cpufreq to run nice'd processes with a low CPU freqency. Is it still possible to do this?

Another example of when one might want to run software with a low CPU frequency (from this discussion):

Now, race-to-halt is not really always true, and this is a bit of a subtle thing; while something like an "add" instruction will go twice as fast if you double the frequency, something like a "load from memory" (that misses the caches) will be pretty much exactly the same speed, even if you double the frequency.... simply because the DRAM isn't going twice as fast, but responds in the exact same number of nanoseconds regardless of CPU frequency.
It should be obvious that race-to-halt does not work for the "load from dram" type instruction, since the total execution time doesn't go down, so you're not idle longer.

Last edited by kjslag (2013-08-08 23:59:14)

Offline

#2 2013-08-07 22:36:40

cfr
Member
From: Cymru
Registered: 2011-11-27
Posts: 7,140

Re: "ondemand/ignore_nice_load" functionality replacement

It is still part of the kernel and that functionality still exists with the ondemand governor. See /usr/src/linux-3.10.5-1-ARCH/Documentation/cpu-freq/governors.txt. (You might have to install the docs if you don't have them.)

However, some time ago (prior to 3.10), the default governor for supported intel gpus changed to an intel-specific pstate which includes its own governors (powersave and performance, I think).

The new default is supposed to be more efficient and is designed to take advantage of the more advanced capabilities of newer hardware. But there is nothing to stop you using ondemand if you insist - you can disable the loading of the pstate stuff if you wish.

EDIT: If you have ivybridge, it may be that the default has changed with the update to 3.10 because the initial change only affected ivybridge with a suitable patch. So even though the default changed prior to 3.10 for me, maybe it has just changed for ivybridge and that's you. (I don't know this - just I realised a way in which it might have changed with that upgrade for you.)

Last edited by cfr (2013-08-07 22:38:55)


CLI Paste | How To Ask Questions

Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L

Offline

#3 2013-08-07 22:45:07

kjslag
Member
Registered: 2009-11-03
Posts: 43

Re: "ondemand/ignore_nice_load" functionality replacement

Yes, I have ivybridge and I think that is why I didn't notice until 3.10.

So, to your knowledge, there is no way to get the same functionality with the new intel governors?

EDIT: Do you know if ignore_nice_load just hasn't been implemented yet in the new intel powersave governor?

Last edited by kjslag (2013-08-07 22:47:14)

Offline

#4 2013-08-07 22:48:30

2ManyDogs
Forum Fellow
Registered: 2012-01-15
Posts: 4,645

Re: "ondemand/ignore_nice_load" functionality replacement

Does this help? https://wiki.archlinux.org/index.php/CP … ncy_driver

And the wiki links here: http://www.reddit.com/r/linux/comments/ … l_pstates/

(edit) cfr gives you excellent advice in the next post.

Last edited by 2ManyDogs (2013-08-07 23:30:05)

Offline

#5 2013-08-07 23:00:39

cfr
Member
From: Cymru
Registered: 2011-11-27
Posts: 7,140

Re: "ondemand/ignore_nice_load" functionality replacement

Take a look at /usr/src/linux-3.10.5-1-ARCH/Documentation/thermal/intel_powerclamp.txt.

I know nothing about what is planned or not. However, given that this is a completely different way of doing things I guess it may be unlikely that exactly the same sorts of functionality will be available.

I think it would be better to concentrate on your goal in using the functionality and then ask whether the new governor can do that rather than asking whether it can do it in just the way you are used to. Does that make sense? I have no idea what the answer is - I just suspect that you may be asking the wrong question. Focus on what you want to achieve with it and see if there is a way to achieve it. I take it the nice thing is a way to achieve a certain outcome so focus on that outcome e.g. laptop doesn't get too hot etc. It seems like the doc I linked to here suggests that is just the sort of thing the pstate stuff should be really good add given that it manifests as a cooling device!


CLI Paste | How To Ask Questions

Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L

Offline

#6 2013-08-08 00:53:38

kjslag
Member
Registered: 2009-11-03
Posts: 43

Re: "ondemand/ignore_nice_load" functionality replacement

Thanks for the suggestions! I decided to go with the following solution:

I installed thermald from the AUR and started it using systemctl. thermald can keep you cpu at a user defined temperature using the following command
$ dbus-send --system --dest=org.freedesktop.thermald /org/freedesktop/thermald org.freedesktop.thermald.SetUserSetPoint string:70000
where 70000 means 70 deg C. This keeps my laptop cool and quite, which I guess is all I really wanted.

useful links:
https://aur.archlinux.org/packages/thermald/vote/
https://01.org/linux-thermal-daemon/doc … mal-daemon
https://github.com/01org/thermal_daemon … _usage.txt
https://github.com/01org/thermal_daemon … st_pref.sh

Last edited by kjslag (2013-08-08 00:56:19)

Offline

#7 2013-08-08 23:53:43

kjslag
Member
Registered: 2009-11-03
Posts: 43

Re: "ondemand/ignore_nice_load" functionality replacement

Bah, although the above method is nice, it doesn't do what I *actually* want. (Figuring out what I want can be tricky sometimes...) Apparently, what I want is to be able to run low priority processes in the background without making my laptop hot and loud and without slowing down other (higher priority) processes. ignore_nice_load achieved this by running niced processes at a low CPU frequency. The problem with thermald is that it runs the low priority processes at the same low CPU frequency as the other (higher priority) processes.

I guess I'll just revert back to ondemand for the time being.
Sorry for replying to my own post.

Offline

#8 2013-08-09 00:50:05

cfr
Member
From: Cymru
Registered: 2011-11-27
Posts: 7,140

Re: "ondemand/ignore_nice_load" functionality replacement

I thought all the ignore_nice_load did was basically to exclude niced processes' processing demands from consideration when deciding whether or not to increase the cpu frequency.  I thought nicing those processes ensured they did not take too much of whatever processing power was available. But in that case, I would think it would work with thermald as well - or, at least, similarly. That stops the system increasing the cpu frequency just in general and nicing then makes sure that whatever processing is available is prioritised to the non-niced processes.

I guess that's not how it worked out?


CLI Paste | How To Ask Questions

Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L

Offline

#9 2013-08-09 01:25:01

kjslag
Member
Registered: 2009-11-03
Posts: 43

Re: "ondemand/ignore_nice_load" functionality replacement

The difference is that with ondemand, a normal process can run at full speed (highest CPU frequency) while low priority processes run at the lowest CPU frequency. With thermald, all processes (including higher priority processes) run at the same low CPU frequency, so it's much more noticeable that there are low priority processes in the background.

Offline

Board footer

Powered by FluxBB