ZMailer
Mariano Absatz
mailscanner at lists.com.ar
Mon Sep 22 23:52:41 IST 2003
El 22 Sep 2003 a las 22:36, Julian Field escribió:
> >What is the "40" for? Why do you decrement it if you will reset it to 40 on
> >the next round thru the loop (supposing we can't lock & grab even 1 message
> >for this batch)?
>
> The idea is that the UnsortedBatchesLeft will be kept at 40 the whole time
> there are too many messages in the queue. However, we don't want to just
> get the queue smaller than CriticalQueueSize, we want to get it very small
> or zero if possible. So once it drops less than CriticalQueueSize, we
> continue doing unsorted batches for another 40 batches in an attempt to
> clear the queue completely. Otherwise the queue length will just hover
> around CriticalQueueSize and we won't actually achieve anything very useful.
Now I get it...
>
> The value of 40 is a number I picked. It really isn't very critical what it
> is, I thought this was a good value.
That's fine for me.
>
> From what I have with large queues, doing the first loop doesn't seem to
> take very long, not compared to the second section using the sorted message
> list. But I agree, not stat-ing the files at all if we are in "accelerated"
> mode would be a very good idea and should be pretty simple to implement (it
> just depends on UnsortedBatchesLeft>0).
>
> Take a look at the attached and let me know what you think.
>
I think it won't work in the round that we (will) switch from "normal" to
"accelerated mode" unless we _always_ fill up the @SortedFiles array in the
$queuedir->read() loop...
'cause in your last version, if we aren't (yet) in accelerated mode, we're
not pre-filling it, but if _this_ $MsgsInQueue is the first to exceed
$CriticalQueueSize, by the time when we enter the "while(($file = shift
@SortedFiles)" loop, @SortedFiles is empty...
I did a small fix (see attachment) that I'll try to test tomorrow...
Regards.
--
Mariano Absatz
El Baby
----------------------------------------------------------
Don't worry. I forgot your name, too!
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ZMailer.pm
Type: application/octet-stream
Size: 27015 bytes
Desc: not available
Url : http://lists.mailscanner.info/pipermail/mailscanner/attachments/20030922/d8881847/ZMailer.obj
More information about the MailScanner
mailing list