Hi all. It'd be awesome if we could make sure default Fedora Workstation will have "laptop mode" on by default. Right now I need to run a script that changes many power tunables (got the list from powertop) to save battery on my laptop. It should be default. Perhaps detect if the machine is on-battery and if so enable all power saving features (disable watchdog, increase the vm_dirty_writeback_centisecs value, and so on)? Can this be part of upower? Can we have a setting in Settings for that? (Something like "Enable power saving when on battery (decreases performance)"?
slightly off-topic to the main subject of this email, I was wondering: perhaps we should make gnome-shell automatically raise the nice and ionice values (ie. lower the priority) of unfocused windows, so that a focused window will always get priority for I/O and processor time (thus increasing the perceived performance of the system)
On Wed, Nov 6, 2013 at 4:18 PM, Elad Alfassa elad@fedoraproject.org wrote:
slightly off-topic to the main subject of this email, I was wondering: perhaps we should make gnome-shell automatically raise the nice and ionice values (ie. lower the priority) of unfocused windows, so that a focused window will always get priority for I/O and processor time (thus increasing the perceived performance of the system)
No that's the kernel's job not gnome-shell's. Besides raising the nice level of background processes does not gain you much if anything in terms of perceived performance on todays multi core systems.
On Wed, Nov 6, 2013 at 5:21 PM, drago01 drago01@gmail.com wrote:
On Wed, Nov 6, 2013 at 4:18 PM, Elad Alfassa elad@fedoraproject.org wrote:
slightly off-topic to the main subject of this email, I was wondering: perhaps we should make gnome-shell automatically raise the nice and
ionice
values (ie. lower the priority) of unfocused windows, so that a focused window will always get priority for I/O and processor time (thus
increasing
the perceived performance of the system)
No that's the kernel's job not gnome-shell's. Besides raising the nice level of background processes does not gain you much if anything in terms of perceived performance on todays multi core systems. -- desktop mailing list desktop@lists.fedoraproject.org https://admin.fedoraproject.org/mailman/listinfo/desktop
The Kernel can't track which window is focused and which isn't.
nice value might not mean much on an i7 (unless you're doing a really heavy multi-thread compile in the background) but ionice does, because I/O is slow even with threading, and even on SSDs, when we have high I/O loads the system needs some way to prioritize which I/O is important and which isn't. If I copy some heavy files to an external hard drive and keep the progress window focused, I probably want it to be done ASAP. On the other hand, if I hide that window and continue to do other stuff, it probably means that the file transfer is less important now (hence unfocused).
On Wed, Nov 6, 2013 at 4:28 PM, Elad Alfassa elad@fedoraproject.org wrote:
On Wed, Nov 6, 2013 at 5:21 PM, drago01 drago01@gmail.com wrote:
On Wed, Nov 6, 2013 at 4:18 PM, Elad Alfassa elad@fedoraproject.org wrote:
slightly off-topic to the main subject of this email, I was wondering: perhaps we should make gnome-shell automatically raise the nice and ionice values (ie. lower the priority) of unfocused windows, so that a focused window will always get priority for I/O and processor time (thus increasing the perceived performance of the system)
No that's the kernel's job not gnome-shell's. Besides raising the nice level of background processes does not gain you much if anything in terms of perceived performance on todays multi core systems. -- desktop mailing list desktop@lists.fedoraproject.org https://admin.fedoraproject.org/mailman/listinfo/desktop
The Kernel can't track which window is focused and which isn't.
No but the kernel is the one that has to allocate resources and make sure the system resources are handled in a way to keep the system interactive.
nice value might not mean much on an i7
Or an old core 2 or athlon x2.
(unless you're doing a really heavy multi-thread compile in the background)
This is solveable by having each application run in its own cgroup (Colin has been working on that).
but ionice does, because I/O is slow even with threading, and even on SSDs, when we have high I/O loads the system needs some way to prioritize which I/O is important and which isn't. If I copy some heavy files to an external hard drive and keep the progress window focused, I probably want it to be done ASAP. On the other hand, if I hide that window and continue to do other stuff, it probably means that the file transfer is less important now (hence unfocused).
That's a heuristic that might be true or not depending on what you are doing. You might simply swich away from the window because it takes a while not because you want it to be done slower.
Anyway we had a similar discussion a while ago on IRC (can't recall whether you participated or not) but if you want to do something like this show me numbers.
The compositor should not be in charge of doing the kernel schedulers job. What makes sense is to throttle drawing of background windows (window != application btw.) and we do that already.
----- Original Message -----
On Wed, Nov 6, 2013 at 4:28 PM, Elad Alfassa elad@fedoraproject.org wrote:
<snip>
The compositor should not be in charge of doing the kernel schedulers job. What makes sense is to throttle drawing of background windows (window != application btw.) and we do that already.
Do applications get access to that data? Because I can see some use for that, especially for network clients. There's no point in updating the display of my tweet feed if it's hidden, and there's not much use polling every 10 seconds if I can do that every minute instead (or have a helper do it for me so the rest of the app can be killed/hidden and still receive notifications).
On Wed, Nov 6, 2013 at 4:52 PM, Bastien Nocera bnocera@redhat.com wrote:
----- Original Message -----
On Wed, Nov 6, 2013 at 4:28 PM, Elad Alfassa elad@fedoraproject.org wrote:
<snip> > The compositor should not be in charge of doing the kernel schedulers > job. What makes sense is to throttle drawing of background windows > (window != application btw.) and we do that already.
Do applications get access to that data?
Not directly no. We'd have to define a protocol for that but if there is use for it why not, we already have the data anyway just need a way to pass it to applications. File a bug upstream we should discuss it there.
Done, https://bugzilla.gnome.org/show_bug.cgi?id=711575
----- Original Message -----
On Wed, Nov 6, 2013 at 4:52 PM, Bastien Nocera bnocera@redhat.com wrote:
----- Original Message -----
On Wed, Nov 6, 2013 at 4:28 PM, Elad Alfassa elad@fedoraproject.org wrote:
<snip> > The compositor should not be in charge of doing the kernel schedulers > job. What makes sense is to throttle drawing of background windows > (window != application btw.) and we do that already.
Do applications get access to that data?
Not directly no. We'd have to define a protocol for that but if there is use for it why not, we already have the data anyway just need a way to pass it to applications. File a bug upstream we should discuss it there. -- desktop mailing list desktop@lists.fedoraproject.org https://admin.fedoraproject.org/mailman/listinfo/desktop
Elad Alfassa (elad@fedoraproject.org) said:
It'd be awesome if we could make sure default Fedora Workstation will have "laptop mode" on by default. Right now I need to run a script that changes many power tunables (got the list from powertop) to save battery on my laptop. It should be default. Perhaps detect if the machine is on-battery and if so enable all power saving features (disable watchdog, increase the vm_dirty_writeback_centisecs value, and so on)? Can this be part of upower? Can we have a setting in Settings for that? (Something like "Enable power saving when on battery (decreases performance)"?
Isn't this the sort of thing that should ship by default? (Whether in a tuned profile or something else.)
Bill
On Wed, Nov 6, 2013 at 10:01 PM, Bill Nottingham notting@redhat.com wrote:
Elad Alfassa (elad@fedoraproject.org) said:
It'd be awesome if we could make sure default Fedora Workstation will have "laptop mode" on by default. Right now I need to run a script that changes many power tunables (got the list from powertop) to save battery on my laptop. It should be default. Perhaps detect if the machine is on-battery and if so enable all power saving features (disable watchdog, increase the vm_dirty_writeback_centisecs value, and so on)? Can this be part of upower? Can we have a setting in Settings for that? (Something like "Enable power saving when on battery (decreases performance)"?
Isn't this the sort of thing that should ship by default? (Whether in a tuned profile or something else.)
Someone has to generate some numbers so that we can decide on it.
On Wed, 06.11.13 16:01, Bill Nottingham (notting@redhat.com) wrote:
Elad Alfassa (elad@fedoraproject.org) said:
It'd be awesome if we could make sure default Fedora Workstation will have "laptop mode" on by default. Right now I need to run a script that changes many power tunables (got the list from powertop) to save battery on my laptop. It should be default. Perhaps detect if the machine is on-battery and if so enable all power saving features (disable watchdog, increase the vm_dirty_writeback_centisecs value, and so on)? Can this be part of upower? Can we have a setting in Settings for that? (Something like "Enable power saving when on battery (decreases performance)"?
Isn't this the sort of thing that should ship by default? (Whether in a tuned profile or something else.)
The last time I discussed this with Matthew Garrett we came to the conclusion that this isn't something we want for the general case. Best is to ping him about this.
I am pretty sure that "tuned" is nothing we ever want to ship by default. To "tune" something is the opposite of having good defaults. We want good defaults, no tuning.
Lennart
On Thu, Nov 7, 2013 at 4:47 PM, Lennart Poettering mzerqung@0pointer.dewrote:
On Wed, 06.11.13 16:01, Bill Nottingham (notting@redhat.com) wrote:
Elad Alfassa (elad@fedoraproject.org) said:
It'd be awesome if we could make sure default Fedora Workstation will
have
"laptop mode" on by default. Right now I need to run a script that changes many power tunables (got
the
list from powertop) to save battery on my laptop. It should be default. Perhaps detect if the machine is on-battery and if so enable all power saving features (disable watchdog, increase the vm_dirty_writeback_centisecs value, and so on)? Can this be part of upower? Can we have a setting in Settings for that? (Something like "Enable power saving when on battery (decreases performance)"?
Isn't this the sort of thing that should ship by default? (Whether in a tuned profile or something else.)
The last time I discussed this with Matthew Garrett we came to the conclusion that this isn't something we want for the general case. Best is to ping him about this.
I am pretty sure that "tuned" is nothing we ever want to ship by default. To "tune" something is the opposite of having good defaults. We want good defaults, no tuning.
Lennart
-- Lennart Poettering, Red Hat -- desktop mailing list desktop@lists.fedoraproject.org https://admin.fedoraproject.org/mailman/listinfo/desktop
What about automatically changing the cpu-governor to powersave when battery is under certain % and the device is unplugged, and then bringing it back to ondemand when plugging the machine back in?
cpu-governors are broken in most cases for CPUs released over the past 3/4 years.
See the discussions about cpufreq, the CPU scheduler, etc. on LWN, for example: http://lwn.net/Articles/571414/
----- Original Message -----
On Thu, Nov 7, 2013 at 4:47 PM, Lennart Poettering mzerqung@0pointer.dewrote:
On Wed, 06.11.13 16:01, Bill Nottingham (notting@redhat.com) wrote:
Elad Alfassa (elad@fedoraproject.org) said:
It'd be awesome if we could make sure default Fedora Workstation will
have
"laptop mode" on by default. Right now I need to run a script that changes many power tunables (got
the
list from powertop) to save battery on my laptop. It should be default. Perhaps detect if the machine is on-battery and if so enable all power saving features (disable watchdog, increase the vm_dirty_writeback_centisecs value, and so on)? Can this be part of upower? Can we have a setting in Settings for that? (Something like "Enable power saving when on battery (decreases performance)"?
Isn't this the sort of thing that should ship by default? (Whether in a tuned profile or something else.)
The last time I discussed this with Matthew Garrett we came to the conclusion that this isn't something we want for the general case. Best is to ping him about this.
I am pretty sure that "tuned" is nothing we ever want to ship by default. To "tune" something is the opposite of having good defaults. We want good defaults, no tuning.
Lennart
-- Lennart Poettering, Red Hat -- desktop mailing list desktop@lists.fedoraproject.org https://admin.fedoraproject.org/mailman/listinfo/desktop
What about automatically changing the cpu-governor to powersave when battery is under certain % and the device is unplugged, and then bringing it back to ondemand when plugging the machine back in?
-- -Elad Alfassa.
-- desktop mailing list desktop@lists.fedoraproject.org https://admin.fedoraproject.org/mailman/listinfo/desktop
On Thu, 07.11.13 18:21, Elad Alfassa (elad@fedoraproject.org) wrote:
The last time I discussed this with Matthew Garrett we came to the conclusion that this isn't something we want for the general case. Best is to ping him about this.
I am pretty sure that "tuned" is nothing we ever want to ship by default. To "tune" something is the opposite of having good defaults. We want good defaults, no tuning.
What about automatically changing the cpu-governor to powersave when battery is under certain % and the device is unplugged, and then bringing it back to ondemand when plugging the machine back in?
Just because something is called "powersave" it doesn't mean something actually saves more power. ;-)
As far as I followed the discussions most people these days believe that the default governor is best for all cases. (Doing something quickly on a fast CPU appears not to be worse when it comes to power consumption than doing it for a longer timer on a slow CPU... Not totally surprising, is it?) [1]
Fiddling with userspace configuration of CPU governors is something for Gentoo --omg-optimized folks...
For everything else on this topic I defer to Matthew, he obviously has more of a clue on this than I do.
Lennart
[1] Well, modulo the case where they are totally broken... As they just were...
On Thu, Nov 7, 2013 at 5:21 PM, Elad Alfassa elad@fedoraproject.org wrote:
On Thu, Nov 7, 2013 at 4:47 PM, Lennart Poettering mzerqung@0pointer.de wrote:
On Wed, 06.11.13 16:01, Bill Nottingham (notting@redhat.com) wrote:
Elad Alfassa (elad@fedoraproject.org) said:
It'd be awesome if we could make sure default Fedora Workstation will have "laptop mode" on by default. Right now I need to run a script that changes many power tunables (got the list from powertop) to save battery on my laptop. It should be default. Perhaps detect if the machine is on-battery and if so enable all power saving features (disable watchdog, increase the vm_dirty_writeback_centisecs value, and so on)? Can this be part of upower? Can we have a setting in Settings for that? (Something like "Enable power saving when on battery (decreases performance)"?
Isn't this the sort of thing that should ship by default? (Whether in a tuned profile or something else.)
The last time I discussed this with Matthew Garrett we came to the conclusion that this isn't something we want for the general case. Best is to ping him about this.
I am pretty sure that "tuned" is nothing we ever want to ship by default. To "tune" something is the opposite of having good defaults. We want good defaults, no tuning.
Lennart
-- Lennart Poettering, Red Hat -- desktop mailing list desktop@lists.fedoraproject.org https://admin.fedoraproject.org/mailman/listinfo/desktop
What about automatically changing the cpu-governor to powersave when battery is under certain % and the device is unplugged, and then bringing it back to ondemand when plugging the machine back in?
If "powersave" means "stick at low clocks" that actually eats *more* power then ondemand because the cpu will spend less time being idle.
Lennart Poettering (mzerqung@0pointer.de) said:
Isn't this the sort of thing that should ship by default? (Whether in a tuned profile or something else.)
The last time I discussed this with Matthew Garrett we came to the conclusion that this isn't something we want for the general case. Best is to ping him about this.
I am pretty sure that "tuned" is nothing we ever want to ship by default. To "tune" something is the opposite of having good defaults. We want good defaults, no tuning.
*shrug* In a multi-product universe, you need a mechansim for packaging and applying said defaults, and doing it by patching systemd or the kernel seems a less scalable solution than packaging the defaults separately. Whether that's applied via tuned, or just packaging a sysctl file, can be discussed.
Bill
----- Original Message -----
Hi all. It'd be awesome if we could make sure default Fedora Workstation will have "laptop mode" on by default. Right now I need to run a script that changes many power tunables (got the list from powertop) to save battery on my laptop. It should be default. Perhaps detect if the machine is on-battery and if so enable all power saving features (disable watchdog, increase the vm_dirty_writeback_centisecs value, and so on)? Can this be part of upower? Can we have a setting in Settings for that? (Something like "Enable power saving when on battery (decreases performance)"?
I'd check those on a case-by-case basis.
Some of the features are too important to disable or tweak down (mo' battery, or lose data if the power goes off?), and some of them probably don't do anything much on non-spinning drives for example.
I'd also be interested to know how many of those give you an actual benefit in terms of power-saving. Killing application and driver wakeups, and aggressive screen dimming probably get you more tangible benefits.
slightly off-topic to the main subject of this email, I was wondering: perhaps we should make gnome-shell automatically raise the nice and ionice values (ie. lower the priority) of unfocused windows, so that a focused window will always get priority for I/O and processor time (thus increasing the perceived performance of the system)
-- -Elad Alfassa.
-- desktop mailing list desktop@lists.fedoraproject.org https://admin.fedoraproject.org/mailman/listinfo/desktop
desktop@lists.fedoraproject.org