Page 1 of 3

Green computing?

Posted: Wed Nov 17, 2010 10:06 am
by hfl
For less linux-literate folk like me who do not know by experience what all to tweak, it would be nice (& trendy) if you dedicated a page to green computing, e.g. either via wiki page with instructions for all the different things that could be done, or via Amahi setup page, e.g. set disk idle spindown interbal?, laptop mode setting?, WOL setting? scheduled start/stop?


Re: Green computing?

Posted: Wed Nov 17, 2010 11:04 am
by bigfoot65
That is a great idea. We do have something similar at Maybe a new page linked to this one.

If you have anything you have discovered to offer, please post it in the wiki. I know there are some things in the forums. We can try to capture those and add them to the wiki as well.

I am not a lunix expert, so some of our more advanced users may be able to contribute. It's amazing what you can find using google.

Re: Green computing?

Posted: Wed Nov 17, 2010 1:39 pm
by nuclear216
Red Hat Enterprise has a page about it's green function, one might want to look into the use of the software quoted there, most of it has been tested in fedora before being included in red hat enterprise. ... e-linux-6/

Tickless kernel
The new “tickless” kernel, in combination with numerous user-mode enhancements, previewed in recent Fedora releases, offers the possibility to reduce the number of wakeups per second for modern CPUs from 1024 (the ‘tick’ in Red Hat Enterprise Linux 5) to typically less than 30. Using well-documented tools, users may be able to lower this even more by manual tuning. This reduction makes it possible to quiesce the processor more effectively when the application load is low, thereby reducing power consumption.

Active State Power Management (ASPM)
ASPM is designed to reduce the power consumption on inactive PCI Express lanes. This feature is expected to be available for systems with relatively new hardware and firmware support. The implementation introduces a very small delay when an inactive PCI lane returns to an active state, but our internal testing has shown that the additional latency is negligible, so we believe that it is a worthwhile tradeoff.

Aggressive Link Power Management (ALPM)
The idea behind ALPM for SATA AHCI (Advanced Host Controller Interface) is to move a SATA (Serial ATA) link to a very low power mode when no I/O is pending. The controller is designed to automatically return the link back into an active power state as soon as an I/O is pending again. Savings of between 0.5 and 1.5 watts per SATA port can be expected. There are three different settings for ALPM. The default for non-hotplugable ports is the medium power setting, which seems to provide a good compromise between power saving and performance. More aggressive power saving can cause noticeable performance degradation, so while suitable for some custom environments, is not enabled by default.

Relatime drive access optimization
Relatime drive access optimization is a new method for avoiding metadata write operations on normal filesystem read accesses. In order to achieve this, the access time information is cached instead of being written immediately to a disk. The net result is that the speed of many operations, such as booting, is improved. The feature also results in increased link idle times and reduced disk spin time. Depending on the disks being used and the specific use case, this feature has the potential to save up to 2W per disk.

Enhanced graphics power management
Enhanced graphics power management is another area where Red Hat works continually to improve the abilities of the graphics drivers provided by different vendors. Depending on the hardware, our drivers offer the ability to do LVDS (low voltage differential signaling) reclocking, GPU reclocking and even complete GPU powerdowns.

Combined with relatime drive access optimization, the operating system has been carefully audited, using new SystemTap scripts, to identify applications that were doing unnecessary disk and network I/O. This iterative process is used to continuously optimize applications, reducing their I/O footprints and power demands.

Starting with Fedora 11, a new system service called Tuned was introduced. Briefly, this is a dynamic adaptive system daemon with a flexible plugin mechanism. As of today, monitoring and tuning plugins exist for ATA (Advanced Technology Attachment) hard-disk subsystems and Ethernet devices, and are available to measure CPU latency using PM-QOS (Power Management – Quality of Service). For Red Hat Enterprise Linux 6, this feature is expected to be combined with the ktune service, which provides an easier mechanism for static system tuning. We also anticipate that user definable and predefined profiles for various use cases, with an easy to use CLI, will be added.

Battery Life ToolKit (BLTK)
To analyze the impact of power management changes and enhancements, Red Hat engineers use a framework to generate reproducible workloads. The BLTK provides this, with several real life scenarios, ranging from a simple workload using a Firefox page reader to a more complex workload using OpenOffice writer and spreadsheet applications.

Re: Green computing?

Posted: Thu Nov 18, 2010 9:45 am
by hfl
Thank you very much. I plan to try those suggestions.

As I am not a Linux expert, I would be good if somebody proficient evaluates and selects the most powerful tweaks, to then offer those under a tab in the Amahi Setup pages. Something like a web frontal to selected options - or bundles of options together. There is no need to expose every feature in detail / make the user worried having to understand it. The non-technical user (like me) opens the "green computing" tab and ticks a few boxes:

* Manage run-time power savings
[Y/N] Activate all power saving measures offered by the OS (that then includes tickless kernal, ALPM, RDAO+SystemTab, ...)

* Manage standby
[30'] Interval for spinning down disk on idle [0=not active]
[60'] Interval for shutdown for WOL [0=not active]

* Manage scheduled shutdown/restart
[weekday] [start] [weekday] [stop]

That would be great

Re: Green computing?

Posted: Fri Nov 19, 2010 12:58 am
by moredruid
* Manage scheduled shutdown/restart
[weekday] [start] [weekday] [stop]
Automatic starting would be impossible: the system can't turn itself on unless the scheduling daemon (service in Windows-speak) is running for which the system needs to be turned on. There are a few exceptions: some BIOSes have a scheduler that can turn the system on at certain times, usually this is not configurable from the OS. Automatic shutdown is no problem of course, this can be scheduled.

With regards to the run-time power savings: we might want to split those into 2: aggressive and normal, where normal would entail most things optimized without a (big) performance hit while aggressive would set the machine to its greenest state even if that would mean (severe) performance degradation (like waiting for about 1.5 - 2 seconds for a disk to spin up).

Re: Green computing?

Posted: Thu Dec 02, 2010 3:34 am
by jayrock
Automatic starting would be impossible: the system can't turn itself on unless the scheduling daemon (service in Windows-speak) is running for which the system needs to be turned on. There are a few exceptions: some BIOSes have a scheduler that can turn the system on at certain times, usually this is not configurable from the OS. Automatic shutdown is no problem of course, this can be scheduled.
I would like to take this up, as I have quite some programming experience for power management and client/server control under Windows. What stops me from implementing now is that I lack a library exposing suspend, shutdown, restart and setting the wakeup timer in BIOS. No success with Google. If someone points me to the right place, I could most probably come up with a nice solution for client and timer triggered wakeup and sleep for Amahi.

Cheers, jayrock

Re: Green computing?

Posted: Fri Dec 03, 2010 8:23 am
by jayrock
Found this:

Will give it a try and report back.


Re: Green computing?

Posted: Fri Dec 03, 2010 9:40 am
by bigfoot65
Awesome. If it works, might be worth adding a page to the wiki with guidance for install. We can try to make an app out of it too.

Re: Green computing?

Posted: Sat Dec 04, 2010 6:05 am
by jayrock
Thanks for the feedback! It will however take some time, as I haven't worked with Linux for a couple of years. Also I'm running Amahi in a VM only, I don't have a spare machine for live testing.

I've digged further and maybe we can use the RTC BIOS function to simplify things. Can you help me to check this and run the following:

Code: Select all

echo 0 > /sys/class/rtc/rtc0/wakealarm echo `date '+%s' -d '+ 5 minutes'` > /sys/class/rtc/rtc0/wakealarm poweroff
Your computer should turn off. After 5 minutes it should automatically turn on. Let me know if it works. If it doesn't, pls install acpi and replace the last line:

Code: Select all

yum -y install acpi echo 0 > /sys/class/rtc/rtc0/wakealarm echo `date '+%s' -d '+ 5 minutes'` > /sys/class/rtc/rtc0/wakealarm echo 3 >/proc/acpi/sleep
If this also doesn't work, then I guess it's the full blown ACPI.....

Re: Green computing?

Posted: Sat Dec 04, 2010 10:56 am
by bigfoot65
Does the bios need to be set to something specific? I have a test machine, but was not sure if I needed to set anything on it before doing the commands.