Skip to content

Investigate spring init startup time #5260

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
snicoll opened this issue Feb 26, 2016 · 10 comments
Closed

Investigate spring init startup time #5260

snicoll opened this issue Feb 26, 2016 · 10 comments
Labels
type: blocker An issue that is blocking us from releasing type: regression A regression from a previous release
Milestone

Comments

@snicoll
Copy link
Member

snicoll commented Feb 26, 2016

In 1.4.0.M1, time spring hint takes around 3.2 sec while the same command takes 2.7s on 1.3

@philwebb philwebb added the type: regression A regression from a previous release label Feb 26, 2016
@philwebb philwebb added this to the 1.4.0.M2 milestone Feb 26, 2016
@snicoll
Copy link
Member Author

snicoll commented Apr 5, 2016

I've done more tests today and I confirm the regression between 1.3.x and master. It's more a 10% increase which is still quite bad.

@philwebb philwebb added the type: blocker An issue that is blocking us from releasing label Apr 6, 2016
@joshiste
Copy link
Contributor

joshiste commented Apr 6, 2016

The spring-boot-cli-1.4.0.BUILD-SNAPSHOT.jar is around 18M where the spring-boot-cli-1.3.3.RELEASE.jar is around 9M - so I guess the jvm takes simply longer because it has to load more....

Did you thought about disabling the bytecode verification with -Xverify:none and limiting tiered compilation with -XX:+TieredCompilation -XX:TieredStopAtLevel=1 both combined brings me from 0.31s to 0.24s for spring hint in 1.4.0.BUILD-SNAPSHOT

@joshiste
Copy link
Contributor

joshiste commented Apr 6, 2016

-- deleted -- was rubbish ... forgot the clean...

@philwebb
Copy link
Member

philwebb commented Apr 6, 2016

I wonder why the size is so much bigger? That's unexpected.

@joshiste
Copy link
Contributor

joshiste commented Apr 6, 2016

yeah I forgot the clean.... so it was nonsense...
size is normal...

@wilkinsona
Copy link
Member

I spent a bit of time on this yesterday and didn't get very far. Two things I learned:

  • Profiling with YourKit (either sampling or tracing) made 1.4 faster than 1.3 so data was useless
  • 1.4 loads very slightly fewer classes than 1.3

@philwebb
Copy link
Member

My guess is this is related to #4882

@philwebb
Copy link
Member

Prototyping some ideas here: https://github.com/philwebb/spring-boot/tree/gh-5260

1.3.x

java -jar  hint  0.42s user 0.06s system 196% cpu 0.241 total
java -jar  hint  0.40s user 0.05s system 200% cpu 0.226 total
java -jar  hint  0.43s user 0.05s system 207% cpu 0.233 total

Before:

java -jar  hint  0.46s user 0.06s system 203% cpu 0.258 total
java -jar  hint  0.47s user 0.07s system 192% cpu 0.281 total
java -jar  hint  0.47s user 0.06s system 200% cpu 0.265 total

After:

java -jar  hint  0.42s user 0.06s system 186% cpu 0.254 total
java -jar  hint  0.42s user 0.05s system 187% cpu 0.252 total
java -jar  hint  0.41s user 0.06s system 184% cpu 0.253 total

@philwebb
Copy link
Member

I think performance is roughly back. I've added #5668 with another idea that might improve things even more.

@snicoll
Copy link
Member Author

snicoll commented Apr 13, 2016

I've tested this and we're back to the performance of 1.3.x - Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: blocker An issue that is blocking us from releasing type: regression A regression from a previous release
Projects
None yet
Development

No branches or pull requests

4 participants