-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
[jb] configure vmoptions for intellij backend server #10175
Conversation
Maybe we should look into more generic solution to allow customisations for different JVMs than introducing an env var for everything? Maybe we could use one env var instead like |
I looked into
And here are some thoughts:
Suggestions:
jetbrains:
// default for all
vmoptions: "-XX:MaxRAMPercentage=50.0 -Dgtw.disable.exit.dialog=true"
intellij:
// override or prepend -Xmx for intellij
vmoptions: "-Xmx6g"
goland:
// override or prepend -Xmx for goland
vmoptions: "-Xmx4096m" |
It sounds good |
I've updated the changes. PTAL again @akosyakov 🙏 During the VMOptions investigation I wrote a post about the bootstrap process of a IntelliJ IDE workspace: |
@iQQBot do you think you can help @yaohui-wyh how to setup self-hosted solution to test PRs? |
I can help if you need @yaohui-wyh |
I test the PR on Gitpod SaaS. PTAL @akosyakov 🙏 The test plan is to use a Gitpod workspace (with intellij backend server) to build the
Expected behavior:
|
func updateVMOptions(alias string, content string) string { | ||
// inspired by how intellij platform merge the VMOptions | ||
// https://github.com/JetBrains/intellij-community/blob/master/platform/platform-impl/src/com/intellij/openapi/application/ConfigImportHelper.java#L1115 | ||
filterFunc := func(l, r string) bool { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why it is not part of deduplicateVMOption?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To make it easier to have finer control over the type of VMOptions to dedup. Currently, only memory-related VMOptions (-Xmx
/ -Xms
, etc.) are handled, however, if we need to deal with VMOptions such as GC-related by another feature toggle (e.g. a separate env var). Putting all filter logic into deduplicateVMOption is a bit messy.
It's similar to updateVMOptions
(https://github.com/JetBrains/intellij-community/blob/master/platform/platform-impl/src/com/intellij/openapi/application/ConfigImportHelper.java#L1068) from the Intellij codebase
/werft run 👍 started the job as gitpod-build-local-fork.1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
@yaohui-wyh Do you want to add it to .gitpod.yml? |
Hi Anton! Do you mean adding to |
I mean first adding it to gitpod.yml schema and actually making use of it. Then everything else. |
Thanks, I get it. Yeah I would add the vmoptions config to One thing to mention, I think users can already make use of it now by specifying variables for a project. However, add the option to project-wide |
.gitpod.yml is to share across all users of the project, it can be overridden by user env vars |
Description
-XX:MaxRAMPercentage
(follows jb: java perf monitoring #9796 ) for better resource usage in a containerized env/ide-desktop/status
and make it easier for future vmoptions optimizationsRelated Issue(s)
Related #8704
How to test
Test manually at #8704 (comment)
Release Notes
Documentation