Knowledge base

PMTA knowledge base›Block Global›Directive§ 3.3.1.37

thread-max-priority

Global

Highest process priority for the node's threads
in the configuration this is a linethread-max-priority 0inside the block Global
The fast end of the range

The default is 0. The directive is Unix only.

The line sets the fast end of the process priority range for the engine’s threads. The slow end is set by the paired thread-min-priority, and the manual describes them in one section — they are two bounds of one range.

The vendor’s advice: usually leave the defaults. The only named reason to touch them is that the node shares the machine with other server software, and priorities need to be weighted differently.

The default 0 is the highest urgency among the ordinary ones: process priority numbers in Unix grow toward lower urgency.

The main trap is that “maximum” here is about speed, not about the number. The fast end’s default is 0, the slow end’s is 15. So the “maximum priority” has the smaller number. Configuring by the intuition “max greater than min”, people swap the bounds and get the opposite of what they intended.

The other half: both bounds need moving. A raised fast end with an untouched slow end narrows the range, and there is nothing left to separate threads by importance.

What the Hub does. It does not write it — the vendor defaults stay.

The node, however, is not always alone on the machine: next to the engine the Hub may install the hubgate proxy gateway and the PowerDNS name server — exactly the “shares the machine with another server” case the manual names. The Hub still does not touch the priorities.

Recommended values

What to set. The vendor’s answer is unambiguous:

Value When
do not write always, if the node is alone on the machine
your own value the node shares the machine with another server, and priorities need weighting

In the second case both bounds need moving. And remember that the fast end has the smaller number: the defaults show it — 0 versus 15.

The default 0, the “Unix only” mark, the advice to keep the defaults and the case “the node shares the machine with another server” are from the manual, § 3.3.1.37. The analysis of the scale direction is ours.
Example configuration
# the range is moved as a whole; the fast end has the smaller number
thread-min-priority 5
thread-max-priority 50
An example from the manual. Note: in the example the fast end is set to a larger number than the slow end — the opposite of what the defaults show (0 versus 15).
yellow — — directive names, blue — blocks. They are highlighted the same way in the text of the card.
▲

Common mistakes and problems

what people get wrong and how it ends2 mistakes▶

Believing the maximum priority has the larger number

§ 3.3.1.37

What it costsThe defaults say the opposite: the fast end is 0, the slow end 15. Bounds set by intuition get swapped, and threads that should be fast become slow.
How to spot itThe fast end is set to a larger number than the slow end.
How to do it rightCheck by the result — the actual process priorities, not by reading: the manual’s example and its defaults disagree on the direction of the scale.

Moving one bound out of two

§ 3.3.1.37

What it costsThe range narrows, and there is nothing left to separate threads by importance. The setting looks done, but the result is the opposite.
How to spot itOnly one of the two lines is set in the configuration.
How to do it rightSet both or neither.
Compatibility
PowerMTA 6.0
described in the manual of this version · linux
The vendor does not state the first version for every directive — there is no note here. The name also appears in the 5.0 edition of the manual.
Reference data
Syntax
thread-max-priority <number>
Values
an integer, a Unix process priority
Default
0 § 3.3.1.37
Applying
reload, no restart needed
Queue
will not touch what is already queued
Where to write it
Global
How many times
once in the block
Everything here comes from the manual, with the section.
Inheritance
The directive is written at the root of the configuration file and applies to the whole node. It has no inheritance, but it does have a pair: the manual describes both bounds of the range in one section, and they should be changed together.
How to check on the node
Both bounds are read together — separately they make no sense:
grep -n 'thread-max-priority\|thread-min-priority' /etc/pmta/config
ps -eo pid,ni,comm | grep -i pmta
The second command shows the actual priorities of the node’s processes — that is what to judge the result by. The manual’s example and its own defaults set the scale in opposite directions, so check the result.
In the Hub
Cost of a mistake
dangerous: effects outlast a rollback
Scenarios
Capacity planning