Green computing?

hfl
Posts: 18
Joined: Sun Oct 31, 2010 3:53 pm

Green computing?

Postby hfl » Wed Nov 17, 2010 10:06 am

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?

Thanks,
hfl

User avatar
bigfoot65
Project Manager
Posts: 11437
Joined: Mon May 25, 2009 4:31 pm

Re: Green computing?

Postby bigfoot65 » Wed Nov 17, 2010 11:04 am

That is a great idea. We do have something similar at http://wiki.amahi.org/index.php/Linux-hda_commands. 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.
ßîgƒσστ65
Applications Manager

nuclear216
Posts: 15
Joined: Wed Dec 23, 2009 7:23 am

Re: Green computing?

Postby nuclear216 » Wed Nov 17, 2010 1:39 pm

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.

http://press.redhat.com/2010/05/25/red- ... 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.

SystemTap
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.

Tuned
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.
Video Editing workstation:
Dual CPU DualcoreOpteron 2.6 Ghz / 8 GB Ram / 1 TB (2x75 GB Raptor RAID 1 + 500 GB + 320 GB)

Amahi HDA (backup and used to VPN my work around nicely):
Atom 330/2 GB Ram / Intel D945GCLF2D / 320 GB + 1 TB storage

hfl
Posts: 18
Joined: Sun Oct 31, 2010 3:53 pm

Re: Green computing?

Postby hfl » Thu Nov 18, 2010 9:45 am

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

User avatar
moredruid
Expert
Posts: 791
Joined: Tue Jan 20, 2009 1:33 am
Location: Netherlands
Contact:

Re: Green computing?

Postby moredruid » Fri Nov 19, 2010 12:58 am

* 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).
echo '16i[q]sa[ln0=aln100%Pln100/snlbx]sbA0D2173656C7572206968616D41snlbxq' | dc
Galileo - HP Proliant ML110 G6 quad core Xeon 2.4GHz, 4GB RAM, 2x750GB RAID1 + 2x1TB RAID1 HDD

User avatar
jayrock
Posts: 223
Joined: Thu Dec 02, 2010 12:55 am

Re: Green computing?

Postby jayrock » Thu Dec 02, 2010 3:34 am

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 s.th. 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

User avatar
jayrock
Posts: 223
Joined: Thu Dec 02, 2010 12:55 am

Re: Green computing?

Postby jayrock » Fri Dec 03, 2010 8:23 am

Found this: http://sourceforge.net/projects/nvram-wakeup/

Will give it a try and report back.

/jayrock

User avatar
bigfoot65
Project Manager
Posts: 11437
Joined: Mon May 25, 2009 4:31 pm

Re: Green computing?

Postby bigfoot65 » Fri Dec 03, 2010 9:40 am

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.
ßîgƒσστ65
Applications Manager

User avatar
jayrock
Posts: 223
Joined: Thu Dec 02, 2010 12:55 am

Re: Green computing?

Postby jayrock » Sat Dec 04, 2010 6:05 am

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.....

User avatar
bigfoot65
Project Manager
Posts: 11437
Joined: Mon May 25, 2009 4:31 pm

Re: Green computing?

Postby bigfoot65 » Sat Dec 04, 2010 10:56 am

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.
ßîgƒσστ65
Applications Manager

Who is online

Users browsing this forum: No registered users and 2 guests