Jump to content


Photo

Testers wanted: h3consumption to be included into future Armbian releases


  • Please log in to reply
20 replies to this topic

#1 tkaiser

tkaiser

    Advanced Member

  • Moderators
  • 2842 posts

Posted 21 August 2016 - 02:27 PM

I added a script lurking around on my disk for some time to Armbian's repo to be hopefully included into future Armbian releases when testing looks good: https://github.com/i...s/h3consumption

 

Since it's just a script you can include it in your running Armbian installation simply by downloading it from Github -- try it this way please:

sudo -s
wget -q -O /usr/local/bin/h3consumption "https://raw.githubusercontent.com/igorpecovnik/lib/master/scripts/h3consumption"
chmod 755 /usr/local/bin/h3consumption
h3consumption -H
h3consumption -p

The last 2 calls will show the verbose help text along with current settings. This might then look like this:

Spoiler

 

Mode of operation/test:

  • Please read through the description (-H output) first and check also the referenced links
  • Use -p to get currently used settings
  • Use the other switches to modify settings
  • Do not use -p now but instead do a reboot first and then check again -p
  • You might also have a look at /etc/rc.local and /etc/defaults/cpufrequtils to get an idea where the script does things for a better understanding

Two examples (will go into details later in different thread):

  • On an Orange Pi Plus 2E 'h3consumption -c 1 -m 1296 -d 408 -g off -e fast' reduces default idle consumption from 1650 mW by 780 mW to just 870 mW
  • On an Orange Pi Lite 'h3consumption -D 132 -c1 -g off -u off' reduces default idle consumption from 1060 mW by 660 mW to just 400 mW (same low consumption running identical settings possible with NanoPi M1, Orange Pi One/PC/PC Plus and maybe the larger boards too when GBit Ethernet PHY can be completely disabled)

Please note: the -D switch allows to use DRAM clockspeeds that are way below Allwinner's defaults and what's expected to work ok (since DDR3 shouldn't be clocked lower than 300 MHz and Allwinner used 408 MHz clockspeed as lower limit). While clockspeeds as low as 132 MHz seemed to work reliably in my tests and it should be ok to test these out when having in mind that this is an experimental feature you won't be able to go lower than 408 MHz anyway without a kernel patch (available in post #14 here) with all available official Armbian releases. So you've to either use the kernel .deb I provide in the other thread or wait for a new round of Armbian images (no idea how Igor's plans look like)


  • manuti, Davey Darko, rodolfo and 2 others like this

Please don't send personal messages! Use the forum so others can participate and benefit!

 

Before you report any problem please be aware that crappy SD cards and insufficient power supply are reason N° 1 why things are failing. Try to rule this out first please, check 'getting started' recommendations and check/provide 'sudo armbianmonitor -u' output first!

 

Did you check out custom google powered forum search already (before opening new threads or asking questions)?


#2 HarfTarf

HarfTarf

    Member

  • Senior Members
  • PipPip
  • 11 posts

Posted 22 August 2016 - 08:02 PM

I recently got a NanoPi Neo 512MB, I'm running your most recent build of Ubuntu 16.04.1 from your forum post.

 

What do you need me to test?



#3 tkaiser

tkaiser

    Advanced Member

  • Moderators
  • 2842 posts

Posted 23 August 2016 - 08:12 AM

What do you need me to test?

 

Well, on the NEO there's not much to test with h3consumption since settings are already chosen to lower consumption as much as possible and prevent overheating :)

 

I was looking for feedback from other H3 boards where significant consumption savings are possible :)


Please don't send personal messages! Use the forum so others can participate and benefit!

 

Before you report any problem please be aware that crappy SD cards and insufficient power supply are reason N° 1 why things are failing. Try to rule this out first please, check 'getting started' recommendations and check/provide 'sudo armbianmonitor -u' output first!

 

Did you check out custom google powered forum search already (before opening new threads or asking questions)?


#4 snowbody

snowbody

    Newbie

  • Senior Members
  • Pip
  • 9 posts

Posted 23 August 2016 - 09:27 AM

I did test the script (only h3consumption -p).

Seems to work OK on a 2E.

If you could see the actual total wattage (eg current consumption is 2W), that would be a handy feature.

(I know I could add up everything ;) )



#5 tomsaul

tomsaul

    Newbie

  • Senior Members
  • Pip
  • 7 posts

Posted 24 August 2016 - 07:20 PM

On my oPi Plus 2E I get the following, and my PowerJive monitor shows 1.08Amps use.

 

root@orangepiplus2e:/etc/RFSniffer# h3consumption -p
Active settings:

cpu       1296 mhz allowed, 1296 mhz possible, 4 cores active

dram      624 mhz

hdmi/gpu  active

usb ports active

eth0      1000Mb/s/Full, Link: yes

wlan0mon  IEEE 802.11bgn  Mode:Monitor  Tx-Power=12 dBm
          Retry  long limit:7   RTS thr:off   Fragment thr:off
          Power Management:off

wlan0     unassociated  Nickname:"<WIFI@REALTEK>"
          Mode:Monitor  Frequency=2.412 GHz  Access Point: Not-Associated
          Sensitivity:0/0
          Retry:off   RTS thr:off   Fragment thr:off
          Encryption key:off
          Power Management:off
          Link Quality:0  Signal level:0  Noise level:0
          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
          Tx excessive retries:0  Invalid misc:0   Missed beacon:0
 



#6 damies

damies

    Member

  • Senior Members
  • PipPip
  • 23 posts

Posted 06 September 2016 - 03:29 PM

Hi,

 

I am running a self built image, it's basically the standard Armbian_5.17_Orangepilite_Ubuntu_xenial_3.4.112 with a few extra debs and some pre-configured conf files in /etc.

 

I must be missing something but I cant see how/where you get the power consumption from the output of h3consumption -p? 

 

So as I have a few boards up and running with this build, here goes, in all cases below I have ssh'd into the board, run sudo reboot, then after the reboot I have ssh'd back into the board and run sudo h3consumption -p. Also in all cases the boards have no heatsinks and are running inside the plastic cases supplied by xunlong.

 

Hope this helps,

 

Dave.

Spoiler


#7 tkaiser

tkaiser

    Advanced Member

  • Moderators
  • 2842 posts

Posted 06 September 2016 - 04:01 PM

I must be missing something but I cant see how/where you get the power consumption from the output of h3consumption -p?

 

That's not possible since there is 

  • no circuitry on any of the H3 boards to measure this stuff
  • different H3 devices behave different due to voltage regulators and other PCB components (the little NanoPi NEO for example has a higher ground consumption than larger Orange Pi One/Lite)
  • some operation modes influence consumption in a way that is not predictable (WiFi --> signal strength)

So the -p switch only lists consumption relevant settings but can't provide actual consumption numbers.

 

All the testing has been done using a 2nd device between PSU and H3 device so all that's available is a table of known differences (see post #25 here) that allows you estimate roughly what you can save by enabling/disabling/adjusting stuff. So while disabling display/GPU for example will allow a headless H3 device to consume 210mW less the effect might be negligible when you attached 2 USB disks to your board and use an insufficient PSU (but disabling display/GPU anyway is a no-brainer on any headless system since it also improves temperatures and memory bandwidth).

 

Another example: You have an OPi Plus 2E that serves as a NAS for your smart TV both connected to a Gigabit Ethernet switch. Compared to defaults you could now use h3consumption to lower your idle consumption by 730mW (disabling GPU/HDMI, switching to Fast Ethernet and lowering DRAM clockspeed to 408 MHz). And use then a cron job that checks every minute with ping whether your smart TV is on and then simply executes

ethtool -s eth0 speed 1000 duplex full
echo 624000 >/sys/devices/platform/sunxi-ddrfreq/devfreq/sunxi-ddrfreq/userspace/set_freq

to activate full performance instantly on demand and switching back to idle settings when the IP address of your smart TV disappears from the network. Now h3consumption can you neither tell how high total consumption is (disk bus-powered or using a 2nd external PSU?) nor how efficient your PSU(s) work. It can only give a hint how current settings look like and what might be important. 730mW less might also be just a joke when you use the wrong disk enclosure, a 3.5" disk rotating 24/7 inside and inefficient PSUs being in use. But in case you have a 2.5"disk connected and can use hdparm to control idle spin-down of the disk you get nice savings for free.

 

But on H3 devices there's no way to get actual consumption numbers and of course you've always take the PSU into account to get the 'big picture'. 


Please don't send personal messages! Use the forum so others can participate and benefit!

 

Before you report any problem please be aware that crappy SD cards and insufficient power supply are reason N° 1 why things are failing. Try to rule this out first please, check 'getting started' recommendations and check/provide 'sudo armbianmonitor -u' output first!

 

Did you check out custom google powered forum search already (before opening new threads or asking questions)?


#8 damies

damies

    Member

  • Senior Members
  • PipPip
  • 23 posts

Posted 17 September 2016 - 11:05 PM

That's not possible since there is 

  • no circuitry on any of the H3 boards to measure this stuff

 

Thanks,

 

This answered my question.



#9 tarkin000

tarkin000

    Newbie

  • Senior Members
  • Pip
  • 6 posts

Posted 23 September 2016 - 01:18 PM

Downloaded and tested on Orange Pi lite.

-p Showed the usual info, used the -g option to turn off GPU, rebooted, -p showed it was off.



#10 Set3

Set3

    Member

  • Senior Members
  • PipPip
  • 17 posts

Posted 23 September 2016 - 11:10 PM

Hi,

Good to see a tool, that does all the power/performance tuning stuff indeed.

 

Tried the tool, in 3.4.112-sun8i #14 SMP PREEMPT Wed Sep 14 20:29:31 CEST 2016 armv7l GNU/Linux      5.20  on Orange Pi One,

 

1st remark : script does not install the ethtool, Manually install also times out without any message, doing that manually with -y and -qq removed, it complains about  "WARNING: The following packages cannot be authenticated!   ethtool Install these packages without verification? "

So you may want to modify the script for that.

 

2nd remark : looks like the 132MHz does not always stick, I cant reproduce, was something like when I changed to 2 CPUs, and no USB, it went up to .624 ?

 

3rd remark I never had a vcore reading in armbianmonitor, now I do, so armbianmonitor needs something that is now installed with your script ?

 

HDMI off, DRAM 132 2 CPUs : power from 1.4 to 0.77 W with temp from 44 to 31'C

So I will let it run for a few days, see if stability is still good.

 

Thanks.

 

Update after a week : All is ok, no problems.

So would it make sense to add the governors settings ?



#11 UnixOutlaw

UnixOutlaw

    Member

  • Senior Members
  • PipPip
  • 11 posts

Posted 01 November 2016 - 04:57 AM

OPi+ 2E :

 

Active settings:                                                             
                                                                             
cpu       1296 mhz allowed, 1296 mhz possible, 4 cores active                
                                                                             
dram      672 mhz                                                            
                                                                             
hdmi/gpu  active                                                             
                                                                             
usb ports active                                                             
                                                                             
eth0      10Mb/s/Half, Link: no                                              
                                                                             
wlan1     IEEE 802.11bgn  ESSID:"Navitas Corporate"                          
          Mode:Managed  Frequency:2.437 GHz  Access Point: 34:6F:90:9C:AE:93 
          Bit Rate=43.3 Mb/s   Tx-Power=20 dBm                               
          Retry  long limit:7   RTS thr:off   Fragment thr:off               
          Encryption key:off                                                 
          Power Management:on                                                
          Link Quality=65/70  Signal level=-45 dBm                           
          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0           
          Tx excessive retries:15  Invalid misc:183   Missed beacon:0        
                                                                             
wlan0     unassociated  Nickname:"<WIFI@REALTEK>"                            
          Mode:Managed  Frequency=2.412 GHz  Access Point: Not-Associated    
          Sensitivity:0/0                                                    
          Retry:off   RTS thr:off   Fragment thr:off                         
          Encryption key:off                                                 
          Power Management:off                                               
          Link Quality:0  Signal level:0  Noise level:0                      
          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0           
          Tx excessive retries:0  Invalid misc:0   Missed beacon:0           


#12 Luca PIrola

Luca PIrola

    Newbie

  • Senior Members
  • Pip
  • 3 posts

Posted 15 November 2016 - 02:22 PM

I added a script lurking around on my disk for .....

 

Hello,

when changing the dram frequency,  the systemctl status report state "degraded"?



#13 zador.blood.stained

zador.blood.stained

    Advanced Member

  • Moderators
  • 1838 posts

Posted 15 November 2016 - 02:29 PM

when changing the dram frequency,  the systemctl status report state "degraded"?

This means that some service(s) failed to start.

"systemctl --failed" and "systemctl status -l <failed_service_name>" should give you (and us) more info.


Spoiler

#14 Luca PIrola

Luca PIrola

    Newbie

  • Senior Members
  • Pip
  • 3 posts

Posted 15 November 2016 - 03:24 PM

root@orangepione:~# systemctl --failed
  UNIT                         LOAD   ACTIVE SUB    DESCRIPTION
â smartd.service               loaded failed failed Self Monitoring and Reporting Technology (SMART) Daemon
â systemd-modules-load.service loaded failed failed Load Kernel Modules

LOAD   = Reflects whether the unit definition was properly loaded.
ACTIVE = The high-level unit activation state, i.e. generalization of SUB.
SUB    = The low-level unit activation state, values depend on unit type.

2 loaded units listed. Pass --all to see loaded but inactive units, too.
To show all installed unit files use 'systemctl list-unit-files'.

root@orangepione:~# systemctl status -l
â orangepione
    State: degraded
     Jobs: 0 queued
   Failed: 2 units
    Since: Thu 1970-01-01 01:00:03 CET; 46 years 10 months ago
   CGroup: /
           ââ1 /sbin/init sunxi_no_mali_mem_reserve
           ââsystem.slice
           â ââavahi-daemon.service
           â â ââ2267 avahi-daemon: running [orangepione.local
           â â ââ2268 avahi-daemon: chroot helpe
           â ââlirc.service
           â â ââ651 /usr/sbin/lircd --driver=default --device=/dev/lirc0
           â ââcups.service
           â â ââ540 /usr/sbin/cupsd -f
           â âârsyslog.service
           â â ââ536 /usr/sbin/rsyslogd -n
           â ââdbus.service
           â â ââ469 /usr/bin/dbus-daemon --system --address=systemd: --nofork --nopidfile --systemd-activation
           â âântp.service
           â â ââ506 /usr/sbin/ntpd -p /var/run/ntpd.pid -g -u 105:110
           â âârpimonitor-helper.service
           â â ââ 463 /bin/bash /usr/local/sbin/rpimonitor-helper.sh /var/run/rpimonitor-helper.pid
           â â ââ3509 sleep 7.5
           â ââsystemd-logind.service
           â â ââ429 /lib/systemd/systemd-logind
           â ââcron.service
           â â ââ426 /usr/sbin/cron -f
           â ââssh.service
           â â ââ425 /usr/sbin/sshd -D
           â ââhaveged.service
           â â ââ420 /usr/sbin/haveged --Foreground --verbose=1 --write=1024
           â ââsystem-ifup.slice
           â â ââifup@eth0.service
           â â   ââ666 dhclient -v -pf /run/dhclient.eth0.pid -lf /var/lib/dhcp/dhclient.eth0.leases eth0
           â ââsystemd-udevd.service
           â â ââ175 /lib/systemd/systemd-udevd
           â ââsystemd-journald.service
           â â ââ174 /lib/systemd/systemd-journald
           â ââsystem-serial\x2dgetty.slice
           â â ââserial-getty@ttyS0.service
           â â   ââ628 /sbin/agetty -L 115200 ttyS0 screen.linux
           â ââsystem-getty.slice
           â   ââgetty@tty1.service
           â     ââ621 /sbin/agetty --noclear tty1 linux
           ââuser.slice
             ââuser-0.slice
               ââsession-1.scope
               â ââ1006 sshd: root@pts/0
               â ââ1107 -bash
               â ââ3510 systemctl status -l
               â ââ3511 pager
               ââuser@0.service
                 ââ1013 /lib/systemd/systemd --user
                 ââ1014 (sd-pam)



#15 Luca PIrola

Luca PIrola

    Newbie

  • Senior Members
  • Pip
  • 3 posts

Posted 15 November 2016 - 03:29 PM

Spoiler


#16 grymster

grymster

    Newbie

  • Senior Members
  • Pip
  • 9 posts

Posted 25 November 2016 - 12:40 PM

___ ____ _ ___
/ _ \ _ __ __ _ _ __ __ _ ___ | _ \(_) / _ \ _ __ ___
| | | | '__/ _` | '_ \ / _` |/ _ \ | |_) | | | | | | '_ \ / _ \
| |_| | | | (_| | | | | (_| | __/ | __/| | | |_| | | | | __/
\___/|_| \__,_|_| |_|\__, |\___| |_| |_| \___/|_| |_|\___|
|___/

Welcome to ARMBIAN Debian GNU/Linux 8 (jessie) 3.4.112-sun8i
System load: 0.27 Up time: 11 min
Memory usage: 10 % of 494Mb IP: 192.168.55.3
CPU temp: 37°C
Usage of /: 17% of 7.0G

Last login: Fri Nov 25 14:27:41 2016 from 192.168.155.90
root@orangepione:~# h3consumption -p
Active settings:

cpu 912 mhz allowed, 912 mhz possible, 4 cores active

dram 624 mhz

hdmi/gpu off

usb ports active

eth0 100Mb/s/Full, Link: yes

#17 bob_v2

bob_v2

    Newbie

  • Senior Members
  • Pip
  • 1 posts

Posted 07 January 2017 - 03:05 PM

Worked for me.

Orange Pi one

 

Thanks.

 

root@orangepione:~# h3consumption -p
Active settings:

cpu       1200 mhz allowed, 1200 mhz possible, 4 cores active

dram      624 mhz

hdmi/gpu  active

usb ports active

eth0      100Mb/s/Full, Link: yes
 



#18 Magnets

Magnets

    Member

  • Senior Members
  • PipPip
  • 21 posts

Posted 12 January 2017 - 12:16 AM

Testing this on a oPi PC but it doesn't re-enable cores when going back to all 4

 

Going down to 1 core works, and back to 3, but I can't enable all 4. Corekeeper is enabled in the fex file but the script never reverts the changes to rc.local

### do NOT edit the following lines, always use h3consumption instead ###
echo 0 >/sys/devices/system/cpu/cpu3/online # h3consumption


#19 damies

damies

    Member

  • Senior Members
  • PipPip
  • 23 posts

Posted 22 January 2017 - 02:35 AM

CPU temp: 37°C

 

I've never seen cpu temp below 48ºC when idle but my ambient room temp is never much below 25 (and thats with Aircon), I also don't use heatsinks.

 

Can I ask what you ambient room temp was (roughly) and if you used a heatsink.

 

Dave.



#20 kris777

kris777

    Newbie

  • Senior Members
  • Pip
  • 9 posts

Posted 02 February 2017 - 11:44 AM

I use Orange Pi lite
in order to reduce current consumption (I use Orange Pi Lite only as Internet radio ...
Basic programs / services : mpc mpd ....wifi !
I gave this entry: "h3consumption -c1 -g off"
I plugged the USB sound card
next reboot
Armbian system is launched ... but there was no access to him for wifi network !
mpd / mpc / lirc .....does not work  :unsure:
and it is known that the more the HDMI .......... which turned off :-)
no access to the shell !
I advised myself already but ...beware!  :P
 
ps. Resuscitation system ..... edition of the sd card and files:
rc.local
and replacement files : /boot/bin  .... bin.back   / script.bin ... script.bin.back


#21 Poxucis

Poxucis

    Newbie

  • Senior Members
  • Pip
  • 3 posts

Posted 03 February 2017 - 04:59 PM

Orange Pi PC:

 

Welcome to ARMBIAN 5.25 stable Ubuntu 16.04.1 LTS 3.4.113-sun8i
System load:   0.05             Up time:       1 hour
Memory usage:  4 % of 1000Mb    IP:            192.168.88.25
CPU temp:      26°C
Usage of /:    9% of 15G

Last login: Fri Feb  3 17:04:58 2017 from 192.168.88.234
root@orangepipc:~# h3consumption -p
Active settings:
cpu       816 mhz allowed, 1200 mhz possible, 1 cores active
dram      408 mhz
hdmi/gpu  off
usb ports off
eth0      100Mb/s/Full, Link: yes

 

With these settings i got idle temp to about 25C(21C ambient)