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

[Question]: Oceanbase docker cpu utilization is high in macos. #27

Open
1 task done
kevinbin opened this issue Feb 12, 2023 · 2 comments
Open
1 task done

[Question]: Oceanbase docker cpu utilization is high in macos. #27

kevinbin opened this issue Feb 12, 2023 · 2 comments
Assignees

Comments

@kevinbin
Copy link

kevinbin commented Feb 12, 2023

Please check the issue list for the same question

  • Please try full text in English and attach precise description.

Describe your question

image

docker run -p 2881:2881 --name obstandalone -e MINI_MODE=1 -d oceanbase/oceanbase-ce

Server version: OceanBase_CE 4.0.0.0 (r100000272022110114-6af7f9ae79cd0ecbafd4b1b88e2886ccdba0c3be) (Built Nov 1 2022 14:53:48)

Software:

System Software Overview:

  System Version: macOS 12.4 (21F2081)
  Kernel Version: Darwin 21.5.0
  Boot Volume: Macintosh HD
  Boot Mode: Normal
  Secure Virtual Memory: Enabled
  System Integrity Protection: Enabled
  Time since boot: 49 days 3 minutes

Hardware:

Hardware Overview:

  Model Name: MacBook Air
  Model Identifier: Mac14,2
  Chip: Apple M2
  Total Number of Cores: 8 (4 performance and 4 efficiency)
  Memory: 16 GB
  System Firmware Version: 7459.121.3
  OS Loader Version: 7459.121.3
@dimstars
Copy link

dimstars commented Mar 7, 2023

We reproduced the above scenario. In the monitor of macos, the docker process takes up about 130% of the cpu. If we execute top command in docker, we can see only 60% cpu usage. This is close to the overhead of a physical machine. Hope this solves your problem.
image

image

@xros
Copy link

xros commented Apr 2, 2023

I think the problem is that on you Apple Silicon Mac, @kevinbin you were using qemu to emulate the x86_64 CPU which ran your x86_64 docker instances on the ARM64 Mac. The performance of emulation is very different from virtualization, especially for Macintosh Computers with ARM64 chips. Docker Desktop for ARM64 Macs will emulate x86_64 instructions using qemu.

Within your Docker Desktop App on your Mac, in the settings you can try to switch on or off of the button of the "Apple Virtualization Framework". Because "Apple Virtualization Framework" is not opensource and there will always be some problems for its Apple Silicon Chips to run x86_64 instructions on the ARM64 chip. If you switch to use x86_64 CPU, the efficiency could be better. You can try to run a same ARM64 docker instance with "Apple Virtualization Framework" being enabled, the performance will better comparing to the same x86_64 docker instance.

@hnwyllmm hnwyllmm transferred this issue from oceanbase/oceanbase Jun 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants