-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
File watching for sync is very slow on Mac OS #8166
Comments
Hi @corporealshift , thank you for reporting this. I cannot run this config.. could you please provide a minimal reproducible project? |
We have similar experience on Windows, it now takes skaffold 2.0.3 literally minutes to detect changes even on initial "skaffold debug" command run if previously it was almost instant. I have launched resource monitor and noticed that skaffold now scans binaries listed in ".dockerignore" file, we have gigabytes of binaries there which can explain the slowdown, plus anti-virus kicks in and makes it even slower. Seems to be some kind of regression when using docker to build images and ".dockerignore" is now not processed properly? |
Same issue here with v2.0.3 in multiple services using Skaffold |
@ericzzzzzzz This issue is still occurring in Skaffold v2.7.1 on Windows. My setup has Skaffold watching 15 Dockerfiles, and when the Dockerfiles use I've confirmed foresterLV's findings with an ugly rewrite of my Dockerfiles to explicitly only copy the files I want (i.e. not using a .dockerignore file), and Skaffold syncs files in less than a second. For some reason, I still see logs about changes in the .git directory, for some reason, but at least file sync is usable again! Since the .git directory is not referenced, even indirectly, in the Dockerfile, perhaps there's more than one bug at play here? Can we reopen this issue, or do you want a new one to be created? (I started to do so, but found I was just copy-pasting most of the contents of this one, which wasn't helpful!) |
Hi, @chammond-tz , thank you for providing the additional information, could you please check if this also happens on other OS? If the issue is window specific, I'd like to open a new issue. |
I don't have easy access to a Linux or MacOS machine, but I have created a git repo that can reproduce the problem: https://github.com/chammond-tz/skaffold-sync-issue Can you use this to verify that all platforms are affected (as I believe they are)? To use:
|
I'm seeing similar behavior from skaffold v.2.8.0 on MacOS, namely
|
|
Expected behavior
Syncing files previously would notice changes in a few seconds (or less).
Actual behavior
Since upgrading to version v2.0.2 it takes 15 seconds or more to notice files to sync. During this time the skaffold process consumes an entire core of CPU power (100% in activity monitor). Once the "Syncing 1 file to..." message gets posted to the console the CPU usage goes down.
Information
Steps to reproduce the behavior
skaffold dev -vdebug
The text was updated successfully, but these errors were encountered: