-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
[GR-41680] High memory consumption with debug info generation enabled #5294
Comments
@adinn anything obvious to you that could help to reduce memory consumption? |
On aarch64 even for EE, CE debuginfo generation is used. As of now this code is not much optimized to use as little memory as possible. Obviously @adinn would be the best person to look into this. |
@olpaw @lewurm I do know that debug info generation uses a lot of memory. I am not at all clear how much room there is for cutting it down to size. However, as @olpaw says, there has been no real effort so far to optimize this code for space so there is a good chance we can make some immediate savings that are significant (I am bound to have made some dumb design choices :-). I'll start by measuring the scale of the problem with a few different target apps and try to identify where there is room for savings and how to proceed. |
@lewurm I had problems following your instructions to build graalpy on x86_64
Do I have to build it on AArch64? Or is this some problem with the build? |
Sorry for that @adinn. Can you try |
@lewurm No problem. We now appear to be cooking with gas. |
Thank you for looking into it! I can confirm that your PR reduces the memory consumption significantly. Numbers:
While previously it would run out of memory (16gb max heap). |
@lewurm Thanks for testing it. I was about to report the same outcome on x86_64. Before and after runs both completed. However, the memory stats for the compile phase show a very noticeable drop in the amount of data being generated. Before
After
|
@adinn should we close this ticket? Or do you want to keep it open until you have explored other options as mentioned e.g. in #5436 (comment) |
Describe the issue
We can't build
graalpy
with a heap of 16G when debug info is enabled.Steps to reproduce the issue
Please include both build steps as well as run steps
Describe GraalVM and your environment:
More details
Without
-g
max RSS is "only" about 10G. Here is a stack trace with the versions specified above:Example No. 1
Here is an example that happened on
graal-enterprise
:Example No. 2
This one is on
graal-enterprise
too, but instead of running out of time the watch dog shuts down. Not 100% sure if related, but it feels like it:Example No. 3
The text was updated successfully, but these errors were encountered: