Quarkus native tutorial

115 views
Skip to first unread message

gal...@redhat.com

unread,
Nov 24, 2021, 3:00:26 AM11/24/21
to Quarkus Development mailing list
Hi all,

One of the aims of the Mandrel team is to pass on knowledge that would enable Quarkus developers to better debug native issues. To do this, we have been working on training material that we're hoping to deliver in the near future.

We're now at a stage that we feel the training material is ready to be part of the Quarkus upstream documentation. We think it'd be best added as a tutorial that developers can run through at their own pace.

Given the complexity of issues, and differences in toolchain compared to debugging Java/JVM issues, we consider the audience for the tutorial to be advanced Quarkus users.

Please note that the tutorial is not a generic GraalVM native-image tutorial. Instead, it focuses exclusively on working with Quarkus applications from the start, so the users don't need to interact with native-image binary directly. The tutorial builds Quarkus native executables in container using Mandrel.

I was thinking the content could be added as an additional guide within Quarkus, e.g. https://quarkus.io/guides/advanced-native-tutorial

The agenda for the tutorial looks something like this:

Software Requirements
First Native Executable
Native Reports
  Call Tree Reports
  Used Packages/Classes/Methods Reports
  Further Reports
Build-time vs Run-time Initialization
Profile Runtime Behaviour
  Single Thread
  Multi-Thread
Debugging Native Crashes

While we worked on this material, we also also compiled a list of FAQs related to the tutorial and Quarkus Native applications. Where could we add those upstream? They could go into the tutorial itself, or maybe a separate guide, e.g. https://quarkus.io/guides/native-faqs? Here's the list of FAQs we have so far:

Q. Why is generating a native executable slow?
Q. Why is runtime performance of natives slower compared to JVM mode?
Q. Why are native executables “big”?
Q. What version of Mandrel was used to generate a binary?
Q. How do I enable GC logging in native executables?
Q. Can I get a heap dump of a native executable? e.g. if it runs out of memory
Q. Can I use JFR to profile the native executable at runtime?
Q. Can I create native executables for Windows?
Q. Can I follow this tutorial if I’m running MacOS or Windows?
Q. Generating flame graphs is slow, or produces errors, what can I do?
Q. I think I’ve found a bug in native-image, how can I debug it with the IDE?
Q. Can I use JFR/JMC to debug to profile native binaries?

Once the locations have been agreed, I'll work on the PR and we can refine the content there.

Thanks
Galder

Martin Kouba

unread,
Nov 24, 2021, 6:35:32 AM11/24/21
to gal...@redhat.com, Quarkus Development mailing list
Hi Galder,

I think that it would make more sense to call the new material a
"reference guide" and maybe even move some parts from the
https://quarkus.io/guides/building-native-image (which should be more or
less a basic tutorial describing how to build and test a native image).

Anyway, I'm looking forward to reading the new stuff!

Martin

Given the fact, that https://quarkus.io/guides/building-native-image is
more or less a simple
> --
> You received this message because you are subscribed to the Google
> Groups "Quarkus Development mailing list" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to quarkus-dev...@googlegroups.com
> <mailto:quarkus-dev...@googlegroups.com>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/quarkus-dev/0dde0a48-71e1-417d-8f6f-0056177f7c40n%40googlegroups.com
> <https://groups.google.com/d/msgid/quarkus-dev/0dde0a48-71e1-417d-8f6f-0056177f7c40n%40googlegroups.com?utm_medium=email&utm_source=footer>.

--
Martin Kouba
Software Engineer
Red Hat, Czech Republic

Georgios Andrianakis

unread,
Nov 24, 2021, 9:25:21 AM11/24/21
to Martin Kouba, Galder Zamarreno, Quarkus Development mailing list
I'm definitely looking forward to this and I agree with Martin that it should probably be some reference guide instead of a tutorial.

> separate guide, e.g. https://quarkus.io/guides/native-faqs?? Here's the
To unsubscribe from this group and stop receiving emails from it, send an email to quarkus-dev...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/quarkus-dev/ded43669-6dfb-8058-05f0-c2b5fceab217%40redhat.com.

Max Rydahl Andersen

unread,
Nov 26, 2021, 4:24:50 AM11/26/21
to gal...@redhat.com, Quarkus Development mailing list

+1000 to get this into Quarkus guides/docs.

/max

--
You received this message because you are subscribed to the Google Groups "Quarkus Development mailing list" group.
To unsubscribe from this group and stop receiving emails from it, send an email to quarkus-dev...@googlegroups.com.

gal...@redhat.com

unread,
Nov 30, 2021, 2:42:54 AM11/30/21
to Quarkus Development mailing list
Reference guide sounds good to me. I'll work on that.
Reply all
Reply to author
Forward
0 new messages