zeldor.biz

Linux, programming and more

Copyright © 2025
Log in

BeagleBone optimize power consumption

November 23, 2012 by Igor Drobot 1 Comment

As you see the header of my blog the motto is “Linux TCP/IP, GreenIT and more…” this one will be about Linux and make it more greener

I will present you some ways to make your BeagleBone more efficient but still powerful.

Official and out of production BeagleBone runs the Ångström Linux distribution with following power consumption (in milliamperes at 5Volt):

Beginning with Linux Kernel version 2.6.0 you are able to scale dynamically processor frequencies through the CPUfreq subsystem.

When your processors operate at a lower clock speed, they consume proportionately less power and generate less heat.

What does it mean for BeagleBone, you can switch dynamically between 500 and 275 MHz and the best you can do it live.

Required package: cpufrequtils

Determine the minimum and maximum CPU frequency allowed:

cpufreq-info -l

cpufreq-info -l

When you set up SetCPU you have 5 different options as what to set the CPU-governor at. Default is “ondemand”

The options are:
-conservative
-userspace
-powersave
-ondemand
-performance

Example:

cpufreq-set -g powersave

cpufreq-set -g powersave

Set frequency:

cpufreq-set -f 500

cpufreq-set -f 500

Now you are able to set CPU frequency from userspace:
# 500 MHz

1
echo 500000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed

echo 500000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed

# set back to 275 MHz

1
echo 275000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed

echo 275000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed

Avoid unnecessary read&write accesses to your SD-card:

If you are using your BeagleBone system only for development or demo, you can complete disable logging (rsyslog) on your system and remove your log files: (“/var/log/*”).

Another way you move your temporarily file like logs to tmpfs:
Add this three lines to /etc/fstab:

1
2
3
tmpfs    /var/log    tmpfs    defaults    0 0
tmpfs    /tmp        tmpfs    defaults    0 0
tmpfs    /var/tmp    tmpfs    defaults    0 0

tmpfs /var/log tmpfs defaults 0 0 tmpfs /tmp tmpfs defaults 0 0 tmpfs /var/tmp tmpfs defaults 0 0

Finally stop all services that operating with “/var/log” and “/var/tmp” reload fstab (yeah without any reboot):

mount -a

mount -a

And at least you minimize the wear of your SD card;)

Swappiness
Try to avoid to write to SD-Card use more your RAM.
0: Kernel will avoid to put something in to your swap
100: Kernel will swap everything and really often in to your swap

See your actual swappiness value:

cat /proc/sys/vm/swappiness

cat /proc/sys/vm/swappiness

Set swappiness behavior to 10

sysctl vm.swappiness=10

sysctl vm.swappiness=10

To make this setting reboot save put in to:

/etc/sysctl.conf

/etc/sysctl.conf

Power Top
PowerTOP is a Linux tool to diagnose issues with power consumption and power management

Install powertop:

apt-get install powertop

apt-get install powertop

Some really good Resources:
[IBM] Reduce Linux power consumption – The CPUfreq subsystem

Filed Under: DIY, Linux Tagged With: ARM, BeagleBone, CPUfreq, Debian, fstab, Green IT, SD-Card

Categories

Archives

Tags

apache2 Apple arduino ARM Automation backup bash Cisco Cluster Corosync Database Debian Debian squeeze DIY DNS Fedora FTP Fun Icinga Ipv6 KVM Linux LVM MAC OS X Monitoring MySQL Nagios Nginx openSUSE OpenVPN PHP Proxy Python python3 qemu RAID rsync Samba security ssh Ubuntu virtualization Windows Windows 7 Wordpress

Trackbacks

  1. Orange PI zero says:
    December 28, 2018 at 22:32

    […] older post for BeagleBone power consumption optimisation is a pretty good base for this […]

Leave a Reply

Your email address will not be published. Required fields are marked *

Yeaaah Cookie! We use cookies to ensure that we give you the best experience on our website. If you continue to use this site we will assume that you are happy with it.Ok