mui / toolpad

Toolpad: Full stack components and low-code builder for dashboards and internal apps.
https://mui.com/toolpad/
MIT License
1.27k stars 282 forks source link

Investigate docker performance improvements #989

Closed bytasv closed 1 year ago

bytasv commented 2 years ago

Duplicates

Latest version

Summary 💡

As per findings and discussion in https://github.com/mui/mui-toolpad/pull/859#discussion_r968872635 we should try to investigate if it's possible to improve docker performance for Macbook CPUs architecture

Examples 🌈

No response

Motivation 🔦

Seems that M1/M2 CPUs have to use AMD emulation which causes significant performance degradation

oliviertassinari commented 2 years ago

We could pick this back up at some point: https://github.com/mui/mui-toolpad/pull/618

I'm wondering if it's the real problem though. I'm on M1 and don't see the same behavior. appsmith and Toolpad hum along on Docker just fine for me.

Perhaps we can try and build an image on your laptop to verify that it works better?

@Janpot Ok, so maybe it's an issue with how I have Docker configured.

Janpot commented 2 years ago

Ok, so maybe it's an issue with how I have Docker configured.

To verify I'd build an image locally:

docker build \
  --progress plain \
  -t muicom/toolpad:testing-local \
  -f ./docker/images/toolpad/Dockerfile \
  .

It should ensure it's been built for your architecture. Then run it with

TAG=testing-local docker-compose -f docker/compose/docker-compose.yml up

And see if it burns your CPU. If it does we should probably look into your docker setup.

oliviertassinari commented 2 years ago

It should ensure it's been built for your architecture.

@Janpot Ok, I have tried your steps. I don't get the amd64 warning

Screenshot 2022-09-14 at 16 17 41

and it's a lot faster.

I assume the root problem is that https://hub.docker.com/r/muicom/toolpad/tags would need linux/arm, like https://hub.docker.com/_/node/tags, https://hub.docker.com/_/postgres/tags, https://hub.docker.com/r/airbyte/server/tags