You are viewing a plain text version of this content. The canonical link for it is here.
Posted to server-user@james.apache.org by Hontvari Jozsef <ho...@solware.com> on 2003/04/12 08:55:00 UTC

extreme processor usage

During 12 hours since I am using James in a production environment its
processor usage is 7 hours. The mail server I used before James would have
used at most a few minutes in similar circumstances.

I noticed that the processor usage is usually 0, then it goes up to 100% for
a very long time (currently I am waiting for about 10 minutes).

So I guess there is an (almost) endless loop.
Any idea what is this or how can I find the reason of it?




---------------------------------------------------------------------
To unsubscribe, e-mail: james-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: james-user-help@jakarta.apache.org


Deploying Mailet/Matcher in James

Posted by ak...@eurosoftindia.com.
hi

i want to know how to deploy Mailet/Matcher in James.

bye
akshay

> Hontvari Jozsef wrote:
>
>>After setting the log to debug levefl, I still don't see any indication
>> of continuous activity in the log files, but the processor usage is on
>> 100% again (after a restart and a few minutes). There are about 1 email
>> / 10 seconds which should be forwarded by James.
>>
>>
>>
> Hi Jozsef,
>
> If you are running  James in SDK 1.3 or later, why not turn CPU
> profiling on to see where it is spending it's time? This is documented
> in the Javadoc tools section on the java command. The available options
> are,
>
> $ java -Xrunhprof:help
> Hprof usage: -Xrunhprof[:help]|[<option>=<value>, ...]
>
> Option Name and Value  Description                Default
> ---------------------  ----------------------     -------
> heap=dump|sites|all    heap profiling             all
> cpu=samples|times|old  CPU usage                  off
> monitor=y|n            monitor contention         n
> format=a|b             ascii or binary output     a
> file=<file>            write data to file         java.hprof(.txt for
> ascii) net=<host>:<port>      send data over a socket    write to file
> depth=<size>           stack trace depth          4
> cutoff=<value>         output cutoff point        0.0001
> lineno=y|n             line number in traces?     y
> thread=y|n             thread in traces?          n
> doe=y|n                dump on exit?              y
>
> Example: java -Xrunhprof:cpu=samples,file=log.txt,depth=3 FooClass
>
> Sid
>
>
> --------------------------------------------------------------------- To
> unsubscribe, e-mail: james-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: james-user-help@jakarta.apache.org




---------------------------------------------------------------------
To unsubscribe, e-mail: james-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: james-user-help@jakarta.apache.org


Re: extreme processor usage

Posted by Sid Stuart <si...@weaselworks.com>.
Hontvari Jozsef wrote:

>After setting the log to debug levefl, I still don't see any indication of
>continuous activity in the log files, but the processor usage is on 100%
>again (after a restart and a few minutes). There are about 1 email / 10
>seconds which should be forwarded by James.
>
>  
>
Hi Jozsef,

If you are running  James in SDK 1.3 or later, why not turn CPU 
profiling on to see where it is spending it's time? This is documented 
in the Javadoc tools section on the java command. The available options are,

$ java -Xrunhprof:help
Hprof usage: -Xrunhprof[:help]|[<option>=<value>, ...]

Option Name and Value  Description                Default
---------------------  ----------------------     -------
heap=dump|sites|all    heap profiling             all
cpu=samples|times|old  CPU usage                  off
monitor=y|n            monitor contention         n
format=a|b             ascii or binary output     a
file=<file>            write data to file         java.hprof(.txt for ascii)
net=<host>:<port>      send data over a socket    write to file
depth=<size>           stack trace depth          4
cutoff=<value>         output cutoff point        0.0001
lineno=y|n             line number in traces?     y
thread=y|n             thread in traces?          n
doe=y|n                dump on exit?              y

Example: java -Xrunhprof:cpu=samples,file=log.txt,depth=3 FooClass

Sid


---------------------------------------------------------------------
To unsubscribe, e-mail: james-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: james-user-help@jakarta.apache.org


Implicit Changes in debug level......

Posted by ak...@eurosoftindia.com.
i have set the debug level to debug but sometimes in the log it shows the
debug level to be info instead of debug.......why this is occuring

>> the debug levels in some log files changes on there own
>> sometimes it shows debug level to be DEBUG and sometimes
>> it is INFO while the specified debug level has been DEBUG.
>
> Different messages are assigned different log levels in the code.  If
> you have the log level set to DEBUG, then DEBUG, INFO, ERROR and other
> levels will all appear.  If you have the log level set to INFO, then
> DEBUG messages will not appear.
>
> 	--- Noel
>
>
> --------------------------------------------------------------------- To
> unsubscribe, e-mail: james-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: james-user-help@jakarta.apache.org




---------------------------------------------------------------------
To unsubscribe, e-mail: james-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: james-user-help@jakarta.apache.org


RE: Implicit Changes in debug level......

Posted by "Noel J. Bergman" <no...@devtech.com>.
> the debug levels in some log files changes on there own
> sometimes it shows debug level to be DEBUG and sometimes
> it is INFO while the specified debug level has been DEBUG.

Different messages are assigned different log levels in the code.  If you
have the log level set to DEBUG, then DEBUG, INFO, ERROR and other levels
will all appear.  If you have the log level set to INFO, then DEBUG messages
will not appear.

	--- Noel


---------------------------------------------------------------------
To unsubscribe, e-mail: james-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: james-user-help@jakarta.apache.org


Implicit Changes in debug level......

Posted by ak...@eurosoftindia.com.
hi

i am finding some problems in James.......

the debug levels in some log files changes on there own sometimes it shows
debug level to be DEBUG and sometimes it is INFO while the specified debug
level has been DEBUG......

bye
akshay



---------------------------------------------------------------------
To unsubscribe, e-mail: james-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: james-user-help@jakarta.apache.org


Re: extreme processor usage

Posted by Hontvari Jozsef <ho...@solware.com>.
It turned out that with hprof switched on the processor usage is not 100%
but only 60%. Interesting.

Here you can download the result of hprof, but it doesn't help too much:
http://www.flyordie.com/pub/hprof.zip

The favourite places of James are:
CPU SAMPLES BEGIN (total = 2309) Mon Apr 14 12:54:59 2003
rank   self  accum   count trace method
   1 59.98% 59.98%   14212   340 java.net.PlainSocketImpl.socketAccept
   2  4.46% 64.44%    1256   445 java.net.SocketInputStream.socketRead0
   3  2.25% 66.70%     310   511 java.io.FileInputStream.read
   4  1.91% 68.60%     314   516 java.io.FileInputStream.readBytes
   5  1.82% 70.42%      42  1021 java.net.Inet4AddressImpl.lookupAllHostAddr
   6  1.78% 72.20%     351   376 java.io.FileInputStream.readBytes
   7  1.39% 73.58%     259   508 java.lang.Object.wait
   8  0.95% 74.53%     136   480 java.io.FileInputStream.readBytes
   9  0.95% 75.49%     174   514 java.io.FileInputStream.read
  10  0.95% 76.44%     202   522 java.io.FileInputStream.read

The first traces:
TRACE 340:
 java.net.PlainSocketImpl.socketAccept(PlainSocketImpl.java:Native method)
 java.net.PlainSocketImpl.accept(PlainSocketImpl.java:353)
 java.net.ServerSocket.implAccept(ServerSocket.java:439)
 java.net.ServerSocket.accept(ServerSocket.java:410)

org.apache.james.util.connection.ServerConnection.run(ServerConnection.java:
267)

org.apache.avalon.excalibur.thread.impl.ExecutableRunnable.execute(Executabl
eRunnable.java:47)

org.apache.avalon.excalibur.thread.impl.WorkerThread.run(WorkerThread.java:8
0)

TRACE 445:
 java.net.SocketInputStream.socketRead0(SocketInputStream.java:Native
method)
 java.net.SocketInputStream.read(SocketInputStream.java:129)
 java.io.BufferedInputStream.read1(BufferedInputStream.java:220)
 java.io.BufferedInputStream.read(BufferedInputStream.java:277)
 sun.nio.cs.StreamDecoder$CharsetSD.readBytes(StreamDecoder.java:406)
 sun.nio.cs.StreamDecoder$CharsetSD.implRead(StreamDecoder.java:446)
 sun.nio.cs.StreamDecoder.read(StreamDecoder.java:180)
 java.io.InputStreamReader.read(InputStreamReader.java:167)
 java.io.BufferedReader.fill(BufferedReader.java:136)
 java.io.BufferedReader.readLine(BufferedReader.java:299)

TRACE 511:
 java.io.FileInputStream.read(FileInputStream.java:Native method)
 java.io.ObjectInputStream$PeekInputStream.read(ObjectInputStream.java:2142)

java.io.ObjectInputStream$BlockDataInputStream.read(ObjectInputStream.java:2
459)

java.io.ObjectInputStream$BlockDataInputStream.readByte(ObjectInputStream.ja
va:2604)
 java.io.ObjectInputStream.readByte(ObjectInputStream.java:845)
 java.io.ObjectStreamClass.readNonProxy(ObjectStreamClass.java:534)
 java.io.ObjectInputStream.readClassDescriptor(ObjectInputStream.java:762)
 java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1503)
 java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1435)
 java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1626)



----- Original Message -----
From: "Hontvari Jozsef" <ho...@solware.com>
To: "James Users List" <ja...@jakarta.apache.org>
Sent: Monday, April 14, 2003 8:24 AM
Subject: Re: extreme processor usage


> Configuration:
> Sun Java Client VM build 1.4.1_01-b01, mixed mode), Windows 2000 Server
>
> I am using the file spool and the file based mail stores (in their default
> configuration). I have no mailboxes, every address is forwarded by using
> matchers and mailets (about 50).
>
> I started running James from a dos prompt, with runhprof
> (cpu=samples,depth=15). Interestingly the processor usage is about 60%
> continuously. I guess this is the result of running with hprof, and not
the
> symptom I am looking after (that was a stable 100%).
>
>
>
>
>
>
> ----- Original Message -----
> From: "Noel J. Bergman" <no...@devtech.com>
> To: "James Users List" <ja...@jakarta.apache.org>
> Sent: Monday, April 14, 2003 7:03 AM
> Subject: RE: extreme processor usage
>
>
> > What repository types, operating system, VM?  I have not seen anything
> like
> > what you are describing.  One thing that I have, on rare occasion,
noticed
> > is that mysql benefited from being restarted.
> >
> > --- Noel
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: james-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: james-user-help@jakarta.apache.org
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: james-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: james-user-help@jakarta.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: james-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: james-user-help@jakarta.apache.org


Re: extreme processor usage

Posted by Hontvari Jozsef <ho...@solware.com>.
> I found that under load the db spool behaved much better than the file
> spool.  But you don't sound like are running any real load.

yes, for example at this moment the spool is empty, outgoing contains 4
emails.

> Did you setup processors to optimize the message flow, or do you have a
> large linear processor?

the transport processor is relatively large, it contains 60 RecipientIs
matchers.

----- Original Message -----
From: "Noel J. Bergman" <no...@devtech.com>
To: "James Users List" <ja...@jakarta.apache.org>
Sent: Monday, April 14, 2003 8:54 AM
Subject: RE: extreme processor usage


> > I am using the file spool and the file based mail stores (in their
default
> > configuration).
>
> I found that under load the db spool behaved much better than the file
> spool.  But you don't sound like are running any real load.
>
> > I have no mailboxes, every address is forwarded by using
> > matchers and mailets (about 50).
>
> Did you setup processors to optimize the message flow, or do you have a
> large linear processor?
>
> --- Noel
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: james-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: james-user-help@jakarta.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: james-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: james-user-help@jakarta.apache.org


RE: extreme processor usage

Posted by "Noel J. Bergman" <no...@devtech.com>.
> I am using the file spool and the file based mail stores (in their default
> configuration).

I found that under load the db spool behaved much better than the file
spool.  But you don't sound like are running any real load.

> I have no mailboxes, every address is forwarded by using
> matchers and mailets (about 50).

Did you setup processors to optimize the message flow, or do you have a
large linear processor?

	--- Noel


---------------------------------------------------------------------
To unsubscribe, e-mail: james-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: james-user-help@jakarta.apache.org


Re: extreme processor usage

Posted by Hontvari Jozsef <ho...@solware.com>.
Configuration:
Sun Java Client VM build 1.4.1_01-b01, mixed mode), Windows 2000 Server

I am using the file spool and the file based mail stores (in their default
configuration). I have no mailboxes, every address is forwarded by using
matchers and mailets (about 50).

I started running James from a dos prompt, with runhprof
(cpu=samples,depth=15). Interestingly the processor usage is about 60%
continuously. I guess this is the result of running with hprof, and not the
symptom I am looking after (that was a stable 100%).






----- Original Message -----
From: "Noel J. Bergman" <no...@devtech.com>
To: "James Users List" <ja...@jakarta.apache.org>
Sent: Monday, April 14, 2003 7:03 AM
Subject: RE: extreme processor usage


> What repository types, operating system, VM?  I have not seen anything
like
> what you are describing.  One thing that I have, on rare occasion, noticed
> is that mysql benefited from being restarted.
>
> --- Noel
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: james-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: james-user-help@jakarta.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: james-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: james-user-help@jakarta.apache.org


RE: extreme processor usage

Posted by "Noel J. Bergman" <no...@devtech.com>.
What repository types, operating system, VM?  I have not seen anything like
what you are describing.  One thing that I have, on rare occasion, noticed
is that mysql benefited from being restarted.

	--- Noel


---------------------------------------------------------------------
To unsubscribe, e-mail: james-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: james-user-help@jakarta.apache.org


Re: extreme processor usage

Posted by Hontvari Jozsef <ho...@solware.com>.
After setting the log to debug levefl, I still don't see any indication of
continuous activity in the log files, but the processor usage is on 100%
again (after a restart and a few minutes). There are about 1 email / 10
seconds which should be forwarded by James.


> ----- Original Message -----
> From: "Hontvari Jozsef" <ho...@solware.com>
> To: <ja...@jakarta.apache.org>
> Sent: Saturday, April 12, 2003 8:55 AM
> Subject: extreme processor usage
>
>
> > During 12 hours since I am using James in a production environment its
> > processor usage is 7 hours. The mail server I used before James would
have
> > used at most a few minutes in similar circumstances.
> >
> > I noticed that the processor usage is usually 0, then it goes up to 100%
> for
> > a very long time (currently I am waiting for about 10 minutes).
> >
> > So I guess there is an (almost) endless loop.
> > Any idea what is this or how can I find the reason of it?
> >
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: james-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: james-user-help@jakarta.apache.org
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: james-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: james-user-help@jakarta.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: james-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: james-user-help@jakarta.apache.org


Re: extreme processor usage

Posted by Hontvari Jozsef <ho...@solware.com>.
I add that the log files don't show that for example there is a mail
bouncing back and forward. (The logs are on the default level, James 2.1.2.)

----- Original Message -----
From: "Hontvari Jozsef" <ho...@solware.com>
To: <ja...@jakarta.apache.org>
Sent: Saturday, April 12, 2003 8:55 AM
Subject: extreme processor usage


> During 12 hours since I am using James in a production environment its
> processor usage is 7 hours. The mail server I used before James would have
> used at most a few minutes in similar circumstances.
>
> I noticed that the processor usage is usually 0, then it goes up to 100%
for
> a very long time (currently I am waiting for about 10 minutes).
>
> So I guess there is an (almost) endless loop.
> Any idea what is this or how can I find the reason of it?
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: james-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: james-user-help@jakarta.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: james-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: james-user-help@jakarta.apache.org