Startup performance

classic Classic list List threaded Threaded
17 messages Options
Reply | Threaded
Open this post in threaded view
|

Startup performance

Sergei Rahouski

Hi,

 

We have a large Grails application. Startup performance degrades as application grows.

 

At this time it takes over 4 minutes to start the application. Visuall the application sits in “Running Grails application” . Version of Grails is 2.2.

 

It is annoying enough for me to start profiling. What I am seeing is that while “Running Grails application” is happening the application goes through about 400GB worth of java.lang.reflect.Method objects. Garbage collector kicks in every time it hits the top limit and cleans up. That sure doesn’t seem to be very efficient.

 

I would be happy to create a jira if this information is enough. I would also appreciate any suggestions to bring this time down – I can move grails-app from services to src/groovy or back if needed to improve this time, or even try to reduct number of methods per class I don’t know what that is but I am open to try. The project is large with over 2500 of classes, there are over 2000 controller actions.

 

Thank you

 

 

Reply | Threaded
Open this post in threaded view
|

Re: Startup performance

Marc Palmer Local

On 10 Jan 2013, at 19:29, Sergei Rahouski <[hidden email]> wrote:

> Hi,
>
> We have a large Grails application. Startup performance degrades as application grows.
>
> At this time it takes over 4 minutes to start the application. Visuall the application sits in “Running Grails application” . Version of Grails is 2.2.
>
> It is annoying enough for me to start profiling. What I am seeing is that while “Running Grails application” is happening the application goes through about 400GB worth of java.lang.reflect.Method objects. Garbage collector kicks in every time it hits the top limit and cleans up. That sure doesn’t seem to be very efficient.
>
> I would be happy to create a jira if this information is enough. I would also appreciate any suggestions to bring this time down – I can move grails-app from services to src/groovy or back if needed to improve this time, or even try to reduct number of methods per class I don’t know what that is but I am open to try. The project is large with over 2500 of classes, there are over 2000 controller actions.
>

Hi Sergei,

Could you please give us full details. Its impossible to say what is going on with just these screen grabs without even knowing (without guessing) what app the grabs are from, what the columns show etc.

Fundamental basic information required to look at something like this includes:

* Max heap
* Max permgen
* Total Classes loaded by VM
* Which what are those columns - they look memory consumed, from jvisualvm or YourKit, but I'm not sure. I don't recall a memory display UI for methods - for objects yes.
* JVM version

Maybe then we can help you manage your environment better so that your monster app starts quicker :)

Cheers

~ ~ ~
Marc Palmer
Freelancer (Grails/Groovy/Java/UX)

Grails Plugins: http://grailsrocks.com
Blog: http://www.anyware.co.uk | Resumé: http://www.anyware.co.uk/marc
Contributor @ http://grails.org | Founder @ http://noticelocal.com
Developer @ http://weceem.org | Member @ http://spottymushroom.com
Twitter: http://twitter.com/wangjammer5


~ ~ ~
Marc Palmer
Freelancer (Grails/Groovy/Java/UX)

Grails Plugins: http://grailsrocks.com
Blog: http://www.anyware.co.uk | Resumé: http://www.anyware.co.uk/marc
Contributor @ http://grails.org | Founder @ http://noticelocal.com
Developer @ http://weceem.org | Member @ http://spottymushroom.com
Twitter: http://twitter.com/wangjammer5 


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|

Re: Startup performance

Graeme Rocher
Administrator
Please raise a JIRA, we'll see what we can do to make this more efficient

Cheers


On Thu, Jan 10, 2013 at 10:41 PM, Marc Palmer <[hidden email]> wrote:

On 10 Jan 2013, at 19:29, Sergei Rahouski <[hidden email]> wrote:

> Hi,
>
> We have a large Grails application. Startup performance degrades as application grows.
>
> At this time it takes over 4 minutes to start the application. Visuall the application sits in “Running Grails application” . Version of Grails is 2.2.
>
> It is annoying enough for me to start profiling. What I am seeing is that while “Running Grails application” is happening the application goes through about 400GB worth of java.lang.reflect.Method objects. Garbage collector kicks in every time it hits the top limit and cleans up. That sure doesn’t seem to be very efficient.
>
> I would be happy to create a jira if this information is enough. I would also appreciate any suggestions to bring this time down – I can move grails-app from services to src/groovy or back if needed to improve this time, or even try to reduct number of methods per class I don’t know what that is but I am open to try. The project is large with over 2500 of classes, there are over 2000 controller actions.
>

Hi Sergei,

Could you please give us full details. Its impossible to say what is going on with just these screen grabs without even knowing (without guessing) what app the grabs are from, what the columns show etc.

Fundamental basic information required to look at something like this includes:

* Max heap
* Max permgen
* Total Classes loaded by VM
* Which what are those columns - they look memory consumed, from jvisualvm or YourKit, but I'm not sure. I don't recall a memory display UI for methods - for objects yes.
* JVM version

Maybe then we can help you manage your environment better so that your monster app starts quicker :)

Cheers

~ ~ ~
Marc Palmer
Freelancer (Grails/Groovy/Java/UX)

Grails Plugins: http://grailsrocks.com
Blog: http://www.anyware.co.uk | Resumé: http://www.anyware.co.uk/marc
Contributor @ http://grails.org | Founder @ http://noticelocal.com
Developer @ http://weceem.org | Member @ http://spottymushroom.com
Twitter: http://twitter.com/wangjammer5


~ ~ ~
Marc Palmer
Freelancer (Grails/Groovy/Java/UX)

Grails Plugins: http://grailsrocks.com
Blog: http://www.anyware.co.uk | Resumé: http://www.anyware.co.uk/marc
Contributor @ http://grails.org | Founder @ http://noticelocal.com
Developer @ http://weceem.org | Member @ http://spottymushroom.com
Twitter: http://twitter.com/wangjammer5


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email





--
Graeme Rocher
Grails Project Lead
SpringSource - A Division of VMware
http://www.springsource.com
Reply | Threaded
Open this post in threaded view
|

Re: Startup performance

longwa
Same issue for us, over 4 minutes for startup time and about 3GB of memory usage. I keep meaning to profile startup using YourKit and post the results. I'll attach my results to this ticket. Or projects stats (this is our common in-place plugin so it has mostly domain and back-end code and services, few controllers):

    +----------------------+-------+-------+
    | Name                 | Files |  LOC  |
    +----------------------+-------+-------+
    | Controllers          |     8 |   444 |
    | Domain Classes  |   400 | 21289 |
    | Services             |    45 |  6046 |
    | Tag Libraries       |     5 |   903 |
    | Groovy Helpers    |   386 | 21125 |
    | Java Helpers       |     3 |   142 |
    | Unit Tests           |   113 | 12508 |
    | Integration Tests |   405 | 19408 |
    | Scripts               |     7 |   108 |
    +----------------------+-------+-------+
    | Totals               |  1372 | 81973 |
    +----------------------+-------+-------+

I will say that the test-app and run-app times on Grails 2.2.0 are about 30% faster than 2.1.2. Our test run has 2300 tests and takes 39 minutes on Grails 2.1 but only 26 minutes on Grails 2.2. Grails run-app startup is faster but still almost 3 minutes. We develop mostly on Win64 with 1.7.0_09 JVM.

If there's some low hanging fruit here, it would help us tremendously.

-Aaron


On Fri, Jan 11, 2013 at 3:15 AM, Graeme Rocher <[hidden email]> wrote:
Please raise a JIRA, we'll see what we can do to make this more efficient

Cheers


On Thu, Jan 10, 2013 at 10:41 PM, Marc Palmer <[hidden email]> wrote:

On 10 Jan 2013, at 19:29, Sergei Rahouski <[hidden email]> wrote:

> Hi,
>
> We have a large Grails application. Startup performance degrades as application grows.
>
> At this time it takes over 4 minutes to start the application. Visuall the application sits in “Running Grails application” . Version of Grails is 2.2.
>
> It is annoying enough for me to start profiling. What I am seeing is that while “Running Grails application” is happening the application goes through about 400GB worth of java.lang.reflect.Method objects. Garbage collector kicks in every time it hits the top limit and cleans up. That sure doesn’t seem to be very efficient.
>
> I would be happy to create a jira if this information is enough. I would also appreciate any suggestions to bring this time down – I can move grails-app from services to src/groovy or back if needed to improve this time, or even try to reduct number of methods per class I don’t know what that is but I am open to try. The project is large with over 2500 of classes, there are over 2000 controller actions.
>

Hi Sergei,

Could you please give us full details. Its impossible to say what is going on with just these screen grabs without even knowing (without guessing) what app the grabs are from, what the columns show etc.

Fundamental basic information required to look at something like this includes:

* Max heap
* Max permgen
* Total Classes loaded by VM
* Which what are those columns - they look memory consumed, from jvisualvm or YourKit, but I'm not sure. I don't recall a memory display UI for methods - for objects yes.
* JVM version

Maybe then we can help you manage your environment better so that your monster app starts quicker :)

Cheers

~ ~ ~
Marc Palmer
Freelancer (Grails/Groovy/Java/UX)

Grails Plugins: http://grailsrocks.com
Blog: http://www.anyware.co.uk | Resumé: http://www.anyware.co.uk/marc
Contributor @ http://grails.org | Founder @ http://noticelocal.com
Developer @ http://weceem.org | Member @ http://spottymushroom.com
Twitter: http://twitter.com/wangjammer5


~ ~ ~
Marc Palmer
Freelancer (Grails/Groovy/Java/UX)

Grails Plugins: http://grailsrocks.com
Blog: http://www.anyware.co.uk | Resumé: http://www.anyware.co.uk/marc
Contributor @ http://grails.org | Founder @ http://noticelocal.com
Developer @ http://weceem.org | Member @ http://spottymushroom.com
Twitter: http://twitter.com/wangjammer5


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email





--
Graeme Rocher
Grails Project Lead
SpringSource - A Division of VMware
http://www.springsource.com

Reply | Threaded
Open this post in threaded view
|

Re: Startup performance

Graeme Rocher
Administrator
Sometimes it is application specific, for example if you use the searchable plugin and have indexing on startup enabled, this can cause serious startup delays. So I can't promise anything. If a JIRA is raised, please feel free to include any profiling information you can come up with

Cheers


On Fri, Jan 11, 2013 at 2:44 PM, Aaron Long <[hidden email]> wrote:
Same issue for us, over 4 minutes for startup time and about 3GB of memory usage. I keep meaning to profile startup using YourKit and post the results. I'll attach my results to this ticket. Or projects stats (this is our common in-place plugin so it has mostly domain and back-end code and services, few controllers):

    +----------------------+-------+-------+
    | Name                 | Files |  LOC  |
    +----------------------+-------+-------+
    | Controllers          |     8 |   444 |
    | Domain Classes  |   400 | 21289 |
    | Services             |    45 |  6046 |
    | Tag Libraries       |     5 |   903 |
    | Groovy Helpers    |   386 | 21125 |
    | Java Helpers       |     3 |   142 |
    | Unit Tests           |   113 | 12508 |
    | Integration Tests |   405 | 19408 |
    | Scripts               |     7 |   108 |
    +----------------------+-------+-------+
    | Totals               |  1372 | 81973 |
    +----------------------+-------+-------+

I will say that the test-app and run-app times on Grails 2.2.0 are about 30% faster than 2.1.2. Our test run has 2300 tests and takes 39 minutes on Grails 2.1 but only 26 minutes on Grails 2.2. Grails run-app startup is faster but still almost 3 minutes. We develop mostly on Win64 with 1.7.0_09 JVM.

If there's some low hanging fruit here, it would help us tremendously.

-Aaron


On Fri, Jan 11, 2013 at 3:15 AM, Graeme Rocher <[hidden email]> wrote:
Please raise a JIRA, we'll see what we can do to make this more efficient

Cheers


On Thu, Jan 10, 2013 at 10:41 PM, Marc Palmer <[hidden email]> wrote:

On 10 Jan 2013, at 19:29, Sergei Rahouski <[hidden email]> wrote:

> Hi,
>
> We have a large Grails application. Startup performance degrades as application grows.
>
> At this time it takes over 4 minutes to start the application. Visuall the application sits in “Running Grails application” . Version of Grails is 2.2.
>
> It is annoying enough for me to start profiling. What I am seeing is that while “Running Grails application” is happening the application goes through about 400GB worth of java.lang.reflect.Method objects. Garbage collector kicks in every time it hits the top limit and cleans up. That sure doesn’t seem to be very efficient.
>
> I would be happy to create a jira if this information is enough. I would also appreciate any suggestions to bring this time down – I can move grails-app from services to src/groovy or back if needed to improve this time, or even try to reduct number of methods per class I don’t know what that is but I am open to try. The project is large with over 2500 of classes, there are over 2000 controller actions.
>

Hi Sergei,

Could you please give us full details. Its impossible to say what is going on with just these screen grabs without even knowing (without guessing) what app the grabs are from, what the columns show etc.

Fundamental basic information required to look at something like this includes:

* Max heap
* Max permgen
* Total Classes loaded by VM
* Which what are those columns - they look memory consumed, from jvisualvm or YourKit, but I'm not sure. I don't recall a memory display UI for methods - for objects yes.
* JVM version

Maybe then we can help you manage your environment better so that your monster app starts quicker :)

Cheers

~ ~ ~
Marc Palmer
Freelancer (Grails/Groovy/Java/UX)

Grails Plugins: http://grailsrocks.com
Blog: http://www.anyware.co.uk | Resumé: http://www.anyware.co.uk/marc
Contributor @ http://grails.org | Founder @ http://noticelocal.com
Developer @ http://weceem.org | Member @ http://spottymushroom.com
Twitter: http://twitter.com/wangjammer5


~ ~ ~
Marc Palmer
Freelancer (Grails/Groovy/Java/UX)

Grails Plugins: http://grailsrocks.com
Blog: http://www.anyware.co.uk | Resumé: http://www.anyware.co.uk/marc
Contributor @ http://grails.org | Founder @ http://noticelocal.com
Developer @ http://weceem.org | Member @ http://spottymushroom.com
Twitter: http://twitter.com/wangjammer5


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email





--
Graeme Rocher
Grails Project Lead
SpringSource - A Division of VMware
http://www.springsource.com




--
Graeme Rocher
Grails Project Lead
SpringSource - A Division of VMware
http://www.springsource.com
Reply | Threaded
Open this post in threaded view
|

RE: Startup performance

Sergei Rahouski
In reply to this post by Graeme Rocher

Created two jiras:

 

http://jira.grails.org/browse/GRAILS-9753

http://jira.grails.org/browse/GRAILS-9754

 

One is a trivial. I am sure another one is easily fixable too.

 

From: Graeme Rocher [mailto:[hidden email]]
Sent: Friday, January 11, 2013 2:15 AM
To: user
Subject: Re: [grails-user] Startup performance

 

Please raise a JIRA, we'll see what we can do to make this more efficient

 

Cheers

 

On Thu, Jan 10, 2013 at 10:41 PM, Marc Palmer <[hidden email]> wrote:


On 10 Jan 2013, at 19:29, Sergei Rahouski <[hidden email]> wrote:


> Hi,
>
> We have a large Grails application. Startup performance degrades as application grows.
>
> At this time it takes over 4 minutes to start the application. Visuall the application sits in “Running Grails application” . Version of Grails is 2.2.
>
> It is annoying enough for me to start profiling. What I am seeing is that while “Running Grails application” is happening the application goes through about 400GB worth of java.lang.reflect.Method objects. Garbage collector kicks in every time it hits the top limit and cleans up. That sure doesn’t seem to be very efficient.
>
> I would be happy to create a jira if this information is enough. I would also appreciate any suggestions to bring this time down – I can move grails-app from services to src/groovy or back if needed to improve this time, or even try to reduct number of methods per class I don’t know what that is but I am open to try. The project is large with over 2500 of classes, there are over 2000 controller actions.
>

Hi Sergei,


Could you please give us full details. Its impossible to say what is going on with just these screen grabs without even knowing (without guessing) what app the grabs are from, what the columns show etc.

Fundamental basic information required to look at something like this includes:

* Max heap
* Max permgen
* Total Classes loaded by VM
* Which what are those columns - they look memory consumed, from jvisualvm or YourKit, but I'm not sure. I don't recall a memory display UI for methods - for objects yes.
* JVM version

Maybe then we can help you manage your environment better so that your monster app starts quicker :)

Cheers

~ ~ ~
Marc Palmer
Freelancer (Grails/Groovy/Java/UX)

Grails Plugins: http://grailsrocks.com
Blog: http://www.anyware.co.uk | Resumé: http://www.anyware.co.uk/marc
Contributor @ http://grails.org | Founder @ http://noticelocal.com
Developer @ http://weceem.org | Member @ http://spottymushroom.com
Twitter: http://twitter.com/wangjammer5


~ ~ ~
Marc Palmer
Freelancer (Grails/Groovy/Java/UX)

Grails Plugins: http://grailsrocks.com
Blog: http://www.anyware.co.uk | Resumé: http://www.anyware.co.uk/marc
Contributor @ http://grails.org | Founder @ http://noticelocal.com
Developer @ http://weceem.org | Member @ http://spottymushroom.com
Twitter: http://twitter.com/wangjammer5


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email



 

--
Graeme Rocher
Grails Project Lead
SpringSource - A Division of VMware
http://www.springsource.com

This message and any attachments originate from International Decision Systems (IDS) and contains privileged and/or confidential information. If you receive this message in error or are not the intended recipient, you may not disseminate this message and you are requested to erase all copies of this message and its attachments and contact the sender by email or by calling +1 (612) 851-3200.
Reply | Threaded
Open this post in threaded view
|

Re: Startup performance

Marc Palmer Local

On 11 Jan 2013, at 16:40, "Sergei Rahouski" <[hidden email]> wrote:

> Created two jiras:
>  
> http://jira.grails.org/browse/GRAILS-9753
> http://jira.grails.org/browse/GRAILS-9754
>  
> One is a trivial. I am sure another one is easily fixable too.
>

Sergei - can you please attach to the second issue more than just a screen grab - full info about the VM as requested, including the JVM options, the total # classes loaded into the JVM etc. You get all this from jvisualvm or jconsole probably, and surely YourKit?

It may help to isolate this.

The regex one is pretty funny really. Who'd have thought a little regex could get called so much.

Marc
~ ~ ~
Marc Palmer
Freelancer (Grails/Groovy/Java/UX)

Grails Plugins: http://grailsrocks.com
Blog: http://www.anyware.co.uk | Resumé: http://www.anyware.co.uk/marc
Contributor @ http://grails.org | Founder @ http://noticelocal.com
Developer @ http://weceem.org | Member @ http://spottymushroom.com
Twitter: http://twitter.com/wangjammer5 


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|

RE: Startup performance

Sergei Rahouski
There are 3G of ram allocated. Options are: -Xms256m -Xmx3024m
-XX:PermSize=48m -XX:MaxPermSize=512m -XX:-UseGCOverheadLimit

When the app is loaded it has 7000 classes.

-----Original Message-----
From: Marc Palmer [mailto:[hidden email]]
Sent: Friday, January 11, 2013 11:02 AM
To: [hidden email]
Subject: Re: [grails-user] Startup performance


On 11 Jan 2013, at 16:40, "Sergei Rahouski" <[hidden email]>
wrote:

> Created two jiras:
>  
> http://jira.grails.org/browse/GRAILS-9753
> http://jira.grails.org/browse/GRAILS-9754
>  
> One is a trivial. I am sure another one is easily fixable too.
>

Sergei - can you please attach to the second issue more than just a
screen grab - full info about the VM as requested, including the JVM
options, the total # classes loaded into the JVM etc. You get all this
from jvisualvm or jconsole probably, and surely YourKit?

It may help to isolate this.

The regex one is pretty funny really. Who'd have thought a little regex
could get called so much.

Marc
~ ~ ~
Marc Palmer
Freelancer (Grails/Groovy/Java/UX)

Grails Plugins: http://grailsrocks.com
Blog: http://www.anyware.co.uk | Resume: http://www.anyware.co.uk/marc
Contributor @ http://grails.org | Founder @ http://noticelocal.com
Developer @ http://weceem.org | Member @ http://spottymushroom.com
Twitter: http://twitter.com/wangjammer5 


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email



This message and any attachments originate from International Decision Systems (IDS) and contains privileged and/or confidential information. If you receive this message in error or are not the intended recipient, you may not disseminate this message and you are requested to erase all copies of this message and its attachments and contact the sender by email or by calling +1 (612) 851-3200.

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|

Re: Startup performance

Marc Palmer Local

On 11 Jan 2013, at 18:28, Sergei Rahouski <[hidden email]> wrote:

> There are 3G of ram allocated. Options are: -Xms256m -Xmx3024m
> -XX:PermSize=48m -XX:MaxPermSize=512m -XX:-UseGCOverheadLimit
>
> When the app is loaded it has 7000 classes.

That sounds strange. Unless something has changed in recent Groovy/Grails/JVM, when I was debugging memory issues on Grails 1.3.x there was a minimum of 12000 classes loaded for a trivial Grails app. Are you saying the JVM reports a grand total of 7000 classes, or circa 12000+7000 classes, i.e. you've separated out the classes from just your app? (sounds about right for this, with each Closure being its own class).

>
Your MaxPermSize seems high, and so does your heap. Have you actually tried running it with less memory? I may be out of date but me belief was that the performance of GC tends to degrade the higher max heap is.

Marc
~ ~ ~
Marc Palmer
Freelancer (Grails/Groovy/Java/UX)

Grails Plugins: http://grailsrocks.com
Blog: http://www.anyware.co.uk | Resumé: http://www.anyware.co.uk/marc
Contributor @ http://grails.org | Founder @ http://noticelocal.com
Developer @ http://weceem.org | Member @ http://spottymushroom.com
Twitter: http://twitter.com/wangjammer5 


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|

RE: Startup performance

Sergei Rahouski
I found the bottle neck. It has nothing to do with memory. There is an
inefficient piece of code in spring-beans.

See http://jira.grails.org/browse/GRAILS-9754

-----Original Message-----
From: Marc Palmer [mailto:[hidden email]]
Sent: Monday, January 14, 2013 5:55 AM
To: [hidden email]
Subject: Re: [grails-user] Startup performance


On 11 Jan 2013, at 18:28, Sergei Rahouski <[hidden email]> wrote:

> There are 3G of ram allocated. Options are: -Xms256m -Xmx3024m
> -XX:PermSize=48m -XX:MaxPermSize=512m -XX:-UseGCOverheadLimit
>
> When the app is loaded it has 7000 classes.

That sounds strange. Unless something has changed in recent
Groovy/Grails/JVM, when I was debugging memory issues on Grails 1.3.x
there was a minimum of 12000 classes loaded for a trivial Grails app.
Are you saying the JVM reports a grand total of 7000 classes, or circa
12000+7000 classes, i.e. you've separated out the classes from just your
app? (sounds about right for this, with each Closure being its own
class).

>
Your MaxPermSize seems high, and so does your heap. Have you actually
tried running it with less memory? I may be out of date but me belief
was that the performance of GC tends to degrade the higher max heap is.

Marc
~ ~ ~
Marc Palmer
Freelancer (Grails/Groovy/Java/UX)

Grails Plugins: http://grailsrocks.com
Blog: http://www.anyware.co.uk | Resume: http://www.anyware.co.uk/marc
Contributor @ http://grails.org | Founder @ http://noticelocal.com
Developer @ http://weceem.org | Member @ http://spottymushroom.com
Twitter: http://twitter.com/wangjammer5 


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email



This message and any attachments originate from International Decision Systems (IDS) and contains privileged and/or confidential information. If you receive this message in error or are not the intended recipient, you may not disseminate this message and you are requested to erase all copies of this message and its attachments and contact the sender by email or by calling +1 (612) 851-3200.

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|

Re: Startup performance

Marc Palmer Local

On 14 Jan 2013, at 13:52, "Sergei Rahouski" <[hidden email]> wrote:

> I found the bottle neck. It has nothing to do with memory. There is an
> inefficient piece of code in spring-beans.
>
> See http://jira.grails.org/browse/GRAILS-9754
>

Fantastic catch and great news!

Marc

~ ~ ~
Marc Palmer
Freelancer (Grails/Groovy/Java/UX)

Grails Plugins: http://grailsrocks.com
Blog: http://www.anyware.co.uk | Resumé: http://www.anyware.co.uk/marc
Contributor @ http://grails.org | Founder @ http://noticelocal.com
Developer @ http://weceem.org | Member @ http://spottymushroom.com
Twitter: http://twitter.com/wangjammer5 


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|

Re: Startup performance

longwa
If our startup time goes down to a minute and 15 seconds, I'm sending someone beers.

-Aaron

On Mon, Jan 14, 2013 at 9:11 AM, Marc Palmer <[hidden email]> wrote:

On 14 Jan 2013, at 13:52, "Sergei Rahouski" <[hidden email]> wrote:

> I found the bottle neck. It has nothing to do with memory. There is an
> inefficient piece of code in spring-beans.
>
> See http://jira.grails.org/browse/GRAILS-9754
>

Fantastic catch and great news!

Marc

~ ~ ~
Marc Palmer
Freelancer (Grails/Groovy/Java/UX)

Grails Plugins: http://grailsrocks.com
Blog: http://www.anyware.co.uk | Resumé: http://www.anyware.co.uk/marc
Contributor @ http://grails.org | Founder @ http://noticelocal.com
Developer @ http://weceem.org | Member @ http://spottymushroom.com
Twitter: http://twitter.com/wangjammer5


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email



Reply | Threaded
Open this post in threaded view
|

Re: Startup performance

lucastex
Some cachaças from brazil either.

Our startup time takes 4m +

[]s,



On Mon, Jan 14, 2013 at 4:04 PM, Aaron Long <[hidden email]> wrote:
If our startup time goes down to a minute and 15 seconds, I'm sending someone beers.

-Aaron


On Mon, Jan 14, 2013 at 9:11 AM, Marc Palmer <[hidden email]> wrote:

On 14 Jan 2013, at 13:52, "Sergei Rahouski" <[hidden email]> wrote:

> I found the bottle neck. It has nothing to do with memory. There is an
> inefficient piece of code in spring-beans.
>
> See http://jira.grails.org/browse/GRAILS-9754
>

Fantastic catch and great news!

Marc

~ ~ ~
Marc Palmer
Freelancer (Grails/Groovy/Java/UX)

Grails Plugins: http://grailsrocks.com
Blog: http://www.anyware.co.uk | Resumé: http://www.anyware.co.uk/marc
Contributor @ http://grails.org | Founder @ http://noticelocal.com
Developer @ http://weceem.org | Member @ http://spottymushroom.com
Twitter: http://twitter.com/wangjammer5


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email




Reply | Threaded
Open this post in threaded view
|

Re: Startup performance

longwa
I finally got around to profiling 2.2.0 with YourKit and I'm having a hard time reproducing the results in this thread. First off, 2.2.0 is almost twice as fast starting up as 2.1.2 without any of the changes mentioned in this thread. I'm not sure if that's a groovy 2.0 thing or optimizations in the framework, but it is definitely good news.

Second, when I profile my startup from beginning to end, I don't see any large times for the methods shown above. In fact, YourKit lists these as the hotspots:

Inline image 1

We spend about half of the 3 minutes creating beans. However, looking for ExtendedBeanInfo or ClassUtils usage shows minimal impact:

Inline image 2

So, it comes as no surprise that, for our application at least, doing the ExtendedBeanInfo workaround didn't reduce startup time a noticeable amount. Adding the if...continue workaround above does break about 3 or 4 of the spring-beans testcases so I'm assuming it isn't a long term fix.

Sergei, is there something else that I'm missing?

Rgds,
Aaron

On Mon, Jan 14, 2013 at 1:16 PM, Lucas F. A. Teixeira <[hidden email]> wrote:
Some cachaças from brazil either.

Our startup time takes 4m +

[]s,



On Mon, Jan 14, 2013 at 4:04 PM, Aaron Long <[hidden email]> wrote:
If our startup time goes down to a minute and 15 seconds, I'm sending someone beers.

-Aaron


On Mon, Jan 14, 2013 at 9:11 AM, Marc Palmer <[hidden email]> wrote:

On 14 Jan 2013, at 13:52, "Sergei Rahouski" <[hidden email]> wrote:

> I found the bottle neck. It has nothing to do with memory. There is an
> inefficient piece of code in spring-beans.
>
> See http://jira.grails.org/browse/GRAILS-9754
>

Fantastic catch and great news!

Marc

~ ~ ~
Marc Palmer
Freelancer (Grails/Groovy/Java/UX)

Grails Plugins: http://grailsrocks.com
Blog: http://www.anyware.co.uk | Resumé: http://www.anyware.co.uk/marc
Contributor @ http://grails.org | Founder @ http://noticelocal.com
Developer @ http://weceem.org | Member @ http://spottymushroom.com
Twitter: http://twitter.com/wangjammer5


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email





Reply | Threaded
Open this post in threaded view
|

Re: Startup performance

sergiomichels
According to the JIRA: 

We use inheritance in our controllers and services, just a few method not much however it has big ripple effect.

So I'm assuming that you didn't use inheritance, and for consequence you didn't see any effect with this change.


--
Sérgio Michels


On Thu, Jan 17, 2013 at 1:36 PM, Aaron Long <[hidden email]> wrote:
I finally got around to profiling 2.2.0 with YourKit and I'm having a hard time reproducing the results in this thread. First off, 2.2.0 is almost twice as fast starting up as 2.1.2 without any of the changes mentioned in this thread. I'm not sure if that's a groovy 2.0 thing or optimizations in the framework, but it is definitely good news.

Second, when I profile my startup from beginning to end, I don't see any large times for the methods shown above. In fact, YourKit lists these as the hotspots:

Inline image 1

We spend about half of the 3 minutes creating beans. However, looking for ExtendedBeanInfo or ClassUtils usage shows minimal impact:

Inline image 2

So, it comes as no surprise that, for our application at least, doing the ExtendedBeanInfo workaround didn't reduce startup time a noticeable amount. Adding the if...continue workaround above does break about 3 or 4 of the spring-beans testcases so I'm assuming it isn't a long term fix.

Sergei, is there something else that I'm missing?

Rgds,
Aaron


On Mon, Jan 14, 2013 at 1:16 PM, Lucas F. A. Teixeira <[hidden email]> wrote:
Some cachaças from brazil either.

Our startup time takes 4m +

[]s,



On Mon, Jan 14, 2013 at 4:04 PM, Aaron Long <[hidden email]> wrote:
If our startup time goes down to a minute and 15 seconds, I'm sending someone beers.

-Aaron


On Mon, Jan 14, 2013 at 9:11 AM, Marc Palmer <[hidden email]> wrote:

On 14 Jan 2013, at 13:52, "Sergei Rahouski" <[hidden email]> wrote:

> I found the bottle neck. It has nothing to do with memory. There is an
> inefficient piece of code in spring-beans.
>
> See http://jira.grails.org/browse/GRAILS-9754
>

Fantastic catch and great news!

Marc

~ ~ ~
Marc Palmer
Freelancer (Grails/Groovy/Java/UX)

Grails Plugins: http://grailsrocks.com
Blog: http://www.anyware.co.uk | Resumé: http://www.anyware.co.uk/marc
Contributor @ http://grails.org | Founder @ http://noticelocal.com
Developer @ http://weceem.org | Member @ http://spottymushroom.com
Twitter: http://twitter.com/wangjammer5


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email






Reply | Threaded
Open this post in threaded view
|

Re: Startup performance

Al Baker
In reply to this post by longwa
Perhaps the reload agent is the problem?



On Jan 17, 2013, at 10:36 AM, Aaron Long <[hidden email]> wrote:

I finally got around to profiling 2.2.0 with YourKit and I'm having a hard time reproducing the results in this thread. First off, 2.2.0 is almost twice as fast starting up as 2.1.2 without any of the changes mentioned in this thread. I'm not sure if that's a groovy 2.0 thing or optimizations in the framework, but it is definitely good news.

Second, when I profile my startup from beginning to end, I don't see any large times for the methods shown above. In fact, YourKit lists these as the hotspots:

<image.png>

We spend about half of the 3 minutes creating beans. However, looking for ExtendedBeanInfo or ClassUtils usage shows minimal impact:

<image.png>

So, it comes as no surprise that, for our application at least, doing the ExtendedBeanInfo workaround didn't reduce startup time a noticeable amount. Adding the if...continue workaround above does break about 3 or 4 of the spring-beans testcases so I'm assuming it isn't a long term fix.

Sergei, is there something else that I'm missing?

Rgds,
Aaron

On Mon, Jan 14, 2013 at 1:16 PM, Lucas F. A. Teixeira <[hidden email]> wrote:
Some cachaças from brazil either.

Our startup time takes 4m +

[]s,



On Mon, Jan 14, 2013 at 4:04 PM, Aaron Long <[hidden email]> wrote:
If our startup time goes down to a minute and 15 seconds, I'm sending someone beers.

-Aaron


On Mon, Jan 14, 2013 at 9:11 AM, Marc Palmer <[hidden email]> wrote:

On 14 Jan 2013, at 13:52, "Sergei Rahouski" <[hidden email]> wrote:

> I found the bottle neck. It has nothing to do with memory. There is an
> inefficient piece of code in spring-beans.
>
> See http://jira.grails.org/browse/GRAILS-9754
>

Fantastic catch and great news!

Marc

~ ~ ~
Marc Palmer
Freelancer (Grails/Groovy/Java/UX)

Grails Plugins: http://grailsrocks.com
Blog: http://www.anyware.co.uk | Resumé: http://www.anyware.co.uk/marc
Contributor @ http://grails.org | Founder @ http://noticelocal.com
Developer @ http://weceem.org | Member @ http://spottymushroom.com
Twitter: http://twitter.com/wangjammer5


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email





Reply | Threaded
Open this post in threaded view
|

Re: Startup performance

longwa
Ah, we use some amount of inheritance, but not much in services and controllers, only domain objects.

Since we have 400 domain objects, our time is mostly spent creating beans that pertain to those objects. Primarily the time is around the SessionFactory initialization and registration for those objects. I don't see any magic bullet that will cut down the time but I'll keep digging for our specific case.

-Aaron

On Thu, Jan 17, 2013 at 11:06 AM, Al Baker <[hidden email]> wrote:
Perhaps the reload agent is the problem?



On Jan 17, 2013, at 10:36 AM, Aaron Long <[hidden email]> wrote:

I finally got around to profiling 2.2.0 with YourKit and I'm having a hard time reproducing the results in this thread. First off, 2.2.0 is almost twice as fast starting up as 2.1.2 without any of the changes mentioned in this thread. I'm not sure if that's a groovy 2.0 thing or optimizations in the framework, but it is definitely good news.

Second, when I profile my startup from beginning to end, I don't see any large times for the methods shown above. In fact, YourKit lists these as the hotspots:

<image.png>

We spend about half of the 3 minutes creating beans. However, looking for ExtendedBeanInfo or ClassUtils usage shows minimal impact:

<image.png>


So, it comes as no surprise that, for our application at least, doing the ExtendedBeanInfo workaround didn't reduce startup time a noticeable amount. Adding the if...continue workaround above does break about 3 or 4 of the spring-beans testcases so I'm assuming it isn't a long term fix.

Sergei, is there something else that I'm missing?

Rgds,
Aaron

On Mon, Jan 14, 2013 at 1:16 PM, Lucas F. A. Teixeira <[hidden email]> wrote:
Some cachaças from brazil either.

Our startup time takes 4m +

[]s,



On Mon, Jan 14, 2013 at 4:04 PM, Aaron Long <[hidden email]> wrote:
If our startup time goes down to a minute and 15 seconds, I'm sending someone beers.

-Aaron


On Mon, Jan 14, 2013 at 9:11 AM, Marc Palmer <[hidden email]> wrote:

On 14 Jan 2013, at 13:52, "Sergei Rahouski" <[hidden email]> wrote:

> I found the bottle neck. It has nothing to do with memory. There is an
> inefficient piece of code in spring-beans.
>
> See http://jira.grails.org/browse/GRAILS-9754
>

Fantastic catch and great news!

Marc

~ ~ ~
Marc Palmer
Freelancer (Grails/Groovy/Java/UX)

Grails Plugins: http://grailsrocks.com
Blog: http://www.anyware.co.uk | Resumé: http://www.anyware.co.uk/marc
Contributor @ http://grails.org | Founder @ http://noticelocal.com
Developer @ http://weceem.org | Member @ http://spottymushroom.com
Twitter: http://twitter.com/wangjammer5


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email