You are viewing a plain text version of this content. The canonical link for it is here.
Posted to server-dev@james.apache.org by Andrei Ivanov <my...@surfeu.fi> on 2002/06/02 10:36:05 UTC

James SMTPServer load test - from 6req/s and crash -> 26req/s no crash

Hi,
Please refer to my previous post about James SMTPServer load test for more
details on this issue.
In short:
1. James SMTPServer part was tested for number of incoming 4KB mails it can
accept
2. All other parts of James were not in use by commenting out
mailServer.sendMail(mail); @line 615 in SMTPHandler.
3. James SMTPServer crashed after certain number of requests with
OutOfMemory exception

Studying the results of my previous tests showed most likely the problem is
in how SMTPHandler unallocates resources when connection has to be released.
In fact it didn't do any resources release. So I put my efforts in
refactoring
SMTPServer
SMTPHandler (only few changes)
BaseConnectionHandler

I replaced BaseConnectioHandler with AbstractServer which implements
ConnectionHandlerFactory.
Every other server class can now inherit from new AbstractServer  by
implementing its "public abstract createConnectionHandler()".
Main achievement is that this way it is possible to unallocate explicitly
resources used by any connection handler.
So I made SMTPHandler to be disposable and simply "multiplied by null" all
its resources in its dispose.

The result is in subject of this letter.
Opinions, ideas?

Andrei

PS still using java 1.3.1_02 :-)


----- Original Message -----
From: "Danny Angus" <da...@apache.org>
To: "James Developers List" <ja...@jakarta.apache.org>
Sent: Saturday, June 01, 2002 10:15 PM
Subject: RE: James SMTPServer load test - more result


> *definitely* upgrade to 1.4 and use the -server option (edit run.bat ||
> run.sh) then.
>
> > -----Original Message-----
> > From: Andrei Ivanov [mailto:myfam@surfeu.fi]
> > Sent: 01 June 2002 17:31
> > To: James Developers List
> > Subject: Re: James SMTPServer load test - more result
> >
> >
> > >(what JVM are you using, I'm assuming Suns 1.4)
> >
> >
> > D:\>java -version
> > java version "1.3.1_02"
> > Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.1_02-b02)
> > Java HotSpot(TM) Client VM (build 1.3.1_02-b02, mixed mode)
> >
> > D:\>
> >
> > Andrei
> >
> >
> >
> > --
> > To unsubscribe, e-mail:
> > <ma...@jakarta.apache.org>
> > For additional commands, e-mail:
> > <ma...@jakarta.apache.org>
> >
>
>
> --
> To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
> For additional commands, e-mail:
<ma...@jakarta.apache.org>
>



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


diff files Re: James SMTPServer load test - from 6req/s and crash -> 26req/s no crash

Posted by Andrei Ivanov <my...@surfeu.fi>.
Hi, Serge here are the diff files for the James classes which I had to
change to fix SMTPhandler. Zip with classes itself will come in next letter.

Andrei

PS SMTPServer has been changed completely so SMTPServer.diff just shows what
whole body is just replaced with the new one.


----- Original Message -----
From: "Serge Knystautas" <se...@lokitech.com>
To: "James Developers List" <ja...@jakarta.apache.org>
Sent: Monday, June 03, 2002 8:45 AM
Subject: Re: James SMTPServer load test - from 6req/s and crash -> 26req/s
no crash


> Andrei,
>
> Please send any/all patches to the listserv.  One of us will try to
> review and commit them assuming we don't see any problems.  Your
> improvements sound very encouraging.
> --
> Serge Knystautas
> Loki Technologies - Unstoppable Websites
> http://www.lokitech.com/
>
> Andrei Ivanov wrote:
> > Hi,
> > Please refer to my previous post about James SMTPServer load test for
more
> > details on this issue.
> > In short:
> > 1. James SMTPServer part was tested for number of incoming 4KB mails it
can
> > accept
> > 2. All other parts of James were not in use by commenting out
> > mailServer.sendMail(mail); @line 615 in SMTPHandler.
> > 3. James SMTPServer crashed after certain number of requests with
> > OutOfMemory exception
> >
> > Studying the results of my previous tests showed most likely the problem
is
> > in how SMTPHandler unallocates resources when connection has to be
released.
> > In fact it didn't do any resources release. So I put my efforts in
> > refactoring
> > SMTPServer
> > SMTPHandler (only few changes)
> > BaseConnectionHandler
> >
> > I replaced BaseConnectioHandler with AbstractServer which implements
> > ConnectionHandlerFactory.
> > Every other server class can now inherit from new AbstractServer  by
> > implementing its "public abstract createConnectionHandler()".
> > Main achievement is that this way it is possible to unallocate
explicitly
> > resources used by any connection handler.
> > So I made SMTPHandler to be disposable and simply "multiplied by null"
all
> > its resources in its dispose.
> >
> > The result is in subject of this letter.
> > Opinions, ideas?
> >
> > Andrei
> >
> > PS still using java 1.3.1_02 :-)
>
>
> --
> To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
> For additional commands, e-mail:
<ma...@jakarta.apache.org>
>

sources Re: James SMTPServer load test - from 6req/s and crash -> 26req/s no crash

Posted by Andrei Ivanov <my...@surfeu.fi>.
Hi, Serge
here are the sources of modified / new James classes. To test it just unzip
and copy over existing src (***DO not do it for you configured (development)
James since it will overwrite james-config.xml!!!). When build and run.

All other James's servers can be changed same way (so they will inherit from
core.AbstractServer). No need to use AbstractService any more...

Andrei
PS in fact it will (almost :-) you will see the difference immideately) work
just fine with original james-config.xml. I've included this file just to
illustrate new options for configuring smtpserver.

----- Original Message -----
From: "Serge Knystautas" <se...@lokitech.com>
To: "James Developers List" <ja...@jakarta.apache.org>
Sent: Monday, June 03, 2002 8:45 AM
Subject: Re: James SMTPServer load test - from 6req/s and crash -> 26req/s
no crash


> Andrei,
>
> Please send any/all patches to the listserv.  One of us will try to
> review and commit them assuming we don't see any problems.  Your
> improvements sound very encouraging.
> --
> Serge Knystautas
> Loki Technologies - Unstoppable Websites
> http://www.lokitech.com/
>
> Andrei Ivanov wrote:
> > Hi,
> > Please refer to my previous post about James SMTPServer load test for
more
> > details on this issue.
> > In short:
> > 1. James SMTPServer part was tested for number of incoming 4KB mails it
can
> > accept
> > 2. All other parts of James were not in use by commenting out
> > mailServer.sendMail(mail); @line 615 in SMTPHandler.
> > 3. James SMTPServer crashed after certain number of requests with
> > OutOfMemory exception
> >
> > Studying the results of my previous tests showed most likely the problem
is
> > in how SMTPHandler unallocates resources when connection has to be
released.
> > In fact it didn't do any resources release. So I put my efforts in
> > refactoring
> > SMTPServer
> > SMTPHandler (only few changes)
> > BaseConnectionHandler
> >
> > I replaced BaseConnectioHandler with AbstractServer which implements
> > ConnectionHandlerFactory.
> > Every other server class can now inherit from new AbstractServer  by
> > implementing its "public abstract createConnectionHandler()".
> > Main achievement is that this way it is possible to unallocate
explicitly
> > resources used by any connection handler.
> > So I made SMTPHandler to be disposable and simply "multiplied by null"
all
> > its resources in its dispose.
> >
> > The result is in subject of this letter.
> > Opinions, ideas?
> >
> > Andrei
> >
> > PS still using java 1.3.1_02 :-)
>
>
> --
> To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
> For additional commands, e-mail:
<ma...@jakarta.apache.org>
>

Re: James SMTPServer load test - from 6req/s and crash -> 26req/s no crash

Posted by Serge Knystautas <se...@lokitech.com>.
Andrei,

Please send any/all patches to the listserv.  One of us will try to 
review and commit them assuming we don't see any problems.  Your 
improvements sound very encouraging.
-- 
Serge Knystautas
Loki Technologies - Unstoppable Websites
http://www.lokitech.com/

Andrei Ivanov wrote:
> Hi,
> Please refer to my previous post about James SMTPServer load test for more
> details on this issue.
> In short:
> 1. James SMTPServer part was tested for number of incoming 4KB mails it can
> accept
> 2. All other parts of James were not in use by commenting out
> mailServer.sendMail(mail); @line 615 in SMTPHandler.
> 3. James SMTPServer crashed after certain number of requests with
> OutOfMemory exception
> 
> Studying the results of my previous tests showed most likely the problem is
> in how SMTPHandler unallocates resources when connection has to be released.
> In fact it didn't do any resources release. So I put my efforts in
> refactoring
> SMTPServer
> SMTPHandler (only few changes)
> BaseConnectionHandler
> 
> I replaced BaseConnectioHandler with AbstractServer which implements
> ConnectionHandlerFactory.
> Every other server class can now inherit from new AbstractServer  by
> implementing its "public abstract createConnectionHandler()".
> Main achievement is that this way it is possible to unallocate explicitly
> resources used by any connection handler.
> So I made SMTPHandler to be disposable and simply "multiplied by null" all
> its resources in its dispose.
> 
> The result is in subject of this letter.
> Opinions, ideas?
> 
> Andrei
> 
> PS still using java 1.3.1_02 :-)


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


RE: James SMTPServer load test - from 6req/s and crash -> 26req/s no crash

Posted by "Noel J. Bergman" <no...@devtech.com>.
> Noel, what do you mean?
> > Has this been added to the CVS tree, yet?

The .bat and .sh files distributed with James could add the -server option
to JVM_OPTS.  Danny's point that the option is vendor specific is right, but
I'd consider adding a comment in the file to instruct users.

	--- Noel


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: James SMTPServer load test - from 6req/s and crash -> 26req/s no crash

Posted by Andrei Ivanov <my...@surfeu.fi>.
Noel, what do you mean?

> Has this been added to the CVS tree, yet?

Andrei

----- Original Message -----
From: "Noel J. Bergman" <no...@devtech.com>
To: "James Developers List" <ja...@jakarta.apache.org>
Sent: Monday, June 03, 2002 12:09 AM
Subject: RE: James SMTPServer load test - from 6req/s and crash -> 26req/s
no crash


> > *definitely* upgrade to 1.4 and use the -server option (edit run.bat ||
> > run.sh) then.
>
> Has this been added to the CVS tree, yet?
>
> And for JRE v1.3, $JAVA_HOME/jre/lib/jvm.cfg should be changed to
something
> like:
>
>   #
>   # @(#)jvm.cfg   1.10 00/08/01
>   #
>   # Copyright 1999 by Sun Microsystems, Inc.,
>   # 901 San Antonio Road, Palo Alto, California, 94303, U.S.A.
>   # All rights reserved.
>   #
>   # List of JVMs that can be used as the first option to java, javac, etc.
>   # Order is important -- first in this list is the default JVM.
>   #
>   -server
>   -client
>   -hotspot
>   -classic
>
> to select the server hotspot JVM.
>
> --- Noel
>
>
> --
> To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
> For additional commands, e-mail:
<ma...@jakarta.apache.org>
>



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


RE: James SMTPServer load test - from 6req/s and crash -> 26req/s no crash

Posted by Danny Angus <da...@apache.org>.
> Has this been added to the CVS tree, yet?

No, and it probably won't as it is (AFAIK) specific to sun's JVM.
d.

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


RE: James SMTPServer load test - from 6req/s and crash -> 26req/s no crash

Posted by "Noel J. Bergman" <no...@devtech.com>.
> *definitely* upgrade to 1.4 and use the -server option (edit run.bat ||
> run.sh) then.

Has this been added to the CVS tree, yet?

And for JRE v1.3, $JAVA_HOME/jre/lib/jvm.cfg should be changed to something
like:

  #
  # @(#)jvm.cfg   1.10 00/08/01
  #
  # Copyright 1999 by Sun Microsystems, Inc.,
  # 901 San Antonio Road, Palo Alto, California, 94303, U.S.A.
  # All rights reserved.
  #
  # List of JVMs that can be used as the first option to java, javac, etc.
  # Order is important -- first in this list is the default JVM.
  #
  -server
  -client
  -hotspot
  -classic

to select the server hotspot JVM.

	--- Noel


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>