[Mailwatch-users] Memory Bloat

Dennis Willson taz at TAZ-MANIA.COM
Wed Oct 19 21:25:19 IST 2005


    [ The following text is in the "ISO-8859-1" character set. ]
    [ Your display is set for the "US-ASCII" character set.  ]
    [ Some characters may be displayed incorrectly. ]

This has nothing to do with Logging.... It has to do with custom functions for "Is Definitely Not Spam" and "Is Definitely Spam". 
Are all custom functions only done by the logger? And then why do I see the initialization code run for all custom functions for 
each of the MailScanner children? I know its allocating the HASH tables and populating them from the database each and every time. 
Are you saying that it's overwriting the previous one each time so there's only one copy in memory? If so why not just test for the 
existence of the previous one before going through all that?

Dennis

Glenn Steen wrote:
> On 19/10/05, Dennis Willson <taz at taz-mania.com> wrote:
> 
>>Well I believe I have found something that causes MailWatch to use way more memory than it really needs. I'm just learning Perl so
>>maybe I'm wrong here and if so someone please explain it to me...
>>
>>Setup: MailScanner configured to have 10 children
>>        MailWatch configured with 50 whitelist entries and 50 blacklist entries
>>
>>Each MailScanner child starts its own copy of MailWatches SQLBlackWhite.pm which reads the 100 total blacklist/whitelist entries.
>>Since there are 10 children total this means the 100 blacklist/whitelist entries are duplicated in memory 10 times making it take up
>>1000 entiries worth of memory for only 100 actual entires. This multiples out very quickly.
>>
>>Provided this is true and there isn't something I'm missing, where there's really only one copy (which I doubt since watching the
>>logs show each child invoking and creating its own copy of the list), is there a way in Perl to have "shared" memory?
>>
>>One other question is.. If using a proper connection pool to the database, individual queries should be plenty fast enough to keep
>>up with an MTA processing mail. Why not just do the database queries "on the fly"? This would also get the latest updates instantly
>>instead of waiting for MailScanner to restart its children or the SQLBlackWhite.pm to reload its HASH.
>>
>>Just some thoughts...
>>
>>Dennis
>>
> 
> Use "ps"... How many logging children do you see?
> That's right, of all spawned children just one (is supposed to)
> survive. And if (or rather when) that one dies, one of the MS children
> will spawn a new one. Perhaps a bit confusing, but rather elegant in
> its own way;-)
> 
> --
> -- Glenn
> email: glenn < dot > steen < at > gmail < dot > com
> work: glenn < dot > steen < at > ap1 < dot > se
> 
> 
> -------------------------------------------------------
> This SF.Net email is sponsored by:
> Power Architecture Resource Center: Free content, downloads, discussions,
> and more. http://solutions.newsforge.com/ibmarch.tmpl
> _______________________________________________
> Mailwatch-users mailing list
> Mailwatch-users at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/mailwatch-users

------------------------ MailScanner list ------------------------
To unsubscribe, email jiscmail at jiscmail.ac.uk with the words:
'leave mailscanner' in the body of the email.
Before posting, read the Wiki (http://wiki.mailscanner.info/) and
the archives (http://www.jiscmail.ac.uk/lists/mailscanner.html).

Support MailScanner development - buy the book off the website!



More information about the MailScanner mailing list