Keka icon indicating copy to clipboard operation
Keka copied to clipboard

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

Open gingerbeardman opened this issue 3 years ago • 17 comments

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

  • Cormorant https://eclecticlight.co/2020/12/11/cormorant-now-supports-drag-and-drop-and-can-run-ten-times-faster/

gingerbeardman avatar Apr 28 '22 11:04 gingerbeardman

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 avatar Apr 28 '22 12:04 aonez

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

aonez avatar Apr 28 '22 12:04 aonez

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.

gingerbeardman avatar Apr 28 '22 12:04 gingerbeardman

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

aonez avatar Apr 28 '22 12:04 aonez

Is the difference less stark when using Apple Archive?

gingerbeardman avatar Apr 28 '22 12:04 gingerbeardman

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

aonez avatar Apr 28 '22 13:04 aonez

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

gingerbeardman avatar Apr 28 '22 13:04 gingerbeardman

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

aonez avatar Apr 29 '22 07:04 aonez

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.

gingerbeardman avatar Apr 29 '22 16:04 gingerbeardman

@gingerbeardman when are you receiving your M1 equipped Mac?

aonez avatar May 03 '22 07:05 aonez

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

gingerbeardman avatar May 03 '22 10:05 gingerbeardman

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.

aonez avatar May 04 '22 13:05 aonez

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

gingerbeardman avatar May 04 '22 20:05 gingerbeardman

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

gingerbeardman avatar Jun 08 '22 14:06 gingerbeardman

@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 🥹

aonez avatar Jun 13 '22 09:06 aonez

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!

gingerbeardman avatar Jun 13 '22 19:06 gingerbeardman

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 avatar Jun 13 '22 20:06 aonez

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.

aonez avatar Oct 24 '22 07:10 aonez

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

gingerbeardman avatar Oct 24 '22 15:10 gingerbeardman

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

aonez avatar Oct 25 '22 11:10 aonez