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

how can I generate a docker imagine optimised? #1

Closed
rodrigorodrigues opened this issue Feb 13, 2024 · 2 comments
Closed

how can I generate a docker imagine optimised? #1

rodrigorodrigues opened this issue Feb 13, 2024 · 2 comments
Assignees

Comments

@rodrigorodrigues
Copy link

Hi @alina-yur,

I'm following your sample and I could generate the default.iprof now I'm wondering how can I generate a docker image using spring plugin, do you know if that's possible?

mvn -Pnative spring-boot:build-image

            <plugin>
                <groupId>org.graalvm.buildtools</groupId>
                <artifactId>native-maven-plugin</artifactId>
                <configuration>
                    <buildArgs>
                        <buildArg>--pgo=default.iprof</buildArg>
                        <buildArg>--gc=G1</buildArg>
                    </buildArgs>
                </configuration>
            </plugin>
@alina-yur
Copy link
Owner

hi @rodrigorodrigues! Glad this silly example helps, didn't think anyone would stumble upon it:))

Yes you can totally build an image with mvn -Pnative spring-boot:build-image. Now the question is where and how you can collect profiles, so they are representative of your production workload. If you can emulate production workload locally, you can build an optimized image locally. If relevant workload is only available in production, it could be necessary to deploy an instrumented image, collect profiles, and then rebuild with those profiles.

@rodrigorodrigues
Copy link
Author

closing this issue here the conversation continue on rodrigorodrigues/rinha-de-backend-2024-q1-javaslow-spring#1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants