We're currently using txrep on our two mailserver setup:

One machine is running the redis server, both mailservers are
accessing the same (REDIS-Based) txrep database.

About every 14 days we're encountering extremely high delays while
processing mail - which could be traced back to how keys are deleted
from the txrep database. 

The txrep/awl plugin was using

    my @keys = $self->{'redis'}->keys($self->{'prefix'}.$mailaddr.'*');
    $self->{'redis'}->del( @keys );

With "KEYS" being a blocking operation of complexity O(n). Once the
number of entries becomes large enough, the deletion process takes a
very long time, thus blocking all other mail processes.

The rationale behind this deletion process seems to be that some
entries have "ip=none", while others have "ip=141.42" (first two
octects of the IP), for example:

awl_s-vhs08.charite.de|ip=141.42_score
awl_s-vhs08.charite.de|ip=141.42_count
awl_6573ac50fd54ef7d120467e9e53537c8673294b7@sa_generated|ip=none_count
awl_2b09e1a02b212fc7f58d46c539ff1d5d4b8b4ca3@sa_generated|ip=none_score

Now I examined the contents of the txrep database; it contains

 66548 entries containing "ip=some.ip_(count|score)"
736427 entries containing "ip=none_(count|score)"

Is that normal? Why are there one magnitude more entries with "ip=none"?

--
Ralf Hildebrandt                   Charite Universitätsmedizin Berlin
ralf.hildebra...@charite.de        Campus Benjamin Franklin
https://www.charite.de             Hindenburgdamm 30, 12203 Berlin
Geschäftsbereich IT, Abt. Netzwerk fon: +49-30-450.570.155

Reply via email to