-
Notifications
You must be signed in to change notification settings - Fork 194
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
RC15 TypeScript compile memory/cpu usage #149
Comments
thanks for your report. We are not using Typescript as you do, but run the octane-typescript benchmark. I don't see any peculiarity there. I will have to investigate on a setup more similar to yours. It would be helpful if you could share more details on how or what you run exactly. Are you explicitly using the code-sharing features of GraalVM (i.e., you start from Java, and create Source objects that you share between the Contexts)? Thanks, |
@wirthi Thanks for the response. Our actual setup is more complicated than this, but here is a good place to start, a test in Groovy (note the invocationCount):
Results of profiling with various vm args and using rc15:
|
Just writing back to share that due to such issues we've externalized our TypeScript compilation to avoid doing it within Graal. |
I'm running in to the same issue with a similar setup attempting to use the TypeScript compiler in GraalJS through Java code rather than groovy, it appears to be allocating a large amount of memory very quickly. Could you provide the details of how you run the octane typecript benchmark and configure Graal? |
Hi @nchoumitsky what behavior do you see exactly? Excessive memory usage that might leak, and/or slows down the execution; or do you just see the GraalVM process is using its maximum memory? In a system with a garbage collector you expect to see memory usage to fluctuate and even max out, until the Garbage Collector kicks in. See the blue line (actual objects allocated by the user application) vs green line (memory allocated by the process) in the I suspect it is the later - which would be totally fine, that's how Java is designed to work. You can specify the max memory for the java process by the Xmx flag, e.g. We have not published our exact harness for Octane for legal reasons, but the main thing we tweaked was to increase the number of iterations and separate warmup from measure iterations. Other than that, it's basically Best, |
@hashtag-smashtag you might want to try again with the latest release or nightly. I cannot reproduce the issues that you described. I ran similar code (though not using groovy) and the memory usage seems stable. If there was a bug, it might already be fixed. @nchoumitsky if you could provide some code that demonstrates the issue, we could take a closer look. |
Glad to hear it might be fixed, but we changed our architecture to not compile TS within the Graal JVM, as mentioned above, almost 2 years ago :) |
I believe I had around 2GB in my heap when I was running it, I didn't see any GC issues just a large amount of memory allocation. One of the differences between my setup and your Octane harness might be that I'm running on the stock JDK and not GraalVM? I can attempt to pull my test case out of my current project and come up with a smaller repro that includes all of the exact flags & versions of things I'm using. |
@hashtag-smashtag ok, I guess this issue can be closed then. :) |
@nchoumitsky The Octane Typescript benchmark is using a rather old version of the typescript compiler, so it's not really comparable. The amount of memory used may actually be normal (IIUC it does not leak); I can't really say without knowing more about your case and how you measured. If you think there's an issue, please create a new github issue with a test case. Thanks! |
Here's our setup:
This was working well for us, but with RC15 we're seeing:
We see issues with both
-XX:-UseJVMCINativeLibrary
and-XX:+UseJVMCINativeLibrary
The text was updated successfully, but these errors were encountered: