M1 Apple Silicon for Chess?

Discussion of anything and everything relating to chess playing software and machines.

Moderators: hgm, Dann Corbit, Harvey Williamson

Forum rules
This textbox is used to restore diagrams posted with the [d] tag before the upgrade.
George Sobala
Posts: 24
Joined: Sat Feb 03, 2018 1:42 pm
Location: Yorkshire, England

Re: M1 Apple Silicon for Chess?

Post by George Sobala » Sat Feb 20, 2021 12:38 pm

Cfish did about 96.4G nodes down to 5% battery. I'll post the more detailed stats later.

Looking at the output, it is obvious that whilst depth is the most important outcome, depth from a single search is not a very good indicator, due to the shape of the curve: it takes longer and longer to add a bit of depth, so discrimination diminishes.

Instead I have made up a couple of batch files (bash for macos and linux, and a windows cmd script file) that run the in-built Stockfish /or Cfish benchmarks with a user nominated number of threads to a predetermined depth, loop, and count the number of loops that can be achieved. I have chosen depth 27 as it takes 1-2 minutes per loop or so on a powerful system, and exercises the engines a bit better than shorter defaults. The output is also stored in a file. Benchmark output to the console is suppressed as Windows in particular does not cope with the speed very well.

Here is the Linux / MacOS version: store it as e.g. battery.sh and run using "bash battery.sh" in the directory containing the engine.

Code: Select all

#!/bin/bash
echo Please input number of threads to use:
read threads
loops=0
echo Test starting ... using $threads threads >battery-output.txt
echo Terminate test using Control-c
while [ true ] ; do
  echo $loops loops completed at `date`
  echo $loops `date` >>battery-output.txt
  ./stockfish bench 64 $threads 27 >/dev/null 2>&1
  let loops+=1
done
Here is the Windows version: store as e.g. battery.cmd and run in the directory containing the engine using ".\battery.cmd"

Code: Select all

@echo off
SET /P threads=Please input number of threads to use:
SET /A loops=0
ECHO Test starting ... using %threads% threads. > battery-output.txt
ECHO Terminate test using Control-c
:loop-mark
	IF %loops% leq 10000000 (
		ECHO %loops% %DATE% %TIME% >> battery-output.txt
		ECHO %loops% completed at %DATE% %TIME% 
		.\stockfish bench 64 %threads% 27 >null 2>&1
		SET /A loops+=1
		GOTO :loop-mark
	)
Obviously to use Cfish rather than stockfish change "stockfish" to "cfish".

You are welcome on Intel or AMD to try hyperthreading on or off to see which is better. You can also try using fewer threads than your maximum e.g. 1 but whilst your battery will last longer, the background constant-rate battery drain will mean that you are likely to see overall worse performance.

Alayan
Posts: 516
Joined: Tue Nov 19, 2019 7:48 pm
Full name: Alayan Feh

Re: M1 Apple Silicon for Chess?

Post by Alayan » Sat Feb 20, 2021 12:51 pm

George Sobala wrote:
Sat Feb 20, 2021 10:53 am
Worth trying then, will give an idea of the effect of throttling on the MBA.

HOWEVER with regards to cross-system comparisons I have just realised, silly me, that of course the key outcome parameter is depth, not nodes. Using hyperthreads on an Intel / AMD system may possibly give a marginal depth improvement compared to hyperthreading off, but a lot of those extra nodes are wasted.

I will dig out my final depth stats from the Stockfish run when I finish my current CFish run, which by my estimate will be in about 90 minutes.
With more threads, strength at equal nodes goes down, but strength at equal depth goes up.

Ckappe
Posts: 39
Joined: Sun Feb 14, 2021 10:50 am
Full name: Rütger Andersen

Re: M1 Apple Silicon for Chess?

Post by Ckappe » Sat Feb 20, 2021 2:03 pm

AlexChess wrote:
Sat Feb 20, 2021 7:16 am
Which are the rules for the 60G test? Starting position? I could use the just released Stockfish 13 (but homebrew compilation still call it 12 :o ) on my Mac mini M1 that has 8 CPU (MacBook Air 7) and a fan to avoid throttling :)
It was just for fun. The way I did was running stockfish 13 (avx2) on my AMD 5900 laptop* running infinite analysis from start pos. Just to prove that the only benchmark this poster could think of that the M1 would beat a modern computing laptop is was this constructed test where he recorded the nodes searched in SF when the M1 had gone from 100% to 5%. I reached the same position after 1/3 of the time and with 50% battery left on my laptop. Granted the machine I did the test on is far more expensive than the Apple M1 laptops (but not more expensive than the most expensive laptops Apple still have in its range) and weights more (has a 15inch big dual-screen + larger battery and a 3080 RTX card and 64GB stuffed in (weights 2.4 kg). My smaller 4800 laptop is currently at my parents so I can't test on that one. But I suspect that one also will do better than the M1, with some battery settings tweaked. I just ran the test with windows in balanced mode, silent fans.. without any further tweaks in my test.

Compared to the M1 (don't know really if he used air or pro) .. the conclusion is that you can get analyze the same amount of positions and have more battery left on a modern AMD laptop compared to an Apple M1. based laptop. But as I have stressed I don't see a practical point of this constructed benchmark If. I want to run heavy analyzing, gaming I just plug my laptop but my business-class seat in and get 22-30Mnps in SF-Cfish.. or about 16-20knps on J84-100 in Lc0 with defaults (starting pos).

Apple M1: 60G pos analyzed 5% battery left. (3 hour taken)
AMD 5900H: 60G pos analyzed 51% battery left. (1 hour taken)

The convenience of gaming capacity as well as a richer library of chess programs, connectivity options are well worth the premium for me as a chess lover instead of Apple's more mobile-phone-tech-type laptops. If I go down in pricepoint to Apple's level I could still get a 20xx RTX with 4800 7nm CPU for a similar price that will be a better performing option for chess both SF, LC0, Chessbase, etc.

I persist in my view that Apple's ARM chips and laptops are overhyped, and do not bring anything to the performance/value game in the chess world currently. I hope Apple can do better in the future, but their track record on price/performance is frankly abysmal. And to me, it seems more like a religion than an actual tech-focus these days ;)
Last edited by Ckappe on Sat Feb 20, 2021 2:09 pm, edited 1 time in total.

Modern Times
Posts: 2702
Joined: Thu Jun 07, 2012 9:02 pm

Re: M1 Apple Silicon for Chess?

Post by Modern Times » Sat Feb 20, 2021 2:07 pm

Ckappe wrote:
Sat Feb 20, 2021 2:03 pm

I persist in my view that Apple's ARM chips and laptops are overhyped
That is true of all Apple products pretty much.
.

Opinions expressed here are my own, and not necessarily those of the CCRL Group.

BetaPro
Posts: 14
Joined: Wed Nov 25, 2020 6:11 pm
Full name: Jean-Roy Lee

Re: M1 Apple Silicon for Chess?

Post by BetaPro » Sat Feb 20, 2021 2:53 pm

George has an M1 Air that will throttle after ten minutes because it doesn't have a fan!

According to his previous benchmark, George gets 12 mnps on his M1 on about 6 actual cores with no hyper threading. If you only get 17 mnps on 8 cores/16 threads, I'd consider that a win for M1. I can't believe that I'm speaking against 5900H that I helped the development with.

And SF NNUE lost a ton of speed on M1, if it was classical SF, M1 would fair much much better.

Ckappe
Posts: 39
Joined: Sun Feb 14, 2021 10:50 am
Full name: Rütger Andersen

Re: M1 Apple Silicon for Chess?

Post by Ckappe » Sat Feb 20, 2021 3:08 pm

BetaPro wrote:
Sat Feb 20, 2021 2:53 pm
George has an M1 Air that will throttle after ten minutes because it doesn't have a fan!

According to his previous benchmark, George gets 12 mnps on his M1 on about 6 actual cores with no hyper threading. If you only get 17 mnps on 8 cores/16 threads, I'd consider that a win for M1. I can't believe that I'm speaking against 5900H that I helped the development with.

And SF NNUE lost a ton of speed on M1, if it was classical SF, M1 would fair much much better.
Well, it obviously did non bench 12mnps sustained when he ran it for a long-running bench on battery. the figures I wrote were non-tuned std compile downloaded, and similarly, I ran on battery-saving mode fanless. What's a win if you tweak your binaries for one CPU and not for the other? It seems you mix some static best-case benchmarks with real-world results. As long as it performs worse in the real world for me it's not a "win"... I could install Linux on my laptop and run a compile with sparse Ryzen MinGW and would probably get 25-30Mnps or more on the 5900 (that I could also overclock still).. so What is your point really.. Apples vs oranges?

Let's fraze it this way.

If I want the best possible mobile performing chess laptop in spring 2021 Apple is not an option, especially not the M1 models. Not leaders in neither price/performance nor actual performance.
Last edited by Ckappe on Sat Feb 20, 2021 3:22 pm, edited 1 time in total.

BetaPro
Posts: 14
Joined: Wed Nov 25, 2020 6:11 pm
Full name: Jean-Roy Lee

Re: M1 Apple Silicon for Chess?

Post by BetaPro » Sat Feb 20, 2021 3:22 pm

Ckappe wrote:
Sat Feb 20, 2021 3:08 pm
BetaPro wrote:
Sat Feb 20, 2021 2:53 pm
George has an M1 Air that will throttle after ten minutes because it doesn't have a fan!

According to his previous benchmark, George gets 12 mnps on his M1 on about 6 actual cores with no hyper threading. If you only get 17 mnps on 8 cores/16 threads, I'd consider that a win for M1. I can't believe that I'm speaking against 5900H that I helped the development with.

And SF NNUE lost a ton of speed on M1, if it was classical SF, M1 would fair much much better.
Well mit obviolsu did not do 12mnps sustained when he ran it for a long riunning bench on battery. the figures I worte was non-tuned std compile donwloaded, and sinliarily i ran on battery-saving mode fanless. Whats a win if you tweak your binaries for one CPU and not for the other? It seems you mix som static best-case benchmarks witrh real world results.. As long as it performs worse in the real world for me its not a "win"... I could install linux on my laptop and run a compile with sparse ryzen mingw and would probably get 25-30Mnps or more on the 5900 (that I could also overclock still).. so What is your point really.. Apples vs oranges?

Lets frase it this way..

If I want the best possible mobile performing chess laptop spring 2021 Apple is not an option, epseically not the M1 models.
If he had a M1 Pro 13 inch, it just wouldn't throttle at all and has quite a bit longer battery than the Air, and probably still costs less than the 5900H laptop.

As far as Linux goes, Stockfish is one of those instances where Linux doesn't run faster than Windows, from looking at all the Phoronix benchmarks.

And I doubt that you'd get more than 0.1 or 0.2 Ghz more from overclocking, and that just kills even more the battery.

Btw is this the one you got? https://uk.store.asus.com/asus-rog-zeph ... b013t.html

Ckappe
Posts: 39
Joined: Sun Feb 14, 2021 10:50 am
Full name: Rütger Andersen

Re: M1 Apple Silicon for Chess?

Post by Ckappe » Sat Feb 20, 2021 3:33 pm

BetaPro wrote:
Sat Feb 20, 2021 3:22 pm

If he had a M1 Pro 13 inch, it just wouldn't throttle at all and has quite a bit longer battery than the Air, and probably still costs less than the 5900H laptop.

As far as Linux goes, Stockfish is one of those instances where Linux doesn't run faster than Windows, from looking at all the Phoronix benchmarks.

And I doubt that you'd get more than 0.1 or 0.2 Ghz more from overclocking, and that just kills even more the battery.
Maybe you can run a test then, I guess that the battery will go down to 5% faster if you run with more power and cooling-fans on the pro and that the result will not that much better in the bench performed than he described. But instead of you guessing just do a real test -)

The AVX2 Abrok build does run 3-10% faster on Centos on my 3990X box compared to wn10 on the same box (dual boot). So I am not sure if you are mixing real life with static benchmarks again

And assuming you only run a laptop on battery 100% of the time is kind of irrelevant as well. I can certainly overclock more if I turn cooling on and plug in the 5900 laptops, (yupp similar specs but german version)

And we have not even started talking about GPU based engines yet, running on these laptops

BetaPro
Posts: 14
Joined: Wed Nov 25, 2020 6:11 pm
Full name: Jean-Roy Lee

Re: M1 Apple Silicon for Chess?

Post by BetaPro » Sat Feb 20, 2021 4:07 pm

Ckappe wrote:
Sat Feb 20, 2021 3:33 pm

Maybe you can run a test then, I guess that the battery will go down to 5% faster if you run with more power and cooling-fans on the pro and that the result will not that much better in the bench performed than he described. But instead of you guessing just do a real test -)

The AVX2 Abrok build does run 3-10% faster on Centos on my 3990X box compared to wn10 on the same box (dual boot). So I am not sure if you are mixing real life with static benchmarks again

And assuming you only run a laptop on battery 100% of the time is kind of irrelevant as well. I can certainly overclock more if I turn cooling on and plug in the 5900 laptops, (yupp similar specs but german version)

And we have not even started talking about GPU based engines yet, running on these laptops
Not benchmark, just Stockfish (still a benchmark I guess). Even on your workstation, Linux doesn't run significantly faster than Windows. And highly dependent on the compile and the specific machine most likely.

I don't have an M1 Mac yet, I'm still considering my next laptop purchase, highly likely it will be one of the next bigger MacBooks, those will absolutely crush, both single threaded and multi threaded.

Oh still curious is the ASUS Zeph the laptop you got? I wanna see some other 5900H alternatives.

AlexChess
Posts: 49
Joined: Sat Feb 06, 2021 7:06 am
Full name: Alex Mora

Re: M1 Apple Silicon for Chess?

Post by AlexChess » Sat Feb 20, 2021 6:32 pm

Yes, I know: a end-line Pc is still more powerful for graphics apps and games. But it is only the first Silicon ARM64 chip and my little 700$ Mac mini M1 on Geekbench 5 bechmarks reaches 60% of the score of the big 2000$ Tower Ryzen 3900x + AMD Radeon Pro WX7100 of my brother architect :D

PLUS I can run also Xplane 11 for Intel macOS 64 (thanks to Rosetta 2) that is very similar to Flight Simulator 2020 :wink:

Post Reply