Yahoo Groups archive

Milter-greylist

Index last updated: 2026-04-28 23:32 UTC

Thread

Performance improvement patch + bugfix

Performance improvement patch + bugfix

2006-01-05 by Ranko Zivojnovic

Hi,

I've made a few modifications in order to make milter-greylist perform
more responsive and faster at bigger loads:

      * Bucketed search of autowhitelisted and pending entries rather
        than write-locked only-one-at-the-time full list search
      * Large buffer for writing the dumpfile (10M)
      * New option line for the greylist.conf that allows you to disable
        the comment at the end of each dumpfile line. Apparently
        formating the date and time is quite time/cpu consumable task -
        especially if you have to do it a few hundred thousand times in
        a row. The config file option is 'dump_no_time_translation'.

...and a fix to what I consider to be a bug:
      * 'mxsync' client connection is set non-blocking, but there were
        no checks if fprintf() actually delivers the complete sync
        message to the peer or just the part of it.
      * Also, when reading the 'mxsync' client connection, being non-
        blocking, fgets() can bail out with NULL and EAGAIN which is not
        fatal error for the connection.

Best regards,

Ranko

Re: [milter-greylist] Performance improvement patch + bugfix

2006-01-06 by Ranko Zivojnovic

Use this one instead!

Previous patch introduces bug in textdump of autowhitelisted entries and
would cause the loss of autowhitelisted entries...

R.

On Fri, 2006-01-06 at 01:15 +0200, Ranko Zivojnovic wrote:
> Hi,
> 
> I've made a few modifications in order to make milter-greylist perform
> more responsive and faster at bigger loads:
> 
>       * Bucketed search of autowhitelisted and pending entries rather
>         than write-locked only-one-at-the-time full list search
>       * Large buffer for writing the dumpfile (10M)
>       * New option line for the greylist.conf that allows you to
> disable
>         the comment at the end of each dumpfile line. Apparently
>         formating the date and time is quite time/cpu consumable task
> -
>         especially if you have to do it a few hundred thousand times
> in
>         a row. The config file option is 'dump_no_time_translation'.
> 
> ...and a fix to what I consider to be a bug:
>       * 'mxsync' client connection is set non-blocking, but there were
>         no checks if fprintf() actually delivers the complete sync
>         message to the peer or just the part of it.
>       * Also, when reading the 'mxsync' client connection, being non-
>         blocking, fgets() can bail out with NULL and EAGAIN which is
> not
>         fatal error for the connection.
> 
> Best regards,
> 
> Ranko
> 
> 
> 
> ______________________________________________________________________
> YAHOO! GROUPS LINKS
> 
>      1.  Visit your group "milter-greylist" on the web.
>           
>      2.  To unsubscribe from this group, send an email to:
>          milter-greylist-unsubscribe@yahoogroups.com
>           
>      3.  Your use of Yahoo! Groups is subject to the Yahoo! Terms of
>         Service.
> 
> 
> ______________________________________________________________________
> 
-- 
Ranko Zivojnovic,
IT Director/CTO          ranko@...

Spidernet Services Ltd., Tel: +357 22 844844
Nicosia, Cyprus          FAX: +357 22 669470

Re: [milter-greylist] Performance improvement patch + bugfix

2006-01-06 by Ranko Zivojnovic

Too much coffee and not enough sleep I guess...

You also need this small patch to complete parsing of the
'dump_no_time_translation' option.

Best regards,

Ranko
Show quoted textHide quoted text
On Fri, 2006-01-06 at 12:26 +0200, Ranko Zivojnovic wrote:
> Use this one instead!
> 
> Previous patch introduces bug in textdump of autowhitelisted entries
> and
> would cause the loss of autowhitelisted entries...
> 
> R.
> 
> On Fri, 2006-01-06 at 01:15 +0200, Ranko Zivojnovic wrote:
> > Hi,
> > 
> > I've made a few modifications in order to make milter-greylist
> perform
> > more responsive and faster at bigger loads:
> > 
> >       * Bucketed search of autowhitelisted and pending entries
> rather
> >         than write-locked only-one-at-the-time full list search
> >       * Large buffer for writing the dumpfile (10M)
> >       * New option line for the greylist.conf that allows you to
> > disable
> >         the comment at the end of each dumpfile line. Apparently
> >         formating the date and time is quite time/cpu consumable
> task
> > -
> >         especially if you have to do it a few hundred thousand times
> > in
> >         a row. The config file option is 'dump_no_time_translation'.
> > 
> > ...and a fix to what I consider to be a bug:
> >       * 'mxsync' client connection is set non-blocking, but there
> were
> >         no checks if fprintf() actually delivers the complete sync
> >         message to the peer or just the part of it.
> >       * Also, when reading the 'mxsync' client connection, being
> non-
> >         blocking, fgets() can bail out with NULL and EAGAIN which is
> > not
> >         fatal error for the connection.
> > 
> > Best regards,
> > 
> > Ranko
> > 
> > 
> > 
> >
> ______________________________________________________________________
> > YAHOO! GROUPS LINKS
> > 
> >      1.  Visit your group "milter-greylist" on the web.
> >           
> >      2.  To unsubscribe from this group, send an email to:
> >          milter-greylist-unsubscribe@yahoogroups.com
> >           
> >      3.  Your use of Yahoo! Groups is subject to the Yahoo! Terms of
> >         Service.
> > 
> > 
> >
> ______________________________________________________________________
> > 
> 
> ______________________________________________________________________
> 
> YAHOO! GROUPS LINKS
> 
>      1.  Visit your group "milter-greylist" on the web.
>           
>      2.  To unsubscribe from this group, send an email to:
>          milter-greylist-unsubscribe@yahoogroups.com
>           
>      3.  Your use of Yahoo! Groups is subject to the Yahoo! Terms of
>         Service. 
> 
> 
> ______________________________________________________________________
>

Re: [milter-greylist] Performance improvement patch + bugfix

2006-01-06 by manu@netbsd.org

Ranko Zivojnovic <ranko@...> wrote:

> You also need this small patch to complete parsing of the
> 'dump_no_time_translation' option.

Could you repost a full patch integrating that one? 

-- 
Emmanuel Dreyfus
Publicité subliminale: achetez ce livre!
http://www.eyrolles.com/Informatique/Livre/9782212114638/livre-bsd.php
manu@...

Re: [milter-greylist] Performance improvement patch + bugfix

2006-01-06 by Ranko Zivojnovic

On Fri, 2006-01-06 at 18:57 +0100, manu@... wrote:
> Ranko Zivojnovic <ranko@...> wrote:
> 
> > You also need this small patch to complete parsing of the
> > 'dump_no_time_translation' option.
> 
> Could you repost a full patch integrating that one? 

Here it is.

Best regards,

R.

Re: [milter-greylist] Performance improvement patch + bugfix

2006-01-08 by manu@netbsd.org

Ranko Zivojnovic <ranko@...> wrote:

> Here it is.

I've integrated this for the next release. One comment on style for your
next contribution: try to stick to the existing style, that makes the
source easier to read.

- No line longer than 80 chars
- space after if

-- 
Emmanuel Dreyfus
http://hcpnet.free.fr/pubz
manu@...

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.