And on the subject of performance...we also found the James did not scale
well on multi CPU boxes, we tried 2 different Sun 4-CPU boxes, one a 450MHx
and one a 750 MHz.  We tracked the problem down to the fact the the service
method in LinearProcessor is synchronized.

We fixed this and gained a huge performance gain. I don't have exact
measurements handy, but we were driving RemoteDelivery to a mail sink at a
rate approaching 100 messages per second.

I've attached the diff for LinearProcessor.java to this message, please note
that this must be applied on top of Shilpa's changes.

Cheers
Steve


> -----Original Message-----
> From: Jerry Crone [mailto:[EMAIL PROTECTED]] 
> Sent: Tuesday, July 30, 2002 9:26 AM
> To: [EMAIL PROTECTED]
> Subject: Processing messages from spool
> 
> 
> I have been looking at the code that takes messages from the 
> spool and processes them. Assume that I am running a 
> production server with more than 300k messages per day, and 
> that there are 2,000 messages on the spool. It seems that 
> AvalonMailRepository.list() is called for every message that 
> is processed, creating a new HashSet. This would mean:
> 1) a lot of objects are created and GCed soon thereafter
> 2) if the spool always has messages, how could you be 
> optimistic that the last message in the HashSet would be processed?
> 
> What is the problem of using a queue for the keys; e.g., a 
> single instance of Vector? The keys for messages being 
> processed would have been removed from the Vector; however, 
> their corresponding members would still be in the 
> ObjectRepository and StreamRepository until their processing 
> is done. If James is shutdown and restarted, the keys would 
> be included in the new queue.
> 
> I want to emphasize that I am not being critical; I am 
> ignorant of the discussions that occurred while James was 
> being designed. You all have done a lot of excellent work.
> 
> P.S. I incorporated Shilpa's new classes and code mods. It 
> increased throughput by more than 30% (using files for both 
> spool and inboxes).
> 
> Have a good day, Jerry Crone
> 

Attachment: LinearProcessor.diff
Description: Binary data

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to