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

[REQ] Allow selection of E or P cores on Apple Silicon via QoS #1087

Closed
gingerbeardman opened this issue Apr 28, 2022 · 20 comments
Closed

[REQ] Allow selection of E or P cores on Apple Silicon via QoS #1087

gingerbeardman opened this issue Apr 28, 2022 · 20 comments

Comments

@gingerbeardman
Copy link
Contributor

gingerbeardman commented Apr 28, 2022

Is your feature request related to a problem? Please describe

On Apple Silicon Macs, apps can run on either Efficiency or Performance cores.

Apps can assign themselves and their processes to either type of core via QoS.

https://eclecticlight.co/2022/01/07/how-macos-controls-performance-qos-on-intel-and-m1-processors/

Describe the solution you'd like

  • Option in Keka to select E or P cores only when running on Apple Silicon.

Describe alternatives you've considered

@gingerbeardman gingerbeardman changed the title [REQ] Allow selection of E or P cores on Apple Silicon via QOS [REQ] Allow selection of E or P cores on Apple Silicon via QoS Apr 28, 2022
@aonez
Copy link
Owner

aonez commented Apr 28, 2022

Thanks @gingerbeardman. Always interesting to read eclecticlight. Since lately I'm working hard with Swift I've tried a lot of qos on iOS.

Keka is using all the available cores right now (E and P). Using just one of those will result in slower tasks (specially using the E ones). What will be the benefit for you? Or what idea or case of use do you have in mind?

@aonez aonez added the core label Apr 28, 2022
@aonez aonez added this to the Look at milestone Apr 28, 2022
@aonez
Copy link
Owner

aonez commented Apr 28, 2022

Correction, just checked that compression and extraction of  Archive in Keka is done using only the performance cores.

@gingerbeardman
Copy link
Contributor Author

It would be great to be able to specify only E cores for power saving. I don't mind it taking longer when battery is more important.

@aonez
Copy link
Owner

aonez commented Apr 28, 2022

This is the same operation on top running only on efficiency cores and on bottom on all cores. Obviously this is a big file and with the slowest option of 7Z. For smaller files and faster options the difference will not be that big.

Screenshot 2022-04-28 at 14 42 41

@gingerbeardman
Copy link
Contributor Author

Is the difference less stark when using Apple Archive?

@aonez
Copy link
Owner

aonez commented Apr 28, 2022

Indeed, the same operation takes 4 seconds on performance and 26 seconds on efficiency. Still amazed with this format.

@gingerbeardman
Copy link
Contributor Author

Excellent, my M1 MBP is yet to arrive. But I'm ready for it!!!

@aonez
Copy link
Owner

aonez commented Apr 29, 2022

Still not sure about this. Same test as above (AAR 2.68 file), CPU history and energy impact.

Anyway, here a test version that runs tasks in background priority (efficiency cores on M1). No toggle, just compare it to the regular Keka version: Keka-QoS-9

Efficiency

eficiency
eficiency_hist

Performance

performance
performance_hist

@gingerbeardman
Copy link
Contributor Author

gingerbeardman commented Apr 29, 2022

https://twitter.com/howardnoakley/status/1520073629861560325

They’re doing it right, but Energy Impact is junk: at QoS 9, the E cores will be limited to less than 1 GHz, but the Energy Impact graph isn’t aware of that. In general Activity Monitor etc. don’t monitor core frequency yet.

https://twitter.com/howardnoakley/status/1520074477899550721

Also worth noting that no QoS can limit to only P cores - the choice is (P and E) or (E only). Depending on other workload, threads could readily be loaded on E cores even at maximum QoS. They might also benefit from increasing max threads to 10, if not already.

@aonez
Copy link
Owner

aonez commented May 3, 2022

@gingerbeardman when are you receiving your M1 equipped Mac?

@gingerbeardman
Copy link
Contributor Author

This month. It was delayed 5–7 weeks and already 3 weeks have passed.

@aonez
Copy link
Owner

aonez commented May 4, 2022

Already did a test build: Keka-v1.3.0-dev.r4979

Screenshot 2022-05-04 at 15 42 32

I've just sold my M1 MacBook Air (just 8GB or RAM wasn't enough) so I'll be unable to test this again for a while.

@gingerbeardman
Copy link
Contributor Author

My MBP will have 16GB, fingers crossed that's enough for my usage. Should be!

@gingerbeardman
Copy link
Contributor Author

My M1 laptop has arrived, let me know what you want me to test.

@aonez
Copy link
Owner

aonez commented Jun 13, 2022

@gingerbeardman I wanted to check just that all options worked as expected. Just use it as you will and let me know if you find anything strange.

Loving your M1 already? I'm missing my Air a lot 🥹

@gingerbeardman
Copy link
Contributor Author

gingerbeardman commented Jun 13, 2022

Been using Keka M1 for the last week.

The M1 Pro MBP is very good, though I use it with an external display keyboard and mouse so the main difference I am noticing is SPEED!

M1 Pro is 2 to 3 times faster than my Intel Mac mini. Feels more than that!

@aonez
Copy link
Owner

aonez commented Jun 13, 2022

M1 Pro is 2 to 3 times faster than my Intel Mac mini. Feels more than that!

yup! I’m yet again using a 2018 Mac mini and even if it has 32GB of RAM compared to the Air’s 8GB the M1 felt a lot faster. Also the integrated Intel graphics are awful in 4K resolutions.

Did you picked any special M1 configuration or the entry Pro?

@aonez aonez modified the milestones: Look at, 1.2.57 Oct 24, 2022
@aonez
Copy link
Owner

aonez commented Oct 24, 2022

Going to push this one in the next release. I was waiting for more upgrades for a 1.3 release, but the iOS version is taking so much time right now and this feature is very handy.

@gingerbeardman
Copy link
Contributor Author

gingerbeardman commented Oct 24, 2022

Cool, I do use it occasionally.

Did you picked any special M1 configuration or the entry Pro?

I upped the spec to M1 Pro, 10CPU/14GPU/16ANE cores, 16GB RAM, 1TB SSD.

My main rendering workflow when from 25 minutes of locked up full fan Intel, to 9 minutes of pleasant to use M1 Pro.

  Model Name:	MacBook Pro
  Model Identifier:	MacBookPro18,3
  Chip:	Apple M1 Pro
  Total Number of Cores:	10 (8 performance and 2 efficiency)
  Memory:	16 GB

  Chipset Model:	Apple M1 Pro
  Type:	GPU
  Bus:	Built-In
  Total Number of Cores:	14

@aonez
Copy link
Owner

aonez commented Oct 25, 2022

I'm just wishing for Apple to release M2 MacBook Pro's already...

@aonez aonez closed this as completed Oct 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants