Comments (11)
Seems that while M1 Pro has 10 cores, only 8 are "high performance" cores available for virtualisation (my understanding).
In sysctl -a
we can see:
hw.ncpu: 10
…
hw.perflevel0.physicalcpu: 8
hw.perflevel0.physicalcpu_max: 8
hw.perflevel0.logicalcpu: 8
hw.perflevel0.logicalcpu_max: 8
On older Intel Mac:
hw.ncpu: 8
…
hw.perflevel0.physicalcpu: 4
hw.perflevel0.physicalcpu_max: 4
hw.perflevel0.logicalcpu: 8
hw.perflevel0.logicalcpu_max: 8
from dotrun.
to:
TOTAL_CPUS=$(sysctl -n hw.perflevel0.logicalcpu)
seems to work, but I don't know how backwards compatible it is with other Macs.
from dotrun.
@jkfran can you help triage this one pls
from dotrun.
Changing
to:
TOTAL_CPUS=$(sysctl -n hw.perflevel0.logicalcpu)
seems to work, but I don't know how backwards compatible it is with other Macs.
I am happy about doing this change. So, did you check that sysctl -n hw.perflevel0.logicalcpu
works on Intel Macs?
from dotrun.
I am happy about doing this change. So, did you check that
sysctl -n hw.perflevel0.logicalcpu
works on Intel Macs?
Yes, this is working on Intel Macs (with latest macOS version), I can later check on older mac with older macOS to be sure (if we care about that).
from dotrun.
@jkfran so, it works on latest macOS (Monterey) both on M1 and Intel.
It does not work on old macOS (Mojave 10.14.6). It is couple years old OS and I don't know since when the hw.perflevel0.logicalcpu
was introduced.
Maybe it would be possible to do sysctl -n hw.perflevel0.logicalcpu
OR sysctl -n hw.ncpu
? I'm not sure how to make conditionals in bash script in such way.
The other way would be not specify number of CPUs at all and let multipass use the default. Why we are not using the default? It is too small?
from dotrun.
TOTAL_CPUS=$(sysctl -n hw.perflevel0.logicalcpu || sysctl -n hw.ncpu)
maybe?
This will still show error message when sysctl -n hw.perflevel0.logicalcpu
fails I guess, but should still store correct value.
from dotrun.
@jkfran are you working on this issue?
from dotrun.
We discussed a v2 of dotrun based on Docker. Here are the meeting notes, so this issue shouldn't any longer apply.
I will notify everyone as soon as we get the first beta of dotrun v2.
from dotrun.
@jkfran are you actively working on this? If so, can you add estimate and epic please?
from dotrun.
I am closing this issue as it doesn't affect dotrun v2. Thank you!
from dotrun.
Related Issues (20)
- Add host mode option
- Cypress run fails
- Docker error about name conflict HOT 3
- Display available commands
- Error about port conflict (when docker container is already running in background) HOT 1
- specs.canonical.com gunicorn.error on M1 HOT 1
- Dockerpy is not pulling the latest image
- --node-module arg not available
- Updating the image is broken HOT 1
- Error: Entrypoint Permission denied
- No documentation on how to purge cache
- utf-8-validate: Command failed (Apple M1) HOT 5
- Error with the package django-openid-auth on M1 HOT 12
- The snap is huge HOT 2
- Add update checks
- Can't run multiple instances of the same project with dotrun v2 HOT 2
- Expose all the container ports HOT 1
- Error when passing specific params to `dotrun exec` command
- Ignored commands exit status
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dotrun.