[collectd] eMail/Spamassasin plugins create 20% Wait-IO

bd.trailing-username(a)leading-domain.bc-bd.org bd<span style="display: none;">.trailing-username</span>(a)<span style="display: none;">leading-domain.</span>bc-bd.org
Mon Apr 2 17:18:53 CEST 2007


On Fri, Mar 30, 2007 at 09:41:59PM +0200, Florian Forster wrote:
> Hi Stefan,
> 
> On Mon, Mar 26, 2007 at 01:02:58PM +0200, bd.trailing-username(a)leading-domain.bc-bd.org wrote:
> > after deactivating these plugins io dropped from 20% to almoust 0%.
> 
> I'm not very familiar with the email-plugin myself, but I don't see why
> it generates so much Wait-IO from the code.. How many RRD-files do you
> update with and without the plugin enabled?

As it seems a whole lot:

	$ find -name "*.rrd" | wc -l
	277
	$ find email -name "*.rrd" | wc -l
	246

> I've found that updating a relatively small number of RRD-files (~160)
> will increase the wait-IO of a reasonable fast machine (4x 3GHz) to
> about 1%. I suspect the locking of RRDTool to be the cause of this. That
> can be solved by caching the values and writing them to disk in a batch,
> which is implemented in the upcoming version 4.

	model name      : Pentium III (Coppermine)
	cpu MHz         : 596.031

I took a quick look (5 minutes, as in: the following might be quite off)
at the code and as it seems it reads data from the socket in one byte
chunks (email.c, line 313):

        if (0 > (len = read (src->socket, (void *)&ret, 1))) {

I also dont't quite get the point why we use non blocking calls here,
and why the fd_sets for select() only contain one socket.

AFAICT there are more then one consumer threads involved. Why not use
one thread and poll() instead of select()?

If someone would describe these things I'd be happy to test or help with
a patch.

regards
	bd

-- 
Q:	Are we not men?
A:	We are Vaxen.



More information about the collectd mailing list