Re: multithreaded environment ?

From: Todd Lyons <>
Date: Thu, 1 Dec 2011 06:40:20 -0800

On Thu, Dec 1, 2011 at 6:29 AM, Frank Gadegast <> wrote:
>> ...unless he's got two quad core processors and opendkim is using only
>> one core, leaving the other 7 sitting basically idle.  But that's
> Exactly this is happening.
> Only one process for opendkim and because the machine is hyperthreaded,
> its running only on one virtual CPU, wich equals 1/2 core of one CPU.
> spamassassin is forking as many children as needed and is running
> on all virtual CPUs, if needed.

Right, spamassassin is, but not spamass-milter. the milter is tied to
the libmilter library.

> Why does opendkim not do the same ?
> Or can it be tricked to do so ?

In Murray's email, he explained why. spamass-milter is a wrapper that
calls spamc. spamc talks to spamd which forks the children to do the
heavy work of scanning, then gives results back to spamc, which is
then processed by spamass-milter. Only one process of spamass-milter
is running, communicating with multiple threads of libmilter.

This is how opendkim milter runs, one daemon that can communicate with
the multi-threaded libmilter library, which is exactly how
spamass-milter runs. spamass-milter just has the luxury of passing
off all the work to an app which forks (thus capable of using multiple
CPU's) and waiting for the answer to come back.

Regards... Todd
If Americans could eliminate sugary beverages, potatoes, white bread,
pasta, white rice and sugary snacks, we would wipe out almost all the
problems we have with weight and diabetes and other metabolic
diseases. -- Dr. Walter Willett, Harvard School of Public Health
Received on Thu Dec 01 2011 - 14:40:29 PST

This archive was generated by hypermail 2.3.0 : Mon Oct 29 2012 - 23:20:22 PST