Skip to content
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

Places to potentially find startup performance improvements #45436

Open
geoand opened this issue Jan 8, 2025 · 8 comments
Open

Places to potentially find startup performance improvements #45436

geoand opened this issue Jan 8, 2025 · 8 comments
Labels
kind/enhancement New feature or request

Comments

@geoand
Copy link
Contributor

geoand commented Jan 8, 2025

Description

These ideas come from looking at this flamegraph

@geoand geoand added the kind/enhancement New feature or request label Jan 8, 2025
@franz1981
Copy link
Contributor

@geoand I would add #43022 as well
since, with 2 or more event loops, the "new" concurrency allowed by the CL make it load more byte[] and fail on definition later on during class loading. This is both impacting memory and time.

@geoand
Copy link
Contributor Author

geoand commented Jan 8, 2025

ExtLogRecord looking up HostName and Process related data that aren't needed by the default logging pattern

@dmlloyd I wanted to move the relevant fields into a holder, but the need to support serialization prevents this approach.

@franz1981
Copy link
Contributor

franz1981 commented Jan 8, 2025

Another "big" (relatively) one @geoand is this -> smallrye/smallrye-common#370

this is very easy: just use 64 bytes cache line as other known projects does i.e. https://github.com/ziglang/zig/blob/master/lib/std/atomic.zig#L429 (which for both arm and x86 uses 2 * 64 bytes due to jbossas/jboss-threads#191)

We are reading from a proc file, in linux, performing both a syscall, parsing and creating garbage for such. It looks an easy win with low impact.

@geoand
Copy link
Contributor Author

geoand commented Jan 8, 2025

Just for posterity, the comment above should be handled by jbossas/jboss-threads#216

@radcortez
Copy link
Member

It also has to be handled here:
https://github.com/smallrye/smallrye-common/blob/e43dfdf9b512185fd8c96ad720fcd4070ff12030/cpu/src/main/java/io/smallrye/common/cpu/CacheInfo.java#L80-L155

I did a quick return with the expected bytes, and on my Mac I noticed around 20 ms improvement in the JVM startup time.

@radcortez
Copy link
Member

  • ExtLogRecord looking up HostName and Process related data that aren't needed by the default logging pattern

What's the plan with HostName? After #41664, I'm getting 2 / 3 ms increase in the native image startup time.

@geoand
Copy link
Contributor Author

geoand commented Jan 10, 2025

It also has to be handled here: https://github.com/smallrye/smallrye-common/blob/e43dfdf9b512185fd8c96ad720fcd4070ff12030/cpu/src/main/java/io/smallrye/common/cpu/CacheInfo.java#L80-L155

I did a quick return with the expected bytes, and on my Mac I noticed around 20 ms improvement in the JVM startup time.

With the change from @franz1981, I think that CacheInfo won't be used/loaded at all in Quarkus. Did you see otherwise @radcortez ?

@geoand
Copy link
Contributor Author

geoand commented Jan 10, 2025

  • ExtLogRecord looking up HostName and Process related data that aren't needed by the default logging pattern

What's the plan with HostName? After #41664, I'm getting 2 / 3 ms increase in the native image startup time.

I was hoping @dmlloyd has an idea as my original idea won't work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants