KORTHVEILSecurity firewall
Guides

Keep a hot firewall cooler (Cool when hot, maximum speed, turbo boost)

Download as PDF All guides

Some small firewalls, often built on laptop processors, get hot under load, and their fan is run by the board on its own: Korthveil can't turn it up. What Korthveil can do is lower the processor's power while it's hot. Less power means less heat. The firewall keeps forwarding traffic; heavy work such as intrusion prevention with many rules, TLS inspection, or a fast VPN runs a little slower while the processor is held back.

Cool when hot does this for you, and puts everything back once the processor has cooled. It's off until you turn it on.

It works in one of two ways, or both, chosen by itself unless you pick one under Lowered while hot:

  • Power limit (most Intel processors from the last ten years): the processor's power limit is lowered.
  • Maximum speed (AMD processors, and other processors without a power limit Korthveil can set): the highest speed each processor core may run at is lowered instead.

You can also keep the processor cooler all the time, not only when it's hot, with two settings under Processor speed: Maximum speed and Turbo boost.

On virtual machines none of this is possible: the panel says so, and the temperatures still show.

Which to use

  • Turbo boost off has the biggest effect on heat for the smallest loss. Turbo is the processor's short bursts above its base speed; they make most of the heat, and a firewall's steady work gains little from them. From 1.5.3 it is off by default: after the update, turbo is off on every Korthveil firewall that has a turbo switch, unless you turn it on.
  • Maximum speed gives finer control: set the highest speed every core may run at, for example 3000 MHz on a processor that can reach 5000 MHz. Lower is cooler, but heavy work (intrusion prevention, TLS inspection, a fast VPN) gets slower all the time.
  • Cool when hot only steps in when the processor is hot, and lets go once it has cooled. It works together with the two above.

For example, on a small firewall with a laptop processor that reaches 80 °C under load, turbo boost off (the default) is often enough; if it isn't, add a Maximum speed of about 60 % and keep Cool when hot on as a safety net.

Set the maximum speed and turbo boost

  1. Open Monitoring › System status and find the Cooling panel.
  2. Under Processor speed:
    • Maximum speed: type a speed and choose MHz or %. The hint shows what it means on this firewall, for example "3000 MHz = 60 % of 5000 MHz". Leave it empty for no limit. Korthveil never sets it below the lowest speed the processor supports, or above its highest.
    • Turbo boost: off by default from 1.5.3 on every Korthveil firewall whose processor has a turbo switch, for less power and heat. Turn it on if you need the bursts, for example for very fast VPN or TLS inspection. The hint shows the processor's own setting as found. (In the configuration, firmware leaves turbo exactly as the firmware set it.)
  3. Press Save to pending changes, then review and commit. The change applies at once and stays, hot or not.

Clear the settings and commit to put the processor back exactly as it was. Korthveil also puts it back when its control service stops, and sets it again when it starts.

Where the processor offers no speed control or no turbo switch (often on virtual machines, or when the firmware setup has locked turbo), the panel shows the reason instead of the setting.

Turn it on

  1. Open Monitoring › System status and find the Cooling panel.
  2. Turn on Cool when hot.
  3. Leave the settings as they are, or change them:
    • Hot at (°C): the processor is held back when it stays at or above this for 30 seconds. Default 80 °C (60 to 100).
    • Cool at (°C): everything goes back when the processor stays at or below this for 2 minutes. Default 72 °C; it must be below Hot at.
    • Limit while hot (%): how far it's held back, as a share of the processor's own limit or of its full speed. Default 70 % (40 to 95). The hint under it shows what that means on this firewall, for example 70 % of 28.0 W is 19.6 W, or 70 % of 5100 MHz is 3570 MHz. The speed never goes below the lowest speed the processor supports. With a Maximum speed set, it's a share of that speed, and the speed goes back to it, not to the processor's highest.
    • Lowered while hot: Automatic (the power limit where the processor has one, else the maximum speed), Power limit, Maximum speed, or Both. If the processor doesn't have the one you pick, the panel says so and Cool when hot uses the automatic choice.
  4. Press Save to pending changes, then review and commit.
The Cooling panel on Monitoring › System status. This test firewall is a virtual machine: it has no power limit, no speed control, no turbo switch and no fan control, so the badge says Not supported, Processor speed and Turbo boost show the reason, and Test fan, at the bottom, is greyed out.
The Cooling panel on Monitoring › System status. This test firewall is a virtual machine: it has no power limit, no speed control, no turbo switch and no fan control, so the badge says Not supported, Processor speed and Turbo boost show the reason, and Test fan, at the bottom, is greyed out.

What the panel shows

  • Hottest: the processor's own temperature, the one Cool when hot acts on: the package temperature on Intel, the control temperature (Tctl) on AMD. A network card or Wi-Fi chip that runs warmer is shown in the table but not acted on.
  • Processor power: what the processor uses now, measured, when the processor reports it (Intel and most AMD).
  • Speed now: the processor's speed at the moment, measured.
  • Maximum speed: the highest it may run at now. Set means your Maximum speed is in force; while Cool when hot has lowered it, it shows Limited and the normal maximum next to it.
  • Turbo boost: on or off now.
  • Power limit: the limit in use. While it's lowered, it shows Limited and the normal limit next to it.
  • Lowered while hot: what Cool when hot lowers on this firewall: Power limit, Maximum speed, or Power limit and maximum speed.
  • Energy preference: how the processor trades speed for power. While held back it's balance_power; afterwards it goes back to what it was.
  • Since: when the processor was last held back or let go.
  • The badge at the top: Watching, Hot (counting the 30 seconds), Power limited, Speed limited or Power and speed limited, the same with cooling down (counting the 2 minutes), Off, or Not supported. The badge is about Cool when hot only; Maximum speed and Turbo boost work whatever it says.
  • The table: every temperature sensor of the machine.

When everything goes back

The original limit or speed is always put back, exactly as it was, for every processor core:

  • when the processor has stayed at or below Cool at for 2 minutes;
  • when you turn Cool when hot off, or change its settings, and commit;
  • when the firewall restarts or Korthveil's control service stops, and also after the service stopped unexpectedly and started again.

Test fan

Some boards let Linux switch the fan. Test fan, at the bottom of the Cooling panel, lets you hear whether yours responds:

  1. Stand next to the firewall, where you can hear it.
  2. Press Test fan. It runs Full speed 20 s → Low 20 s → back to automatic, and the panel counts down each step, for example "Full speed: 14 s left, then low".
  3. Listen: the fan should get louder in the first step and quieter in the second.
  4. At the end every fan is put back exactly as it was, and the panel shows the result, for example: "Done. The system accepted all 10 changes and read them back. Every fan is back as it was. Only you can tell whether the fan really changed."

Good to know:

  • Korthveil can only see whether the system accepted each change and whether it read back what was set. Some boards accept the change and still run the fan their own way. Whether the fan really changed, only you can tell by listening. The table under the result lists every change: "the system accepted the change", "read back differently", or "refused".
  • If the processor reaches 85 °C while the fan is low, the test stops at once and the fans go back to automatic. It also stops, with the fans put back, if the firewall's control service stops.
  • One test at a time. Only superusers and administrators can run it, and each test is written to the Audit log (system.cooling.fan-test when it starts, cooling.fan-test with the result when it ends).
  • Korthveil only uses the standard fan switches Linux offers. It never writes to the board's embedded controller directly.

When Test fan isn't available

The button is greyed out with the reason when the firewall offers Linux no fan control. That's common: many mini PCs, AMD ones among them, have an embedded controller that runs the fan on its own and lets nothing else change it. On those firewalls Cool when hot is the way to keep the processor cooler: it lowers the power limit or the maximum speed instead.

At every start Korthveil also looks, by itself, for the fan chips found on many desktop and industrial boards (Nuvoton and ITE). When one is there, its fan outputs appear in Test fan and in the support bundle; when none is there, nothing changes. You don't need to do anything for this.

Notifications and the audit log

Each time the processor is held back or let go, it's written to the Audit log (as rampartd (cool when hot), actions cooling.cap and cooling.restore), and a Cooling message goes to your notification destinations: a phone push, email, or webhook (see the notifications guide). Its title says what Cool when hot changed:

Lowered while hot When it's held back When it's let go
Maximum speed Processor ran hot: maximum speed lowered Processor speed back to normal
Power limit Processor ran hot: power limit lowered Processor power limit back to normal
Both Processor ran hot: power limit and maximum speed lowered Processor power limit and speed back to normal

The message itself gives the temperature and the values before and after. You can turn it off under Monitoring › Alerts, Messages besides alerts: the entry Cool when hot lowered the processor's maximum speed or power limit, or put it back.

The Temperature too high alert (85 °C by default) stays as it is: it still tells you when the firewall is too hot, held back or not.

The Temperature too high alert (from 1.7.7)

Under Monitoring › Alerts, Checks, three settings decide when it fires:

  • Too hot at (85 °C by default): the temperature that counts as too hot.
  • Too hot for (2 minutes by default, 1 to 60): a sensor must stay at or above that temperature this long. A short spike, for example while the firewall restarts during an update or under a burst of work, does not alert.
  • Temperature not checked after a start (5 minutes by default, 1 to 60, -1 to check from the start): the processor runs hot while everything starts, so temperatures are not checked in these first minutes. After them every sensor is checked again from scratch.

On AMD processors the alert uses the real die temperatures, Tdie or Tccd1, Tccd2 …, where the processor gives them, instead of the control temperature Tctl. Some older Ryzen processors report Tctl a fixed amount above the die; when only Tctl is given, the alert takes that amount off and calls the result Tdie. The amounts are the same the Linux kernel uses:

Processor Tctl above the die
Ryzen 5 1600X, Ryzen 7 1700X, Ryzen 7 1800X 20 °C
Ryzen 7 2700X 10 °C
AMD high-end desktop processors of the first and second generation (models 1900X, 1920X, 1950X, 2920X, 2950X, 2970WX, 2990WX) 27 °C
Every other AMD processor 0 °C (Tctl is the die temperature)

The temperatures shown in the table, the graphs and the metrics are always the measured ones; only the alert reads them this way.

Watch it from other tools

  • Prometheus: korthveil_cpu_package_watts, korthveil_cpu_power_limit_watts (power limit only), korthveil_cooling_capped, korthveil_cpu_max_frequency_mhz (the highest speed allowed now) and korthveil_cpu_turbo (1 on, 0 off), next to korthveil_temperature_celsius (Monitoring › SNMP & metrics › Metrics).
  • SNMP: while the SNMP agent is on, the subtree 1.3.6.1.4.1.8072.9999.9999.3 has the hottest temperature (.3.0, tenths of °C), the processor power (.4.0), the limit in use (.5.0) and the normal limit (.6.0, tenths of a watt; power limit only), whether the processor is held back (.7.0, 1 yes, 2 no), the highest speed allowed now (.8.0, MHz), and turbo boost (.9.0, 1 on, 2 off).
  • Support bundle (Diagnostics): power.txt lists the processor's power limits, the power measured over one second, the processor speed settings, every fan control Linux can see (with an honest verdict, for example "5 on/off fan switch(es) offered by the firmware; only a fan test shows whether they move the fan"), the fan chips found at start, and the Cool when hot status.

If it says it can't be set

  • No power limit or speed control: the processor or the virtual machine offers neither. Nothing to do; the temperatures still show.
  • The processor reports its power but has no power limit, and its speed can't be set either: nothing to do here either; send a support bundle if you think this firewall should support it.
  • Korthveil may not change it: the processor has a power limit or speed control, but this installation doesn't allow Korthveil to set it yet. Restart the firewall once after updating; if it stays, send a support bundle.

Tips

  • Check the airflow first: a blocked vent or a hot cupboard makes any firewall hot.
  • If Cool when hot comes on and off often, leave more room between Hot at and Cool at (Korthveil warns below 3 °C).
  • A lower Limit while hot cools faster but slows heavy work more. 70 % is a good start for a 28 W laptop processor and for most AMD mini PCs.
  • Change one thing at a time and watch Hottest for a while under normal load: Turbo boost off first, then a Maximum speed if needed.
  • If the firewall feels slow (VPN or intrusion prevention throughput drops), raise the Maximum speed or clear it.

Download as PDF All guides