High CPU Usage
Potentially related issues:
- https://github.com/redhat-developer/vscode-java/issues/2734
- https://github.com/redhat-developer/vscode-java/issues/3387
This extension destroys my cpu usage and all the recommendations in those two threads have failed.
My setup:
- VS Code Remote extension
- AL2 instance
- RedHat version v1.36.0
The command of the largest process is:
/home/arusignu/.vscode-server/extensions/redhat.java-1.36.0-linux-x64/jre/17.0.13-linux-x86_64/bin/java
--add-modules=ALL-SYSTEM
--add-opens java.base/java.util=ALL-UNNAMED
--add-opens java.base/java.lang=ALL-UNNAMED
--add-opens java.base/sun.nio.fs=ALL-UNNAMED
-Declipse.application=org.eclipse.jdt.ls.core.id1
-Dosgi.bundles.defaultStartLevel=4
-Declipse.product=org.eclipse.jdt.ls.core.product
-Djava.import.generatesMetadataFilesAtProjectRoot=false
-DDetectVMInstallationsJob.disabled=true
-Dfile.encoding=utf8
-DwatchParentProcess=false
-XX:+UseParallelGC
-XX:GCTimeRatio=4
-XX:AdaptiveSizePolicyWeight=90
-Dsun.zip.disableMemoryMapping=true
-Xmx3G
-Xms100m
-Xlog:disable
-XX:+HeapDumpOnOutOfMemoryError
-XX:HeapDumpPath=/home/arusignu/.vscode-server/data/User/workspaceStorage/4a284380c823b70cb2d621c30898f2d8/redhat.java
-Daether.dependencyCollector.impl=bf
-jar /local/home/arusignu/.vscode-server/extensions/redhat.java-1.36.0-linux-x64/server/plugins/org.eclipse.equinox.launcher_1.6.900.v20240613-2009.jar
-configuration /home/arusignu/.vscode-server/data/User/globalStorage/redhat.java/1.36.0/config_linux
-data /home/arusignu/.vscode-server/data/User/workspaceStorage/4a284380c823b70cb2d621c30898f2d8/redhat.java/jdt_ws
--pipe=/run/user/22366284/lsp-d372c76bc679ed73a377c6a781c99796.sock
Happy to provide more info on request
For context, I was previously relying on the guidance here and it was working. But as of today it is not.
I'm being relatively quick to post this issue bc the underlying bug was never fixed, only covered up by the settings changes in the thread above. For clarity, every time I created a new workspace I would have to manually change those settings and pray my machine didn't crash before I got there. And now, even that workaround doesn't seem to be working. This is a critical flaw and this extension should take seriously the abuse of users' system resources that has crashed at least 3 of my machines and who knows how many others.
It happened to me sometimes
@tonyrusignuolo @iwangbowen Could you attach a project example?
Hey @snjeza ! It's literally any Java Maven project. I don't have any workspaces that aren't using corporate code, but I could check one out tomorrow and attach whatever logs you need. Lmk what info would help from there and I'll provide it tomorrow
the same
Same Issue here.
This consistently happens in non-Java projects and unmanaged java projects. I haven't tested it with maven/gradle. Even if VsCode is closed the Code Helper (Plugin) process sometimes remains.
The reason I believe it's caused by this extension is that force-quitting the process triggers a warning about the Java Language server. If there are any reproduction steps I can take to help you debug this please let me know
我找到了解决暂时的方案,把进程设置强制的cpu占用率:sudo cpulimit -e java -l 20