High CPU usage
See original GitHub issueBug
Although no garden CLI commands are hanging, multiple processes are causing high CPU usage.
No garden dev
commands were executed, only garden deploy
using the kubernetes
provider (cluster on GKE).
.gardenignore
files are also used to ignore folders like node_modules
. Is there a way to check how many/which files are watched, as this might be the cause of the high CPU usage?
Some garden deploy
executions seem to be stuck in the beginning on the provider step, before starting the deployment. After canceling the command, the process probably keeps on running.
Your environment
- OS: MacOS Big Sur 11.6
- How I’m running Kubernetes: GKE
garden version
0.12.29
Issue Analytics
- State:
- Created 2 years ago
- Comments:10
Top Results From Across the Web
What is CPU usage, and how to fix high CPU usage
High CPU usage is often the cause of bad performance. Your computer may be affected by this problem if you're experiencing long loading ......
Read more >How to Fix High CPU Usage (with Pictures) - wikiHow
1. Press .Ctrl+ Shift+Esc to open the Task Manager. This is a utility that monitors and reports on all of the processes and...
Read more >How to Lower CPU Usage - NinjaOne
What are common fixes for high CPU use? How to lower CPU usage in Windows 10; How to lower CPU usage when gaming...
Read more >How to Lower CPU Usage: Common Causes & Tips - N-able
The symptoms of high CPU usage are familiar: the cursor moves jerkily and slowly, and applications begin to lag or shut down.
Read more >Guidance for troubleshooting high CPU usage - Windows Server
Keep in mind that you can expect CPU usage to increase as a process or an application serves requests. However, if you consistently...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
We’ve built a custom version of Garden with extra logging and came to the following conclusion:
Our project.garden.yaml file contained the following config:
We started with
.gitignore
but needed some extra excludes as we also have sub (module).gitignore
files. We added some of these more specific ignores to a.gardenignore
file.However, this causes the function
getFiles()
incore/src/vcs/git.ts
to behave differently, due to this if-condition: https://github.com/garden-io/garden/blob/master/core/src/vcs/git.ts#L272Some “intersection” logic is executed, calling a comparison function: https://github.com/garden-io/garden/blob/master/core/src/vcs/git.ts#L294
When adding logs, an infinite loop seemed to be present:
As multiple ignore files in the garden config clearly complicate the execution, we just eliminated the
.gardenignore
file again:FYI, contents of the deleted
.gardenignore
file were:Which explains why
.dockerignore
and.DS_Store
files were listed in the logs, although our.gitignore
file does ignore them. This “multiple ignore file” and intersection logic can be tricky for an end user. It feels like adding an extra ignore file should just be an extra safety, whereas an extra ignore file with only few ignored lines can cause a heavy comparison.As a conclusion: we have a valid workaround by just specifying 1 ignore file. However, the infinite loop could still be solved to improve the “multiple ignore file” setup.
This issue has been automatically marked as stale because it hasn’t had any activity in 90 days. It will be closed in 14 days if no further activity occurs (e.g. changing labels, comments, commits, etc.). Please feel free to tag a maintainer and ask them to remove the label if you think it doesn’t apply. Thank you for submitting this issue and helping make Garden a better product!