TOPTON N5095/N5105/N100 opnsense & proxmox powersave tuning

In this post I will guide you through some of the powersave recommended settings on the TOPTON units used for pfsense/opnsense.

The reviewed units were bought from TOPTON shop on Aliexpress

Item: https://pl.aliexpress.com/item/1005004825130366.html

Intel N100 unit

CPU model: N100
Cores/Threads: 4cores/4threads
L3 cache: 6M
Max Freq: 3,40Ghz
TDP: 6W
RAM: 1x ddr5 SODIMM non-ecc 4800MH
Ethernet ports: 4x intel i226-V 2.5G RJ45
USB ports: 5x usb 2.0, 1x usb 3.0
SSD/SATA: 1x 2.5 SATA 3.0 port, 1x M.2 NVME SSD (PCIE3.0 x2)
Graphics: Intel UHD Graphics 450Mhz-800Mhz
Console port xrj45

Added optionally:

 

 

Intel N5105 unit

CPU model: N5105
Cores/Threads: 4cores/4threads
L3 cache: 4M
Max Freq: 2,80Ghz
TDP: 6W
RAM: 2x ddr4 SODIMM non-ecc 2400/2666/2933MHz
Ethernet ports: 4x intel i225-V B3/i226-V 2.5G
USB ports: 2x usb 2.0, 2x usb 3.0
SSD/SATA: 1x 2.5 SATA 3.0 port, 1x M.2 NVME SSD (PCIE3.0 x2)
Graphics: Intel UHD Graphics
Console port xrj45

Added optionally:

Available ports

Initial power draw

Both of devices out of the box with installed Windows/Linux/Opnsense/Proxmox draws around 15-16W and 20-30W under stress

Repaste CPU with thermal paste

After checking the reviews on Aliexpress, I’ve decided to re-paste CPU with new thermal paste to decrease the CPU temperature

Thermal Grizzly Kryonaut The High Performance Thermal Paste

The old thermal paste needed to be removed and the new one was applied

If you’re still not satisfied with temperatures, please consider buying a Noctua fan with USB power adapter and put it on the case.

Please note that for low powered builds it is considered to use SATA SSD rather than NVME since it heats up less under load.

 

BIOS settings

To lower down the power usage the N100 unit was configured with the recommended settings, since our appliance will not be fully loaded 24/7 and will use only 5-10% of CPU utilization for the OPNSENSE router SW.


Connect external display via HDMI and a keyboard.  Then power on the unit and press DEL to get into the BIOS settings.

 

Advanced → ACPI Settings

Key

Value

Default

Enable ACPI Auto Configuration

Auto

Disabled

Advanced → CPU Configuration

Key

Value

Default

PECI

Disabled

Enabled

Advanced → Power & performance → CPU – Power Management Control

Key

Value

Default

Boot performance mode

Turbo Performance

Turbo Performance

Intel(R) SpeedStep(tm)

Enabled

Enabled

Platform PL1 Enable

Enabled

Enabled

Platform PL1 Power

10000 (n5105)

8000 (n100)

50000

Platform PL2 Enable

Enabled

Enabled

Platform PL2 Power

12000 (n5105)

10000 (n100)

65000

C states

Enabled

Enabled

Advanced → Power & performance → CPU – Power Management Control → CPU VR Settings → Acoustic Noise Settings → Acoustic Noise Mitigation (Only SSD SATA drive)

Key

Value

Default

Acoustic noise mitigation

Enabled

Disabled

Chipset → PCH-IO Configuration → PCI Express Configuration

Key

Value

Default

DMI Link ASPM Control

Auto

Auto

Chipset → PCH-IO Configuration → PCI Express Configuration → PCI express root port <1-8>

Key

Value

Default

ASPM

Auto

Disabled

Advanced → Power & performance → GT Power Management Console

Key

Value

Default

Maximium GT Frequency

450 Mhz

Default max frequency

Props to olavrb original post here and also to STH Community since they did all the above.

Source:

  • https://forums.servethehome.com/index.php?threads/topton-jasper-lake-quad-i225v-mini-pc-report.36699/page-125#post-366943

 

 

OPNSENSE OPTIMIZATION

Go to OPNSENSE > System > Advanced > Misc settings. Turn on PowerD and set to Adaptive to start off for all states.

Then please go to OPNSENSE > System > Advanced > Tunables and add entries below:

TUNABLES ADDITIONAL PARAMETERS

Value

dev.cpu.0.cx_lowest

C3

dev.cpu.1.cx_lowest

C3

dev.cpu.2.cx_lowest

C3

dev.cpu.3.cx_lowest

C3

sysctl hw.acpi.cpu.cx_lowest

C3

Please then SSH to the Opnsense, choose option 8- Shell Console and create/edit a /boot/loader.conf.local file:

root@opnsense# vi /boot/loader.conf.local

<INSERT>
machdep.hwpstate_pkg_ctrl=0
<ESC key> + :wq!

root@opnsense# cat /boot/loader.conf.local

Reboot, then go to SSH console again check the power settings state if using C3 states:

root@opnsense# sysctl dev.cpu.0
dev.cpu.0.cx_method: C1/mwait/hwc C2/mwait/hwc C3/mwait/hwc
dev.cpu.0.cx_usage_counters: 14779023 15122084 1
dev.cpu.0.cx_usage: 49.42% 50.57% 0.00% last 254us
dev.cpu.0.cx_lowest: C3
dev.cpu.0.cx_supported: C1/1/1 C2/2/253 C3/3/1048
dev.cpu.0.freq_levels: 2001/10000 2000/10000 1900/9392 1800/8795 1700/8211 1600/7639 1500/7078 1400/6530 1300/5992 1200/5466 1100/4951 1000/4447 900/3955 800/3473
dev.cpu.0.freq: 800
dev.cpu.0.temperature: 39.0C
dev.cpu.0.coretemp.throttle_log: 0
dev.cpu.0.coretemp.tjmax: 105.0C
dev.cpu.0.coretemp.resolution: 1
dev.cpu.0.coretemp.delta: 66
dev.cpu.0.%parent: acpi0
dev.cpu.0.%pnpinfo: _HID=none _UID=0 _CID=none
dev.cpu.0.%location: handle=\_SB_.PR00
dev.cpu.0.%driver: cpu
dev.cpu.0.%desc: ACPI CPU

You can see with that and the repasting etc, it’s happily sitting at 39C.

 

Power draw after tuning​

The power for the unit while operating the OPNSENSE without huge traffic going through operates between 8-12W.

Source:

 

 

PROXMOX OPTIMIZATION

I you’ve installed PROXMOX on bare metal N100/N5105 you can also make some tuning to lower down power draw.

Before optimization (idle)

It was changing frequently from 8W-22W

Additional BIOS changes

Please change the performance mode in BIOS additionally to previously done changes

Advanced → Power & performance → CPU – Power Management Control

Key

Value

Default

Boot performance mode

Max non-turbo performance

Turbo Performance

 

BIOS other recommendations from forums (not checked)

BIOS > Advanced → CPU Configuration → cpu flex ratio override

(N100)
Max Turbo Frequency=3,4 Ghz
CPU Core Ratio= 4 (400Mhz)

Max boost frequency on mine is 3.5 GHz, min I’ve set it to 400MHz (you’ll need to adjust this in the bios under advanced cpu configuration – cpu flex ratio override – set to 4 or whatever you like). If you have a quad core cpu you’ll have to do the same for cpu 0 to 7.

CPU Core Ratio, or multiplier, determines the speed of your CPU. The overall speed of your processor is calculated by multiplying the base clock speed (BCLK) by this ratio. For example, a BCLK of 100MHz multiplied by a CPU core ratio of 45 would result in a CPU speed of 4,500MHz, or 4.5GHz. This setting can usually be changed per core or across all cores.

Example:
– no turbo ( all disabled )
– no power level tweaks ( pl1 pl2 ) . I’m considering to put 10w/10w to test …
– C states enabled
– disable Bluetooth, Audio, Wifi card

The clocks operates in range of 800MHz to 2GHz. The temps goes in 43ºC average and 53ºC top.
Far from the maximum performance but stable and fanless ( yet ). Runs fine for the purposes of small VMs, routing, vpn etc.
If absolutely necessary I will put a 120mm fan over the heatsink fins.

also if you have no use of bluetooth and/or audio then disable those in the BIOS.
you can also tell the kernel to skip those by blacklisting them.

 

PROXMOX shell CLI changes

Please SSH to the Proxmox device and execute the following

PROXMOX# apt-get install cpufrequtils sysfsutils powertop

Set the governor in crontab to “powersave” mode:

PROXMOX# crontab -e

(Choose 1 option nano and add line at the end)

@reboot echo "powersave" | tee /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor

CTRL+X and ENTER (save)

PROXMOX# reboot

The CPUfreq governor “powersave” sets the CPU statically to the
lowest frequency within the borders of scaling_min_freq and
scaling_max_freq. More at https://www.kernel.org/doc/Documentation/cpu-freq/governors.txt#:~:text=2.2%20Powersave

 

After reboot is done check frequency and scaling governor

PROXMOX# cat /sys/devices/system/cpu/cpufreq/policy0/scaling_governor
PROXMOX# cpufreq-info

Then change the GRUB settings:

PROXMOX# apt-get update
PROXMOX# apt-get install acpi-support acpid acpi

PROXMOX# nano /etc/default/grub

Change line:

GRUB_CMDLINE_LINUX_DEFAULT="quiet"
to
GRUB_CMDLINE_LINUX_DEFAULT="intel_pstate=disable"


CTRL+X and yes to save

PROXMOX# update-grub

PROXMOX# reboot

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut elit tellus, luctus nec ullamcorper mattis, pulvinar dapibus leo.

PROXMOX VM settings change

Please make sure that the VM > Options > Use tablet for pointer is disabled (No)

Set the powersave governor for the Linux VM as well

 

After optimization

The N100 running:

  • 2x OPNSENSE VM
  • 1x Ubuntu 23.x Desktop (governor_powersave)
  • 1x Windows Server
  • 1x Win11

with external USB noctua FAN attached idles around 10-12,7W

 

Sources:

LATEST UPDATE

Additionally changing the parameters for N100 device running Proxmox, I achieved 8,4-9,6 Watt Idle running 6x VMs (Ubuntu x1, Windows server x2, Opnsense x2) with no devices attached.

Advanced > Power & Performance > CPU Power Management Control

  • Boot performance=Max Battery
  • Turbo Mode: Disabled
  • View/Configure Turbo Options:

Power Limit 1 Override=Enabled

Power Limit 1=6000

Power Limit 2 Override=Enabled

Power Limit 2=12000

  • Platform PL1=Enable
  • Platform PL1 Power=5000
  • Platform PL2=Disable
0 Shares:
You May Also Like