-
Notifications
You must be signed in to change notification settings - Fork 844
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
Running tests on an M1 Mac/ARM builds of Chrome #885
Comments
Yeah I have one as well. MacBook Air M1. Exact same problem. All the slowdowns are bad. They lead to a performance drop off progression. You can see even with 2x or 4x slowdown that each subsequent run gets slower. Just at 16x it is insane, like 10seconds + per test run. I was hoping this was just a chrome driver thing that would go away, but had this problem in 89 and in 90. I have just been turning off slowdowns completely locally so I can get consistent-ish results even if technical subframe results are a bit variable. So yes very much real. |
I also couldn't resist and bought a MacBook Air M1. Just as a rant: It's really a lovely machine, though I started to realize how much I should have loved my linux based Razer Blade 15 after I found that the MacBook isn't perfect neither (even its great touchpad). All the possibilities in Linux make me aim for perfection but only leave me disappointed. But I really enjoy working with the Razer much more since I started to use both 😄 I saw the same effect. The CPU slow down isn't comparable and much slower than on linux. But I even saw that when switching between linux and windows on the Razer Blade 15. I'm a bit afraid of CPU throttling due to the fact that the MacBook has no fan (for anything but benchmarks this is of course a great feature). I'm a bit hesitating to publish results for the MacBook since results won't be comparable. A possibility would be to temporarily remove all CPU slowdowns to allow a better comparison and add other slowdowns when we decide that we migrate back to a Mac. |
If anyone wants to try: The build currently doesn't work with arm64 node builds (e.g. dojo fails when it tries to install electron-v7.1.14-darwin-arm64.zip). It worked when I used an intel node version (I used v14.15.5). I can't remember exactly how I installed the Intel version of node, maybe I used the "rosetta terminal" trick from https://dev.to/courier/tips-and-tricks-to-setup-your-apple-m1-for-development-547g. |
I put a preview on https://krausest.github.io/js-framework-benchmark/2021/table_chrome_90_osx.html and https://krausest.github.io/js-framework-benchmark/2021/table_chrome_90_linux.html |
I tend to not run the whole test suite as Im always focused on specific implementations. I have not seen throttling but I only run maybe 3-4 frameworks at a time. No slowdown feels too variable for the results. Having Vanilla out front but with a 1.06 score is strange compared to what we've been looking at tge last 2 years. While maybe our current scores are a bit artificial due to slowdown there is a clear order of things. Selection especially. |
CPU throttling must be taken care of. My current hypothesis is that I can check if some throttling happens by watching: |
And it looks like the battery and ac powered performance is the same (take that AMD). |
I think I made a mistake. Chromedriver ist by default still x64 which also opens Chrome in x64 mode. There are already apple silicon builds for it: https://chromedriver.storage.googleapis.com/index.html?path=90.0.4430.24/ So far I only got it work when I:
I'll report back with with apple silicon chrome numbers. |
The benchmark is currently not very stable. I see often cases with a "soundness check failed". |
This might be one of the oddest things I've seen with webdriver yet (and I've seen some...)
Of course in the terminal I can see that runbenchmark is logged for all numbers from 0 to 11. But the perf log is missing loop1! |
Looks like I can avoid this issue when I disable site-isolation with the following flag for chrome |
There are two other errors that sometimes occur:
|
With a lot of fiddling I managed to get results for m1 chromedriver and chrome. The reported values are amazing (but I have to admit that they are faster than what I see in the timeline when manually testing). The odd thing is that in the timeline create 1,000 rows for vanillajs looks pretty consistently like that: Please let me investigate before drawing the conclusion that M1 is so much faster. |
Chrome on OSX/M1 is really driving me nuts. I have now all extensions disabled. There are two way to start recording a timeline:
Once again I've no idea why there's a difference between both, but I tend to believe # 2 |
Conclusion for today:
Any opinions on that? |
Building react-focal fails for node v16.2.0 (M1), but works with v14.15.5 (x64).
|
Here are the results for chrome 91 on M1: https://krausest.github.io/js-framework-benchmark/2021//table_chrome_91.0.4472.77_osx_m1.html Good news: No more obscure bugs (no soundness errors - i.e. number of events in performance log inconsistent, no missing click events) |
Sadly node-chromedriver still doesn't download the M1 build automatically. The following in webdriver-ts works for me such that a chrome arm64 process is used for the benchmark:
(It's a bit strange - I played with CHROMEDRIVER_FILEPATH and CHROMEDRIVER_SKIP_DOWNLOAD, but they didn't seem to change the behaviour in comparison to the above). |
As you've probably noticed I currently really consider switching to puppeteer and I created a puppeteer branch. At first glance puppeteer runs much smoother on OSX (no issues with missing clicks with site-isolation, no memory leaks, less workarounds, ...). That's nice, but there's still the issue mentioned above. Here's the trace from puppeteer: Currently it seems that I can reproduce results in the 45 msecs range when I open the profiler and click on the "start profiling and reload page" button. When I just load the page, open the dev tools and start tracing with the record button I often get a result that's almost twice as long: When I just reload the page and keep dev tools closed and just click on the append button the hack prints numbers in the 80 msecs range only. I have never seen a 45 msec result on the console unless I'm running in the "start profiling and reload page" button or running with the puppeteer driver. OTOH even when I run chrome with my default profile and let puppeteer connect with the running chrome instance I'm not sure whether we can consider the 45 msecs range as correct. What's your opinion on that? |
#1020 made me implement four different benchmark drivers. I've run the full benchmark for OSX: https://krausest.github.io/js-framework-benchmark/2022/table_chrome_101_osx.html I'm closing this issue. OSX results look good enough such that I could make the switch, but I'm not sure if I want to block my MacBook regularly. The long runtime hurts less on the less loved linux laptop. |
Has anyone tried running the benchmarks on an M1 Mac yet? What I’m seeing is that 16x slowdowns are disproportionately slow compared to intel, such that it almost seems like the tests are just hanging, even on VanillaJS the first run of benchmarks 03_ and 04_ seem to take forever.
MacBook Pro (13-inch, M1, 2020)
macOS Big Sur Version 11.2.2
Google Chrome Version 90.0.4430.93 (Official Build) (arm64)
The text was updated successfully, but these errors were encountered: