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

Incremental runs are worse than full runs #1721

Open
krausest opened this issue Jul 28, 2024 · 6 comments
Open

Incremental runs are worse than full runs #1721

krausest opened this issue Jul 28, 2024 · 6 comments

Comments

@krausest
Copy link
Owner

There are two kind of runs:

  • Full runs. For a new chrome version I'm running all frameworks on my machine. The first night only the keyed implementations and when that looks good the second night the non-keyed implementations. Before running the keyed implementations I'm rebooting and stopping all the helpers (BetterDisplay, OneDrive, Karabiner Elements), stopping the search index (sudo mdutil -i off /), and making sure that there are no active apps running on the machine (other browser instances, VSCode etc.)
  • Incremental runs. For updated implementations I'm running vanillajs and the updated implementations. I'm stopping all active applications, but neither rebooting nor stopping the helper apps. vanillajs serves as a reference whether the achievable performance looks right. Sometimes it doesn't. It's often the case that results are worse than in a full run.

This issue tracks the impact of the measures for the full run. Maybe we can work out what's causing the effect.

@krausest
Copy link
Owner Author

For the first update since chrome 127 I decided to prepare the machine like for a full run. Results are pretty close and show how much noise is in the measurement.
Left incremental run, right last official run:
Screenshot 2024-07-28 at 09 05 53

@krausest
Copy link
Owner Author

With indexing enabled and on battery, every else like like in a full run. A bit slower!
Screenshot 2024-07-28 at 12 29 23

@krausest
Copy link
Owner Author

Once again, with indexing disabled and on AC:
Screenshot 2024-07-28 at 13 10 10
Really hard to tell if that's better than the last one. Nevertheless the full run was slightly better...

@krausest
Copy link
Owner Author

krausest commented Aug 2, 2024

Just running create 1k rows for vanillajs, but with 40 iterations for the following cases:

  1. Firefox, Chrome, Mail, Notes, Onedrive, Betterdisplay, VSCode, Preview, Settings
  2. Firefox, Chrome, Mail, Notes, Onedrive, Betterdisplay, Preview, Settings
  3. Only: Onedrive, Betterdisplay
  4. No Apps running, Onedrive stopped, Betterdisplay stopped
  5. After Rebooting: No Apps running, everything stopped except indexing
  6. After Reboot: No Apps running, everything stopped incl. indexing

Screenshot 2024-08-02 at 20 41 13

The results aren't as clear as I hoped.

@krausest
Copy link
Owner Author

krausest commented Aug 2, 2024

Huh. There was one case missing. Running on AC, all above was on battery

  1. Battery: Firefox, Chrome, Mail, Notes, Onedrive, Betterdisplay, VSCode, Preview, Settings
  2. Battery: Firefox, Chrome, Mail, Notes, Onedrive, Betterdisplay, Preview, Settings
  3. Battery: Only: Onedrive, Betterdisplay
  4. Battery: No Apps running, Onedrive stopped, Betterdisplay stopped
  5. Battery: After Rebooting: No Apps running, everything stopped except indexing
  6. On AC: After Rebooting: No Apps running, everything stopped except indexing
  7. Battery: After Reboot: No Apps running, everything stopped incl. indexing
    Screenshot 2024-08-02 at 20 53 06

So, running on AC instead of on battery is the key. I really thought the mac was immune to that.
Full runs were always on battery, incrementals runs were often on battery.

@robbiespeed
Copy link
Contributor

I wonder if there's any variation caused from some incremental runs executing on efficiency cores. I know I've seen it a fair amount on Linux with my intel cpus when running benchmarks, so I use something like taskset -c 0-7 program [args] to set affinity to only performance cores.

The closest ability I found for macos is taskpolicy -c utility program [args], from what I've read that should favour p-cores, but still has a chance to run on e-cores. From a clean boot with no other programs it'll likely run on p-cores anyway, so I'd expect full runs to be safe.

Or maybe no runs are happening on the e-cores anyway and mac being a holistic platform just has really good defaults for cpu affinity handling out of the box.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants