Package: postfix
Version: 2.9.1-4
Severity: wishlist
Postfix uses FIFOs for /var/spool/postfix/public/pickup and
/var/spool/postfix/private/qmgr, according to upstream
master.cf file. These are used as triggers, by writing a
char into one of these files corresponding service gets
waked up to do its job.
qmgr is configured in master.cf to wake up every 5 minutes
(300 sec), which is implemented by master(8) using the
same mechanism: by writing a char into private/qmgr FIFO
every 300 seconds.
But each write to a named pipe results in corresponding
inode mtime to be updated, which results in disk spinning
up every 5 mins - in case no other activity is hapening
on the system.
The usage of FIFOs here is due to a bug in Solaris unix
sockets implementation. Its been this way for a long
time, since 19990321, with the following text in the
HISTORY file:
Workaround: from now on, Postfix on Solaris uses stream
pipes instead of UNIX-domain sockets. Despite workarounds,
the latter were causing more trouble than anything else on
all systems combined.
and with further comments in src/master/trigger_server.c, in
trigger_server_main():
* XXX Initially this code was implemented with UNIX-domain sockets, but
* Solaris <= 2.5 UNIX-domain sockets misbehave hopelessly when the
* client disconnects before the server has accepted the connection.
* Symptom: the server accept() fails with EPIPE or EPROTO, but the
* socket stays readable, so that the program goes into a wasteful loop.
*
* The initial fix was to use FIFOs, but those turn out to have their own
* problems, witness the workarounds in the fifo_listen() routine.
* Therefore we support both FIFOs and UNIX-domain sockets, so that the
* user can choose whatever works best.
*
* Well, I give up. Solaris UNIX-domain sockets still don't work properly,
* so it will have to limp along with a streams-specific alternative.
The final solution was to actually use FIFOs. But this is
specified in master.cf actually, so can easily be changed,
even after install.
My suggestion is to ship default configuration to use "unix"
socket type for pickup and qmgr, instead of the default "pipe".
Everything else works fine with it, and this is something
which was actually used initially, but the default changed
as per above. The original solaris problem does not exist
on linux.
Thanks,
/mjt
--
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]