Skip to content
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

Orbstack slow with Mutagen #718

Open
lewisvoncken opened this issue Nov 7, 2023 · 8 comments
Open

Orbstack slow with Mutagen #718

lewisvoncken opened this issue Nov 7, 2023 · 8 comments
Assignees
Labels
bug Something isn't working docker-images
Milestone

Comments

@lewisvoncken
Copy link

lewisvoncken commented Nov 7, 2023

Version of Warden

0.14.1

Operating System and Installation Method

MacOS Sonoma 14.0

Image

mutagen

Describe the Bug

Combining Warden with Orbstack can be faster without Mutagen enabled.

To Reproduce

No response

Expected Behavior

No response

Additional context

orbstack/orbstack#430

@lewisvoncken lewisvoncken added bug Something isn't working docker-images labels Nov 7, 2023
@bap14
Copy link
Contributor

bap14 commented Nov 7, 2023

I haven't seen any sluggish performance using Mutagen. I'd like to see some performance stats showing the difference between Orbstack bind mounts versus Mutagen sync. Not saying I don't believe them, but there are multiple reasons why performance could be an issue with Mutagen (e.g. anti-virus).

@navarr A good QOL update would be to have a flag for projects to disable it. Something like:

if [[ $OSTYPE =~ ^darwin && ${WARDEN_MUTAGEN:-1} -eq 1 ]]; then

@lewisvoncken
Copy link
Author

lewisvoncken commented Nov 8, 2023

@bap14

Mutagen is also stuck on 'Scanning Files' on a MacBook m1 chip

I disabled Mutagen completely which solved the issue.

I use it combined with Magento 2 Environment type.

Disable Mutagen and use default volumne mount

rm environments/magento2/magento2.darwin.yml

commands/env.cmd

#if [[ $OSTYPE =~ ^darwin ]]; then
#    export MUTAGEN_SYNC_FILE="${WARDEN_DIR}/environments/${WARDEN_ENV_TYPE}/${WARDEN_ENV_TYPE}.mutagen.yml"

#    if [[ -f "${WARDEN_HOME_DIR}/environments/${WARDEN_ENV_TYPE}/${WARDEN_ENV_TYPE}.mutagen.yml" ]]; then
#        export MUTAGEN_SYNC_FILE="${WARDEN_HOME_DIR}/environments/${WARDEN_ENV_TYPE}/${WARDEN_ENV_TYPE}.mutagen.yml"
#    fi

#    if [[ -f "${WARDEN_ENV_PATH}/.warden/environments/${WARDEN_ENV_TYPE}/${WARDEN_ENV_TYPE}.mutagen.yml" ]]; then
#        export MUTAGEN_SYNC_FILE="${WARDEN_ENV_PATH}/.warden/environments/${WARDEN_ENV_TYPE}/${WARDEN_ENV_TYPE}.mutagen.yml"
#    fi

#    if [[ -f "${WARDEN_ENV_PATH}/.warden/mutagen.yml" ]]; then
#        export MUTAGEN_SYNC_FILE="${WARDEN_ENV_PATH}/.warden/mutagen.yml"
#    fi
#fi

@MagePsycho
Copy link

@lewisvoncken
I am also having a performance issue because of mutagen.

Disable Mutagen and use default volumne mount

Can you please elaborate on how you are syncing in such case?

@navarr navarr added this to the Warden 0.15 milestone Jan 3, 2024
@navarr navarr self-assigned this Jan 3, 2024
@lewisvoncken
Copy link
Author

@MagePsycho
@navarr

Here is a pull request

#747

@bap14
Copy link
Contributor

bap14 commented Feb 7, 2024

@lewisvoncken I left a comment on the PR, but the approach in the PR is the wrong approach. It forces everyone to use a bind mount even if they're not using OrbStack. The more appropriate approach would be to make Mutagen an optional service like Elasticsearch or Blackfire so those running OrbStack can disable Mutagen while those running Docker Desktop can run Mutagen.

Cc. @navarr

@joseluisi4
Copy link

I have created a PR to make the use of Mutagen optional in the Warden configuration .env: #749

Cc. @navarr @bap14 @lewisvoncken

@bap14
Copy link
Contributor

bap14 commented Feb 16, 2024

@joseluisi4 I added a couple comments.

@duikb00t
Copy link

duikb00t commented Mar 27, 2024

I have the same issue, for example when I change a composer.json file on my own filesystem and I access the container, I notice that both files are not the same. Running mutagen start/stop doesn't help.

Connecting traefik to clo_default network
Connecting tunnel to clo_default network
Connecting mailhog to clo_default network
[+] Running 10/10
 ✔ Container clo-elasticsearch-hq-1                                                                                                                                Started                                                                                    13.3s 
 ✔ Container clo-elasticsearch-1                                                                                                                                   Started                                                                                    13.4s 
 ✔ Container clo-redis-1                                                                                                                                           Started                                                                                    13.2s 
 ✔ Container clo-rabbitmq-1                                                                                                                                        Started                                                                                    13.3s 
 ✔ Container clo-db-1                                                                                                                                              Started                                                                                    13.3s 
 ! elasticsearch-hq The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm64/v8) and no specific platform was requested                                                                                             0.0s 
 ✔ Container clo-php-fpm-1                                                                                                                                         Started                                                                                    11.6s 
 ✔ Container clo-php-debug-1                                                                                                                                       Started                                                                                    11.3s 
 ✔ Container clo-nginx-1                                                                                                                                           Started                                                                                    11.2s 
 ✔ Container clo-varnish-1                                                                                                                                         Started                                                                                    11.0s 
Created session sync_sxwmLFn5e3FyAANlzzk7STcsMliWV7hsNVN1zWfSFqM                
Waiting for initial synchronization to complete
...................................................................................................................................................................................................................................................................................................................................................................................................................................................................................

This takes a very very long time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working docker-images
Projects
Status: 📋 Backlog
Development

No branches or pull requests

6 participants