Power consumption of routers and associated networking equipment [collection]

it is usually reaching higher c-states or p-states, when intel CPUs suddenly save some power.

  • on intel, try installing powertop on the old system (i guess package was same name "opkg install powertop")
  • run it once after each boot (autostart):
    powertop --auto-tune

it does not do anything beside activating higher powersave-c-states/p-states in the CPU (higher than what kernel default activates) and then ends. CPU might save 0,2-2W afterwards. Max IO may be reduced a little bit though, as higher C-states require more time to wake up from C-sleep state. And BIOSes out there sometimes have issues with proper C-state handling, preventing usage of higher states

The tool is said to not be maintained anymore. My guess would be that newer kernels might have some of that included in the kernel.

I would expect most power consumption improvements to happen on the ethernet side (there is a big difference between the power/ speed states involved or just driver improvements waking the CPU up less often), while the CPU side might also see continued improvments, that's not the newest component at play here (relative to the older v5.10 kernel).

But without going into the details, it's hard to tell - and not really that relevant, newer kernels improve support for newer hardware, /news_at_eleven.

1 Like

Thanks for the reminder, I've used powertop on other machines, hadn't remembered to check it out under OpenWrt.

I tried the powertop --auto-tune and it just locked the box up, looked like the NICs were still active (heartbeat LEDs were as expected, but no communication possible). While the device was locked up, the power consumption dropped about 0.2 W, so not much to be gained in any case, but good to know. I suspect the brute-force "turn all tunables off" disabled something in the network devices that should be left alone, plus it looks like the new defaults for C-states and tunables are already pretty good for 5.15.

5 posts were split to a new topic: Searching for RT3200 / EA8450

It would be interesting to know how another scheduler like f.e. ondemand performs.
AFAIK the powersave scheduler keeps it at the lowest frequency at all times, while being able to perform a task quickly at a higher frequency, should be more energy efficient. When it's idle, it should return to the lowest frequency again.

That would be interesting, but apparently not possible on the N5105 box:

$ uname -a
Linux rtr02 5.15.106 #0 SMP Sat Apr 15 12:15:42 2023 x86_64 GNU/Linux

$ cat /sys/devices/system/cpu/cpufreq/policy0/scaling_available_governors
performance powersave

Which is odd, as my APU2 shows ondemand performance schedutil (but it's an old AMD, BIOS-boot, running 22.03/5.10 kernel, so lots of differences).

This doesn't shed much light, OpenWrt has stuff in different places:
https://wiki.archlinux.org/title/CPU_frequency_scaling#Scaling_drivers

schedutil would be a useful test too, but performance wouldn't be as that's just as 'dumb' as powersave as it'll run at max speed all the time.

EDIT: I just remembered something: governors aren't available until they're loaded.
So if you have something like /lib/modules/$(uname -r)/kernel/drivers/cpufreq/ then you could have additional governors, which are just a modprobe away.
(This works on f.e. Debian; still have to learn my way around OpenWrt)

I noticed, that some of my devices are very picky with a varying frequency. As a workaround I choose a governor, which operates either at lowest or highest frequency, and select an appropriate min/max frequency.

1 Like

Nothing wrong with that :slight_smile: In a thread I'm following, that's also a regular recommended workaround.
But when it comes to energy efficiency, it probably isn't the most optimal. But then you do need a good working governor/cpu frequency scaler, which is not a given.

FTR: my use of 'dumb' refers to the amount of intelligence in the governor, not in any way about someone using that governor.

Schedutil and ondemand are very similar, from my understanding. Both when it comes to performance and power consumption.

1 Like

For my rpi4b and zeropi I use the powersave governor, both devices operate with 600 MHz (my internet connection is 50/10 Mbit/s). The zeropi draws 1.4 W/h, the rpi4b 2.8 W/h. Compare this with the 8.5 W/h of my Linksys 1900ACSv2.

That table on top would look much better as a real markdown table. For example this:

type        ; device                   ;    energy/h;   min_power;   max_power;      energy;    duration;  mainspower;  powermeter;  date  ; reporter      ;details
            ;                          ;      [Wh/h];         [W];         [W];       [kWh];         [h];      [V@Hz];         [#];        ;               ;
modem       ; BT HomeHub 5A            ;        6.89;         2.2;         7.5;       0.376;       54.55;      230@50;           1; 202209 ; @moeller0     ;"OpenWrt r18441-ba7cee05ed, bridged-modem, WiFi disabled, VDSL2@PTM with vectoring and G.INP, 116.7/37 Mbps sync"
router      ; Turris Omnia             ;        7.98;         4.0;        12.0;       0.187;       23.43;      230@50;           1; 202209 ; @moeller0     ;"Turris OS 5.4.2, based on OpenWrt 19 dual core ARM a9 mvebu @1.6GHz, 2 radios 2.4GHz & 5GHz, 3 devices connected to switch, SQM/cake on wan 105/36 Mbps"
router      ; Mikrotik RB5009UPr+S+IN  ;        8.51;         8.2;        10.3;       1.2  ;      141   ;      230@50;           ?; 202209 ; @Arie         ;"OpenWRT 23.03, dual gigabit WAN, one gigabit LAN port connected."
router      ; Custom-built x86         ;           ?;         9.0;        20.0;           ?;           ?;      230@50;           3; 202209 ; @pico         ;"OpenWRT 22.03rc5, Pentium Gold G5600(8.Gen Coffee Lake 2+2HT 4GHz), Asrock B365 Pro4F, 1x8GB RAM, USB-Stick for OpenWRT, 1TB Corsair P510 for ksmbd, Broadcom PCIe 1GBit Lan x4 (74Y4064), Leike PSU (on German 230V)+Pico150 PSU, no WiFi, no input devices, no undervolt, no SQM so far, 1 LAN-device, ""max value"" = when routing 900MBit/s IPv6 (not tested: CPU burn-in likely ~50-55W)"
VoIP-base   ; Gigaset C610-IPA         ;        0.98;           ?;         1.4;       0.038;       38.73;      230@50;           1; 202209 ; @moeller0     ;"VoIP-basestation with a single DECT handset connected, used rarely"
NTP-server  ; Raspberry 4B             ;        2.00;       ?2.9?;         4.6;       0.080;       39.55;      230@50;           1; 202209 ; @moeller0     ;"Raspberry Pi 4B 4GB ram, with Uputronics Raspberry Pi GPS/RTC Expansion Board, operated as GPS disciplined NTP-server; odd readings with W readings not matching the aggregate energy usage"
switch      ; Zyxel GS1900-8HP         ;        4.99;         4.0;         6.2;       0.688;      137.83;      230@50;           1; 202209 ; @moeller0     ;"8-Port managed PoE switch; Zyxel firmware (V2.60(AAHI.3) | 01/05/2021); 5 ports connected, 0 devices powered over PoE"
router      ; TP-Link C7 v2            ;        6.28;         6  ;         7  ;       0.29 ;       47   ;      230@50;           4; 202209 ; @fodiator     ;"OpenWRT 22.03rc6, primarily AP with dynamic VLAN and 802.1x, dual band. No DHCP, DNS, USB or wired clients"
router      ; FriendlyElec ZeroPi      ;        1.39;         1.3;         1.8;       0.375;      269.6 ;      230@50;           5; 202209 ; @Barney       ;"FriendlyElec ZeroPi with TP-Link UE300; Download 50 MBit/s, upload 10 MBit/s, OpenWRT 21.02.0, 10-20 devices"
router      ; Belkin RT3200            ;        4.35;           ?;           ?;       5.01 ;     1152   ;      120@60;           6; 202211 ; @efahl        ;"Belkin RT3200, OpenWrt SNAPSHOT updated every Monday and rebooted, 2x1Gbe connections, 5G WiFi only, 2.4 radio turned off"
router      ; Custom-built x86         ;       16.45;	      3.8;        22.3;       2.785;	  169.3 ;	   230@50;	         7; 202211 ; @thejoker8814 ;"OpenWRT 21.02.3, Dual band Wifi 4/5, VDSL modem, Mitac PD10-RI, 4GB LPDDR3, 64GB SSD, (DNS, DHCP, NTP, BanIP, SQM, VPN), all measurements during normal operations (3-6 clients, mixed Wifi/ LAN)"
modem       ; Fritzbox 7520            ;        5.94;	      2.6;         7.0;       1.034;	  174.0 ;	   230@50;	         1; 202304 ; @moeller0     ;"OpenWrt SNAPSHOT, r22256-14334c222e, VDSL2 modem (VRX518) bridged to , WiFi: 2.4GHz disabled, 5GHz active, VDSL2@PTM with vectoring and G.INP, 116.7/37 Mbps sync"

could look much better like:

type device energy/h min_power max_power energy duration mainspower powermeter date reporter details
modem BT HomeHub 5A 6.89 2.2 7.5 0.376 54.55 230@50 1 202209 @moeller0 "OpenWrt r18441-ba7cee05ed, bridged-modem, WiFi disabled, VDSL2@PTM with vectoring and G.INP, 116.7/37 Mbps sync"
router Turris Omnia 7.98 4.0 12.0 0.187 23.43 230@50 1 202209 @moeller0 "Turris OS 5.4.2, based on OpenWrt 19 dual core ARM a9 mvebu @1.6GHz, 2 radios 2.4GHz & 5GHz, 3 devices connected to switch, SQM/cake on wan 105/36 Mbps"
router Mikrotik RB5009UPr+S+IN 8.51 8.2 10.3 1.2 141 230@50 ? 202209 @Arie "OpenWRT 23.03, dual gigabit WAN, one gigabit LAN port connected."
router Custom-built x86 ? 9.0 20.0 ? ? 230@50 3 202209 @pico "OpenWRT 22.03rc5, Pentium Gold G5600(8.Gen Coffee Lake 2+2HT 4GHz), Asrock B365 Pro4F, 1x8GB RAM, USB-Stick for OpenWRT, 1TB Corsair P510 for ksmbd, Broadcom PCIe 1GBit Lan x4 (74Y4064), Leike PSU (on German 230V)+Pico150 PSU, no WiFi, no input devices, no undervolt, no SQM so far, 1 LAN-device, ""max value"" = when routing 900MBit/s IPv6 (not tested: CPU burn-in likely ~50-55W)"
VoIP-base Gigaset C610-IPA 0.98 ? 1.4 0.038 38.73 230@50 1 202209 @moeller0 "VoIP-basestation with a single DECT handset connected, used rarely"
NTP-server Raspberry 4B 2.00 ?2.9? 4.6 0.080 39.55 230@50 1 202209 @moeller0 "Raspberry Pi 4B 4GB ram, with Uputronics Raspberry Pi GPS/RTC Expansion Board, operated as GPS disciplined NTP-server odd readings with W readings not matching the aggregate energy usage"
switch Zyxel GS1900-8HP 4.99 4.0 6.2 0.688 137.83 230@50 1 202209 @moeller0 "8-Port managed PoE switch Zyxel firmware (V2.60(AAHI.3) 01/05/2021) 5 ports connected, 0 devices powered over PoE"
router TP-Link C7 v2 6.28 6 7 0.29 47 230@50 4 202209 @fodiator "OpenWRT 22.03rc6, primarily AP with dynamic VLAN and 802.1x, dual band. No DHCP, DNS, USB or wired clients"
router FriendlyElec ZeroPi 1.39 1.3 1.8 0.375 269.6 230@50 5 202209 @Barney "FriendlyElec ZeroPi with TP-Link UE300 Download 50 MBit/s, upload 10 MBit/s, OpenWRT 21.02.0, 10-20 devices"
router Belkin RT3200 4.35 ? ? 5.01 1152 120@60 6 202211 @efahl "Belkin RT3200, OpenWrt SNAPSHOT updated every Monday and rebooted, 2x1Gbe connections, 5G WiFi only, 2.4 radio turned off"
router Custom-built x86 16.45 3.8 22.3 2.785 169.3 230@50 7 202211 @thejoker8814 "OpenWRT 21.02.3, Dual band Wifi 4/5, VDSL modem, Mitac PD10-RI, 4GB LPDDR3, 64GB SSD, (DNS, DHCP, NTP, BanIP, SQM, VPN), all measurements during normal operations (3-6 clients, mixed Wifi/ LAN)"
modem Fritzbox 7520 5.94 2.6 7.0 1.034 174.0 230@50 1 202304 @moeller0 "OpenWrt SNAPSHOT, r22256-14334c222e, VDSL2 modem (VRX518) bridged to , WiFi: 2.4GHz disabled, 5GHz active, VDSL2@PTM with vectoring and G.INP, 116.7/37 Mbps sync"
1 Like

So, on both of my devices (android phone, macos laptop) both alternatives require horizontal scrolling to see the full content, but the mark-up table uses a considerably less tight row spacing so I only see ~3 rows on one screen, while the ASCII table does not even take half of my screen.
So while I agree that the mark-up table allows for neater formatting, I am not sure that the loss in information density is really worth a change...

Since I have my hands on a TP-Link Archer C7 v2 I thought I might as well check it. But this device claims about 3w during boot, switches to 2 watts when its operational. So I wondered where the difference came from as its being reported as 6/7 watt.

After investigation, WIFI was NOT enabled and LUCI was not running.
So each WIFI device claims an extra 1W and starting LUCI added another 1W (might be 0.5W)

Pushed the CPU to 44% by downloading an ISO over a WireGuard connection pushed it by 0.5W as it was rocking back and forth between 3/4W (I had enabled only LUCI at that point +1W)

So it seems that you can really change the power profile by en/disabling devices and services. I thought that might interest you. :smiley:

EDIT: I swapped some text around to make it readable

2 Likes

WiFi router: Buffalo WXR-5950AX12, spec mentioned that max. power consumption is 37.1W, min. power is not known (I don't have the power meter)

NanoPi R4S: Based on what I tested by USB-C power meter, most of the time it's using 5V 0.4A which is 2W, giving it some torrent loading the power draw goes up to 0.8-1A which translates to 4-5W.

That R4S is beautiful mate, so are you running a VPN with that 4-5W?

I use transmission on it (connected a self-powered USB HDD chassis) and thrown like 10 tasks utilizing my 1G internet, the CPU usage didn't even go up to 50%

1 Like

Interesting result from the R4S.

I have a probably not very accurate USB-C power meter and it had my NanoPi R2S at around 1-2W in normal usage with a stock OpenWRT image.

My newer NanoPi R5C reads 4W on the same meter with a custom Linux 6.1 OpenWRT build. I wonder how much more the 2.5Gb NICs use than the 1Gb.

how to add values / devices to Op?

The top post is open for everybody to edit, just use that power responsibly and add your data, OR if you prefer just format your results like the row in the table in the first post and I will add it to the table. Your choice :wink:

1 Like