-
Notifications
You must be signed in to change notification settings - Fork 74
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
[For discussion] Memory management: Disable JIT compilation #1678
base: master
Are you sure you want to change the base?
Conversation
- Proposal for a new icon
I'm not sure about the garbage collection strategy. I wouldn't set a custom limit for the JVM size, because the limit normally depends on the system underneath and less on the application you execute. |
You know that saying: "Don't optimize yet". Before we don't know what's going on, we should not fiddle with such options (in my opinion). |
This is not a code optimization, this is just some packaging options. They do not affect the développer settings and they do not require any change. Even though, after deeper analasys, our average heap consumption is very good (~100Mb), so I do not expect @madouar optimization to change anything. What takes a lot of memory is the code cache, especially when the JIT compiles nashorn code. At this point, it puts some compiled code that won’t ever be used again in memory. Another thing that consumes memory is the difference between the java heap size and the used size. |
See, this is exactly what I was talking about: If you now figured out that the JIT compilation for Nashorn is causing this behavior of the allocated memory, we can optimize the JVM args accordingly. Any ideas which Javascript code exactly is producing the unused code cache? Is there a way we could avoid this without touching the garbage collection settings? |
This is a suspicion. In fact it is really hard to profile memory. At the end, when I run PoM with -Xint takes 160Mo at startup of memory with -Xlint and 250Mo without. However, it is wayyyy slower |
Personally, I would prefer fast vs big in that case. In the end, I have enough memory. |
It depends what is slow. For example, if you take a python program, it is way slower than a Java program and no one bother |
"Slower" in the context of an application like Phoenicis makes only sense if it means "you can feel it". |
I agree with @plata, we're not developing a real time game but a management application. |
This is the problem we have to deal with. Performance is not a real issue, memory footprint is (POLv4 shows 70-80Mo of memory at worst whereas POLv5 can go up to 600Mo) The differences is that POLv4 is "cheating" because it uses a lot of external processes that are not taken into account |
If you think it is caused by the Javascript JIT: Can you turn off all Nashorn calls and see what happens? |
I'm basically fine with using a specific garbage collection algorithm, which fits to our current implementation, but I'm asking myself: Do we need to tackle this issue now? |
I agree to this point. |
We don't need to tackle this issue now, but we need to get proof the we can tackle this issue later |
I think you provided the proof, didn't you? Apart from this: If this is really Nashorn JIT, it might behave completely different with Graal. |
I'm not convinced for the moment |
I'm confident that we will find some solution. After all, we don't do anything crazy here. So whatever it is should be possible to fix. |
@qparis this PR has a merge conflict with the master branch. In addition I'm not sure about the current state of the performance of Phoenicis are there any changes that are introduced to Java 12 (or 13 in the future) and is there anything we can do as the developers of Phoenicis? |
This merge request adds few JVM options when package the app. They need to be discussed because they can have some impact.