-
Notifications
You must be signed in to change notification settings - Fork 180
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
plugin is eating CPU and RAM under Linux x86_64 #1434
Comments
I have the same issue on macOS. Extension2.26.1, also tried rolling back to 2.25.4, but no improvement. VS Code
Operating System
Terraform Version
|
I must add that using an external language server works much better. $ ~/.vscode/extensions/hashicorp.terraform-2.26.1-darwin-x64/bin/terraform-ls version
0.31.2
platform: darwin/amd64
go: go1.19.9
compiler: gc
$ sha256sum ~/.vscode/extensions/hashicorp.terraform-2.26.1-darwin-x64/bin/terraform-ls
93c891074fcde4cda7437df5d43605ac5a6140d62e1e210cc72dd0c66f68ca46 /Users/username/.vscode/extensions/hashicorp.terraform-2.26.1-darwin-x64/bin/terraform-ls
$ /usr/local/bin/terraform-ls version
0.31.2+Homebrew
platform: darwin/amd64
go: go1.20.4
compiler: gc
$ sha256sum $(readlink -fn /usr/local/bin/terraform-ls)
a036370b6dbe80e352142e6cf12e60314700539b8557ba5119937a48fbbe77f0 /usr/local/Cellar/terraform-ls/0.31.2/bin/terraform-ls |
We intend to further investigate the performance issues, although the realistic expectation to set here is that amount of memory and CPU will generally always be proportional to the size of the workspace being processed, number of providers used etc., not static. In the interest of transparency (and hope of building some empathy on all sides), I will say that we have not yet invested much effort into optimising for the higher end of workspace sizes. Identifying the different scales (esp. the higher end) and measuring how different parts of the language server behave under those scales is what we plan to do as part of hashicorp/terraform-ls#1056 We will also reach out to you all as part of that work. @libfitz the most likely reason it may look that the community-compiled server available from Homebrew works "better" is because it does not provide the same functionality the official packages do through embedding provider schemas and baking in API keys for module source completion in the Terraform Registry. If you have none or only few root modules (those which have been initialised via The only workaround for the moment is to avoid opening large workspaces and rather open individual folders nested within the tree, or at least smaller part of the tree. I appreciate this may not be the answer you're looking for, but I hope the context is helpful. |
We know this has been a frustrating experience and appreciate your understanding while we gathered feedback and examples to diagnose this issue. We've created #1557 as a central place to see updates on what we are doing to address performance issues in terraform-ls in both the short and long term and pinned it to the repo. We'll be adding more detail there as we implement fixes. As we work on this we'll be recording the content and then closing the individual issues so that everyone has one place to look at instead of searching for individual tickets for updates. |
We've released With the fix, we should be back to terraform-ls If you have the time, please give it a try and let us know how it works for you. Please open a new issue rather than replying here, as this issue has gotten so many replies with different experiences it is hard to process. I am going to close this as we're using #1557 as a central tracking issue, so subscribe to that to see continued updates. |
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. |
Versions
Extension
VS Code
Operating System
Terraform Version
Steps To Reproduce
htop
ortop
orps
or any other OS diagnosticsExpected Behavior
CPU and RAM usage has a slight yet negligible increase.
Actual Behavior
CPU gets close to 100% on all cores.
RAM usage goes above 12 GB (I have 24 luckily)
System fans spin noisily
The process(es) called
.vscode/extensions/hashicorp.terraform-2.26.1-linux-x64/bin/terraform-ls serve
eat a lot of resources.Additional context
Closing the editor panel with terraform code is not enough.
Closing the editor window (I have other ones but woth no terraform code) is enough to bring the system to normal.
I have tried also the pre-release version with no luck.
The text was updated successfully, but these errors were encountered: