Knowledge base

priority

<spool>

Spool location priority — from 100, the highest, to 1, the lowest
in the configuration this is a linepriority 1inside the block <spool>
Which disk is taken first

The default is 1, the lowest. Values range from 1 to 100.

The rule is simple: the directory with the higher priority is always used until it fills up. Once it is full, the engine moves on to the next one by rank. Directories with the same priority alternate in rotation.

Hence two layouts. Different priorities give a hierarchy: a fast disk as the main one, a slow one as a spare. Equal priorities spread the I/O load evenly across several disks — which, according to the manual, is why additional directories are added in the first place.

What counts as “full” is decided by the neighboring min-free-space.

The main trap is that everyone has the same default. Having added two directories without setting priorities, you get not a hierarchy but alternation: both get one, and the engine writes to them evenly.

This may be exactly what you need — or it may be unexpected if the second directory was meant as a spare. The difference shows only under load, when files turn up somewhere other than expected.

What the Hub does. It does not write it: it has one spool directory, /var/spool/pmta, and nothing to choose from. The priority stays at the vendor default.

The line would be needed on a node with several disks — a layout the Hub does not offer today.

Recommended values

What to set. The value is chosen by the intended layout:

Value When
do not write it a single directory — the most common case
the same for all several disks, split the load evenly
different a hierarchy: a fast disk as the main one, a slow one as a spare

It is worth picking numbers with gaps (50 and 10, not 2 and 1): otherwise there will be nothing left to put a third directory between them later.

The range, the default of 1, the “higher priority is always used until it fills up” rule and alternation on equal priority come from the manual, § 3.3.2.3. The advice to pick numbers with gaps is ours.
Example configuration
# hierarchy: a fast disk as the main one, a slow one as a spare
<spool /var/spool/pmta/primary>
    priority 50</spool>

<spool /var/spool/pmta/secondary>
    priority 10
</spool>
The second directory will be used only when the first hits its free space threshold. Give them equal priority — and the engine would write to both evenly.
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▶

Adding a second directory without setting priorities

§ 3.3.2.3

What it costsBoth get the vendor’s one and alternate: the engine writes to them evenly. The directory meant as a spare turns out to be half the main one.
How to spot itMessage files pile up in both directories roughly equally.
How to do it rightSet different priorities explicitly — the default is the same for everyone.

Picking adjacent numbers

our experience

What it costsThere will be nothing to put a third directory between the two existing ones: there are no free values between 2 and 1. The priorities of all of them will have to be rewritten.
How to spot itThe priorities go in a row — 1, 2, 3.
How to do it rightPick them with gaps: 10, 50, 90.
Compatibility
PowerMTA 6.0
described in the manual of this version · platform: any
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
priority <integer>
Values
an integer from 1 to 100
Default
1 § 3.3.2.3
Applying
reload, no restart needed
Queue
also affects what is already in the queue
Where to write it
<spool>
How many times
once in the block
Everything here comes from the manual, with the section.
Inheritance
The directive lives in <spool> and applies to one directory. There is no inheritance between directories: each block describes its own location in full, and the interaction between them is exactly these priorities.
How to check on the node
The layout is visible in the configuration, the actual filling on the disk:
grep -n -A4 '^<spool' /etc/pmta/config
du -sh /var/spool/pmta/*
If files pile up in a directory other than the one you considered the main one, the priorities are almost certainly not set and the default alternation applies.
In the Hub
Cost of a mistake
reversible: harms only while it is set
Scenarios
Capacity planning