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 Joshua Armstrong <ja...@centonline.com> on 2012/10/08 16:04:54 UTC

James slowness

We're running load tests with James acting as a voicemail server on IBM 
SolidDB 7.0.3 and noticing that it sometimes takes up to one second to 
retrieve an e-mail from a mailbox.  Here are the conditions:

Mailboxes have > 50 messages.
Each message has an attachment of ~3 MB.
Messages are accessed randomly.
New messages are constantly being added.

I was going to try using a Java VM profiler to pinpoint the slow spots 
but does anyone else have any advice?  The reason is that we need to be 
able to fetch around 80 three-megabyte messages in under a minute, which 
ought to be reasonable.  Thanks!

-- 
Joshua M. Armstrong
Software Engineer
Centurion, Inc.


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


Re: James slowness

Posted by Joshua Armstrong <ja...@centonline.com>.
On 10/8/2012 10:17 AM, Ioan Eugen Stan wrote:
> Apache James trunk has jetm monitoring implemented as a profile. I
> think you can use it to find out more about what is happening.
>
> You can checkout  trunk app project from [1] and build it with $mvn
> clean install -Pwith-jetm . Jetm is not that grat as it computes just
> averages (90% lines are more usefull) but it should get you insight
> into how much time each method call is taking.
>
> You could also add jetm by hand to beta4. It's not that hard. I've
> wrote an article about it [2]
>
> [1] http://svn.apache.org/repos/asf/james/app/
> [2] http://ieugen.blogspot.ro/2012/05/jetm-performance-monitoring-for-apache.html
> [3] http://jetm.void.fm/
>
> Hope this helps,
>
<3 JETM!  Thanks for that pointer.  The results are very helpful:


-- 
Joshua M. Armstrong
Software Engineer
Centurion, Inc.


Re: James slowness

Posted by Ioan Eugen Stan <st...@gmail.com>.
Apache James trunk has jetm monitoring implemented as a profile. I
think you can use it to find out more about what is happening.

You can checkout  trunk app project from [1] and build it with $mvn
clean install -Pwith-jetm . Jetm is not that grat as it computes just
averages (90% lines are more usefull) but it should get you insight
into how much time each method call is taking.

You could also add jetm by hand to beta4. It's not that hard. I've
wrote an article about it [2]

[1] http://svn.apache.org/repos/asf/james/app/
[2] http://ieugen.blogspot.ro/2012/05/jetm-performance-monitoring-for-apache.html
[3] http://jetm.void.fm/

Hope this helps,

On Mon, Oct 8, 2012 at 5:49 PM, Joshua Armstrong
<ja...@centonline.com> wrote:
> On 10/8/2012 9:37 AM, Ioan Eugen Stan wrote:
>>
>> Hello Joshua,
>>
>> I don't know what might cause the slowness but could you tell us which
>> version of James are you using and detail your setup a bit more? This
>> could help.
>>
>> Cheers,
>> <snip>
>
> Also, running on J2SE v. 1.6 from Oracle on Windows Server 2003 32 bit, on a
> VMWare slice. on top of an 8-core server with 16GB of RAM.  Not sure what
> each VM slice is allocated.
>
>>
>
>
> --
> Joshua M. Armstrong
> Software Engineer
> Centurion, Inc.
>



-- 
Ioan Eugen Stan / CTO / http://axemblr.com

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


Re: James slowness

Posted by Joshua Armstrong <ja...@centonline.com>.
On 10/8/2012 9:37 AM, Ioan Eugen Stan wrote:
> Hello Joshua,
>
> I don't know what might cause the slowness but could you tell us which
> version of James are you using and detail your setup a bit more? This
> could help.
>
> Cheers,
> <snip>
Also, running on J2SE v. 1.6 from Oracle on Windows Server 2003 32 bit, 
on a VMWare slice. on top of an 8-core server with 16GB of RAM.  Not 
sure what each VM slice is allocated.
>


-- 
Joshua M. Armstrong
Software Engineer
Centurion, Inc.


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


Re: James slowness

Posted by Ioan Eugen Stan <st...@gmail.com>.
Hello Joshua,

I don't know what might cause the slowness but could you tell us which
version of James are you using and detail your setup a bit more? This
could help.

Cheers,

On Mon, Oct 8, 2012 at 5:04 PM, Joshua Armstrong
<ja...@centonline.com> wrote:
> We're running load tests with James acting as a voicemail server on IBM
> SolidDB 7.0.3 and noticing that it sometimes takes up to one second to
> retrieve an e-mail from a mailbox.  Here are the conditions:
>
> Mailboxes have > 50 messages.
> Each message has an attachment of ~3 MB.
> Messages are accessed randomly.
> New messages are constantly being added.
>
> I was going to try using a Java VM profiler to pinpoint the slow spots but
> does anyone else have any advice?  The reason is that we need to be able to
> fetch around 80 three-megabyte messages in under a minute, which ought to be
> reasonable.  Thanks!
>
> --
> Joshua M. Armstrong
> Software Engineer
> Centurion, Inc.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
> For additional commands, e-mail: server-user-help@james.apache.org
>



-- 
Ioan Eugen Stan / CTO / http://axemblr.com

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


Re: James slowness

Posted by Joshua Armstrong <ja...@centonline.com>.
On 10/8/2012 9:38 AM, Martin Hewitt wrote:
> Hi Joshua,
>
> One more bit of info - what are you using on the client-side to
> retrieve the messages? Any details of that configuration (envelope,
> fetch parameters etc) could be useful.
>
> Martin
>
> On 8 October 2012 15:04, Joshua Armstrong <ja...@centonline.com> wrote:
>> We're running load tests with James acting as a voicemail server on IBM
>> SolidDB 7.0.3 and noticing that it sometimes takes up to one second to
>> retrieve an e-mail from a mailbox.  Here are the conditions:
>>
>> Mailboxes have > 50 messages.
>> Each message has an attachment of ~3 MB.
>> Messages are accessed randomly.
>> New messages are constantly being added.
>>
>> I was going to try using a Java VM profiler to pinpoint the slow spots but
>> does anyone else have any advice?  The reason is that we need to be able to
>> fetch around 80 three-megabyte messages in under a minute, which ought to be
>> reasonable.  Thanks!
>>
>> --
>> Joshua M. Armstrong
>> Software Engineer
>> Centurion, Inc.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
>> For additional commands, e-mail: server-user-help@james.apache.org
>>
It opens a mailbox, fetches list of message UIDs, then fetches 
properties for each message.  If any are listed as new, it fetches 
headers on them.  When one is selected for open, it fetches the body 
also.  In this case, we want to fetch body for all 50 messages in a 
mailbox.  I'd love to find more fine-grained detail but I'm not really 
sure how since I can't do a tcpdump on the loopback address in Windows.

-- 
Joshua M. Armstrong
Software Engineer
Centurion, Inc.


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


Re: James slowness

Posted by Eric Charles <er...@u-mangate.com>.
+1

On 10/10/2012 18:38, Ioan Eugen Stan wrote:
> That's great Joshua,
>
> I believe James to be a great project but not enough active devs (me included).
> Good luck and please share also your success stories.
>
> Cheers,
>
> On Wed, Oct 10, 2012 at 3:31 PM, Joshua Armstrong
> <ja...@centonline.com> wrote:
>> On 10/10/2012 4:45 AM, Ioan Eugen Stan wrote:
>>>
>>> Hello Joshua,
>>>
>>>    James Mailbox is implemented with JPA and has a small OpenJpa
>>> wrapper.
>>> http://svn.apache.org/repos/asf/james/mailbox/trunk/jpa/src/main/java/org/apache/james/mailbox/jpa/openjpa/
>>>
>>> I think you may implement a wrapper that uses hibernate or another JPA
>>> provider with better wupportfor your DBA.
>>>
>>> Please consider contributing it back to James if you chose to do so.
>>>
>>> Good luck,
>>>
>>> <snip>
>>
>> I would like to contribute back to James and, in fact, the ability to
>> continue participating in the open source community was one of the sticking
>> points of my employment contract.  If/when we finish this project
>> (November?) and do our final review, I will submit a request to the VP to
>> allow us to open source some parts of it, the James changes/additions
>> included (we have indeed made some changes to suit our unique situation to
>> use James as a backend for a distributed voicemail system).
>>
>>
>> --
>> Joshua M. Armstrong
>> Software Engineer
>> Centurion, Inc.
>>
>
>
>

-- 
@echarles

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


Re: James slowness

Posted by Ioan Eugen Stan <st...@gmail.com>.
That's great Joshua,

I believe James to be a great project but not enough active devs (me included).
Good luck and please share also your success stories.

Cheers,

On Wed, Oct 10, 2012 at 3:31 PM, Joshua Armstrong
<ja...@centonline.com> wrote:
> On 10/10/2012 4:45 AM, Ioan Eugen Stan wrote:
>>
>> Hello Joshua,
>>
>>   James Mailbox is implemented with JPA and has a small OpenJpa
>> wrapper.
>> http://svn.apache.org/repos/asf/james/mailbox/trunk/jpa/src/main/java/org/apache/james/mailbox/jpa/openjpa/
>>
>> I think you may implement a wrapper that uses hibernate or another JPA
>> provider with better wupportfor your DBA.
>>
>> Please consider contributing it back to James if you chose to do so.
>>
>> Good luck,
>>
>> <snip>
>
> I would like to contribute back to James and, in fact, the ability to
> continue participating in the open source community was one of the sticking
> points of my employment contract.  If/when we finish this project
> (November?) and do our final review, I will submit a request to the VP to
> allow us to open source some parts of it, the James changes/additions
> included (we have indeed made some changes to suit our unique situation to
> use James as a backend for a distributed voicemail system).
>
>
> --
> Joshua M. Armstrong
> Software Engineer
> Centurion, Inc.
>



-- 
Ioan Eugen Stan / CTO / http://axemblr.com

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


Re: James slowness

Posted by Joshua Armstrong <ja...@centonline.com>.
On 10/10/2012 4:45 AM, Ioan Eugen Stan wrote:
> Hello Joshua,
>
>   James Mailbox is implemented with JPA and has a small OpenJpa
> wrapper. http://svn.apache.org/repos/asf/james/mailbox/trunk/jpa/src/main/java/org/apache/james/mailbox/jpa/openjpa/
>
> I think you may implement a wrapper that uses hibernate or another JPA
> provider with better wupportfor your DBA.
>
> Please consider contributing it back to James if you chose to do so.
>
> Good luck,
>
> <snip>
I would like to contribute back to James and, in fact, the ability to 
continue participating in the open source community was one of the 
sticking points of my employment contract.  If/when we finish this 
project (November?) and do our final review, I will submit a request to 
the VP to allow us to open source some parts of it, the James 
changes/additions included (we have indeed made some changes to suit our 
unique situation to use James as a backend for a distributed voicemail 
system).

-- 
Joshua M. Armstrong
Software Engineer
Centurion, Inc.


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


Re: James slowness

Posted by Ioan Eugen Stan <st...@gmail.com>.
Hello Joshua,

 James Mailbox is implemented with JPA and has a small OpenJpa
wrapper. http://svn.apache.org/repos/asf/james/mailbox/trunk/jpa/src/main/java/org/apache/james/mailbox/jpa/openjpa/

I think you may implement a wrapper that uses hibernate or another JPA
provider with better wupportfor your DBA.

Please consider contributing it back to James if you chose to do so.

Good luck,

On Tue, Oct 9, 2012 at 3:52 PM, Joshua Armstrong
<ja...@centonline.com> wrote:
> On 10/9/2012 7:26 AM, Joshua Armstrong wrote:
>>
>> On 10/9/2012 3:26 AM, Eric Charles wrote:
>>>
>>> So you are stressing directly the james-mailbox project, not the
>>> james-server?
>>>
>>> If you persist in a database via JPA, set openjpa.streaming to true in
>>> james-database.properties, it will put less pressure on the memory and gc,
>>> especially for large attachments.
>>>
>>> Thx, Eric
>>
>> <snip>
>>
>> Actually, both but that's a good tip.  I'll flip that flag and see what
>> our nightly build gives us tomorrow.
>>
> Just checked.  openjpa.streaming is not supported on SolidDB because it
> doesn't really support BLOBs directly.  SolidDB is a weird hybrid
> memory/disk database engine so its handling of things is a bit different
> from most RDBMS systems.  :/
>
>
> --
> Joshua M. Armstrong
> Software Engineer
> Centurion, Inc.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
> For additional commands, e-mail: server-user-help@james.apache.org
>



-- 
Ioan Eugen Stan / CTO / http://axemblr.com

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


Re: James slowness

Posted by Joshua Armstrong <ja...@centonline.com>.
On 10/9/2012 7:26 AM, Joshua Armstrong wrote:
> On 10/9/2012 3:26 AM, Eric Charles wrote:
>> So you are stressing directly the james-mailbox project, not the 
>> james-server?
>>
>> If you persist in a database via JPA, set openjpa.streaming to true 
>> in james-database.properties, it will put less pressure on the memory 
>> and gc, especially for large attachments.
>>
>> Thx, Eric
> <snip>
>
> Actually, both but that's a good tip.  I'll flip that flag and see 
> what our nightly build gives us tomorrow.
>
Just checked.  openjpa.streaming is not supported on SolidDB because it 
doesn't really support BLOBs directly.  SolidDB is a weird hybrid 
memory/disk database engine so its handling of things is a bit different 
from most RDBMS systems.  :/

-- 
Joshua M. Armstrong
Software Engineer
Centurion, Inc.


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


Re: James slowness

Posted by Joshua Armstrong <ja...@centonline.com>.
On 10/9/2012 3:26 AM, Eric Charles wrote:
> So you are stressing directly the james-mailbox project, not the 
> james-server?
>
> If you persist in a database via JPA, set openjpa.streaming to true in 
> james-database.properties, it will put less pressure on the memory and 
> gc, especially for large attachments.
>
> Thx, Eric
<snip>

Actually, both but that's a good tip.  I'll flip that flag and see what 
our nightly build gives us tomorrow.

-- 
Joshua M. Armstrong
Software Engineer
Centurion, Inc.


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


Re: James slowness

Posted by Eric Charles <er...@apache.org>.
So you are stressing directly the james-mailbox project, not the 
james-server?

If you persist in a database via JPA, set openjpa.streaming to true in 
james-database.properties, it will put less pressure on the memory and 
gc, especially for large attachments.

Thx, Eric


On 08/10/2012 16:09, Joshua Armstrong wrote:
> On 10/8/2012 9:38 AM, Martin Hewitt wrote:
>> Hi Joshua,
>>
>> One more bit of info - what are you using on the client-side to
>> retrieve the messages? Any details of that configuration (envelope,
>> fetch parameters etc) could be useful.
>>
>> Martin
>>
>>
> <snip>
>
> I can say that all the actual IMAP access comes from this library:
>
> /* ========================================================================
>   * Copyright 1988-2008 University of Washington
>   *
>   * Licensed under the Apache License, Version 2.0 (the "License");
>   * you may not use this file except in compliance with the License.
>   * You may obtain a copy of the License at
>   *
>   *     http://www.apache.org/licenses/LICENSE-2.0
>   *
>   *
>   *
> ========================================================================
>   */
>
> /*
>   * Program:    Mailbox Access routines
>   *
>   * Author:    Mark Crispin
>   *        UW Technology
>   *        University of Washington
>   *        Seattle, WA  98195
>   *        Internet: MRC@Washington.EDU
>   *
>   * Date:    22 November 1989
>   * Last Edited:    16 December 2008
>   */
>
>

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


Re: James slowness

Posted by Joshua Armstrong <ja...@centonline.com>.
On 10/8/2012 9:38 AM, Martin Hewitt wrote:
> Hi Joshua,
>
> One more bit of info - what are you using on the client-side to
> retrieve the messages? Any details of that configuration (envelope,
> fetch parameters etc) could be useful.
>
> Martin
>
>
<snip>

I can say that all the actual IMAP access comes from this library:

/* ========================================================================
  * Copyright 1988-2008 University of Washington
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
  *
  *     http://www.apache.org/licenses/LICENSE-2.0
  *
  *
  * ========================================================================
  */

/*
  * Program:    Mailbox Access routines
  *
  * Author:    Mark Crispin
  *        UW Technology
  *        University of Washington
  *        Seattle, WA  98195
  *        Internet: MRC@Washington.EDU
  *
  * Date:    22 November 1989
  * Last Edited:    16 December 2008
  */


-- 
Joshua M. Armstrong
Software Engineer
Centurion, Inc.


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


Re: James slowness

Posted by Martin Hewitt <ma...@gmail.com>.
Hi Joshua,

One more bit of info - what are you using on the client-side to
retrieve the messages? Any details of that configuration (envelope,
fetch parameters etc) could be useful.

Martin

On 8 October 2012 15:04, Joshua Armstrong <ja...@centonline.com> wrote:
> We're running load tests with James acting as a voicemail server on IBM
> SolidDB 7.0.3 and noticing that it sometimes takes up to one second to
> retrieve an e-mail from a mailbox.  Here are the conditions:
>
> Mailboxes have > 50 messages.
> Each message has an attachment of ~3 MB.
> Messages are accessed randomly.
> New messages are constantly being added.
>
> I was going to try using a Java VM profiler to pinpoint the slow spots but
> does anyone else have any advice?  The reason is that we need to be able to
> fetch around 80 three-megabyte messages in under a minute, which ought to be
> reasonable.  Thanks!
>
> --
> Joshua M. Armstrong
> Software Engineer
> Centurion, Inc.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
> For additional commands, e-mail: server-user-help@james.apache.org
>

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