-
Notifications
You must be signed in to change notification settings - Fork 383
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
Quarkus native heap dump on OOME blog post #1942
Quarkus native heap dump on OOME blog post #1942
Conversation
Can we add @roberttoyonaga as reviewer? |
🙈 The PR is closed and the preview is expired. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thank @galderz
I added some suggestions, for your consideration, that IMHO might improve it a bit.
2024-04-12 09:58:00,855 INFO [io.quarkus] (main) Installed features: [cdi, rest, smallrye-context-propagation, vertx] | ||
---- | ||
|
||
Next, apply some load to the HTTP endpoint exposed by the Quarkus application, for example using `wrk`: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps a bash loop with a curl command would be better as most people won't have wrk
installed. On the other hand that's a nice way to become aware of wrk
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point, wrk
is an overkill for this. Just used to quickly firing it up :)
|
||
Let’s start by producing a heap dump with a Quarkus native executable. | ||
A good starting point would be a Quarkus application that simply responds to an HTTP endpoint request, e.g. the | ||
https://github.com/quarkusio/quarkus-quickstarts/tree/main/getting-started-reactive[getting-started-reactive] Quarkus quickstart. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps it's simpler to use https://code.quarkus.io/
E.g. I can follow this post with:
wget "https://code.quarkus.io/d?S=io.quarkus.platform%3A3.8&cn=code.quarkus.io" -O code.zip
unzip code.zip
cd code-with-quarkus
Note I explicitly set the version to Quarkus 3.8 to hopefully keep the instructions working for some time.
|
||
Starting with GraalVM for JDK 21, | ||
native executables can run with the `-XX:+HeapDumpOnOutOfMemoryError` option to generate a heap dump when a `java.lang.OutOfMemoryError` is thrown. | ||
In this blog post we will explore how to use the flag, we will inspect what a native image heap dump looks like and how it compares with one produced by HotSpot. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we will inspect what a native image heap dump looks like
Maybe there's a chance readers get confused by the wording here and think dumping the Image Heap and "java heap" are different things (If they are aware that the image heap exists).
Maybe it would be good to specify that we're dumping both the read-only Image Heap as well as the native image's "Java heap". Whereas in Java mode we're just dumping the Java heap.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On the flip side, it could also be an opportunity to briefly inform readers who aren't aware that there is a special segmentation to the heap in native mode.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Both points sound good. I have not explored the differences in detail between the read-only and the read/write parts, but if you have feel free to propose a paragraph and add it as suggestion and we can just add it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok I've added a suggestion below!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me! I think this is clear and to-the-point.
@zakkak I've addressed all your comments. @roberttoyonaga I've integrated your suggestion and made some small changes to it, let me know if you're happy with it. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for addressing my comments Galder.
There seems to be a new typo introduced.
Looks good to me! |
2c39bee
to
954dfdb
Compare
Squashed and pushed commits. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added some minor comments. Let me know when you prefer it to be published, I'll make it happen.
layout: post | ||
title: 'Obtaining heap dump on OutOfMemoryError with Quarkus native' | ||
date: 2024-04-15 | ||
tags: native heapdump oome epsilongc jol |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think it's a good idea to add tags that are so precise. We already have too many tags. Let's only have native
?
--- | ||
layout: post | ||
title: 'Obtaining heap dump on OutOfMemoryError with Quarkus native' | ||
date: 2024-04-15 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's target a publication on Tuesday? We can merge tomorrow and get it published automatically on Tuesday and tweet about it on Tuesday? Friday is a slow day for blog posts.
Note that if you want it published tomorrow, I'm around!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tuesday is fine, I'll ammend it.
Co-authored-by: Foivos <[email protected]> Co-authored-by: Robert Toyonaga <[email protected]> Co-authored-by: Guillaume Smet <[email protected]>
534133c
to
0cb8ed9
Compare
@gsmet Applied all suggested changes and changed date to next Tuesday. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome, thanks!
If you write me a tweet, I will be happy to post it on Tuesday. |
Sure, how about this?
|
LGTM. Let me put a reminder for Tuesday. |
@galderz What's your Twitter handle? |
Blog post on how to use heap dump on OOME option with Quarkus native which touches a few extra related topics: