Skip to content

[GR-52400] Native: Introduce flag to favor build time improvements at the cost of using more resources and vice versa #8468

Closed as not planned
@zakkak

Description

@zakkak

Feature request

Introduce flag to favor build time improvements at the cost of using more resources and vice versa.
As discussed in quarkusio/quarkus#38968

Is your feature request related to a problem? Please describe.

In the past we have used GraalVM flags in Quarkus that result in worse build times for native executables in order to reduce the system resources used at build time, e.g. quarkusio/quarkus#21018.

I recently noticed that GraalVM is doing something similar when it comes to configuring the JVM that runs the native image generator, which leads to slower build times when using GraalVM for JDK 21 and GraalVM for JDK 17, in comparison to using the older GraalVM 22.3, in exchange to using less memory at build time.

Although this makes sense in some environments it's a waste of time and resources (as they just stay idle) in others, e.g. in GH runners were we run a single build per runner so we are OK with it using as much memory as possible.

Describe the solution you'd like.

Provide an option like --resource-usage=<dedicated|shared> (as suggested by @fniephaus) that will tell the native image generator how to utilize system resources.

Describe who do you think will benefit the most.

Everyone.

Describe alternatives you've considered.

The alternative we have considered (other than hand-tuning the native image generator) is to implement this in the frameworks (as proposed in quarkusio/quarkus#38968).

Additional context.

@fniephaus suggested discussing this in a Native Image Committer and Community Meeting.

Express whether you'd like to help contributing this feature

Yes.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions