Can bogofilter run by multiprocess at the same time

陈治璋 john.chen at net263.com
Fri Oct 15 07:24:12 CEST 2004


Yes, I have done that. I used a mutex to ensure there is only one
bogoiflter process running at any time. The performance is not bad. But
sometimes when there are many emails, some clients may timeout although
the timeout is as long as seconds. And the load of the central machine
is not very high : load average 9.00, idle 66%. So I think it's because
that only once process can make the full usage of CPU.






在2004年10月15日的13:16,David Relson写道:
> More & more interesting :-)  As you realize, making bogofilter
> multi-threaded is a complex undertaking, hence can't be done in a short
> period of time.
> 
> Here's an idea:
> 
> Use the pipe to communicate with a "proxy (spam task)" on the central
> machine.  The proxy would serialize filtering requests, i.e. it would
> collect the complete message, grab a semaphore, run bogofilter, release
> the semaphore, return the status.
> 
> With the proxy being responsible for serializing requests, you could use
> bogofilter without needing to enhance it.
> 
> Gotta go now.  It's late and I have work in the morning.
> 
> David
> 
> On Fri, 15 Oct 2004 11:55:09 +0800
> _________ wrote:
> 
> > I know. But the emails come from many machines and we don't want to
> > setup a bogofilter in every machine. So we decide to setup a central
> > machine a handle the spam check. And the emails must be sent through
> > socket to this central machine where bogofilter is called. I tried
> > using popen-pclose or system() to call bogofilter in a multi-thread
> > daemon process. But the test always fail sooner or later.
> > 
> > 
> > ___2004___10___15______11:47___David Relson_________
> > > On Fri, 15 Oct 2004 11:40:47 +0800
> > > _________ wrote:
> > > 
> > > > I want to setup a daemon to accept from socket a email buffer and
> > > > check if the email bufer is a spam or not. About 30/sec emails
> > > > will be checked by the daemon.
> > > 
> > > Unless you're on very slow hardware, bogofilter can handle 30
> > > msgs/sec. Daemon mode isn't necessary for that load.
> > > _______________________________________________
> > > Bogofilter-dev mailing list
> > > Bogofilter-dev at bogofilter.org
> > > http://www.bogofilter.org/mailman/listinfo/bogofilter-dev
> > > 
> > > 
> > 
> 





More information about the bogofilter-dev mailing list