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

add temp CI job to test syspolicy impact #422

Merged
merged 1 commit into from Jul 14, 2020
Merged

add temp CI job to test syspolicy impact #422

merged 1 commit into from Jul 14, 2020

Conversation

abathur
Copy link
Contributor

@abathur abathur commented Jul 9, 2020

Starting in Catalina, macOS runs a syspolicyd "assessment" that hits the network for each binary/script executable. It does cache these results, but Nix tends to introduce many "new" executables per build. (You can read more about this at NixOS/nix#3789).

This PR adds a temporary, redundant macOS job with these assessments disabled. I'm hoping you can adopt it for a few weeks to help me collect more data on how this affects real projects.

Starting in Catalina, macOS runs a syspolicyd "assessment" that hits the network for each binary/script executable. It does cache these results, but Nix tends to introduce many "new" executables per build. (You can read more about this at NixOS/nix#3789).

This PR adds a temporary, redundant macOS job with these assessments disabled. I'm hoping you can adopt it for a few weeks to help me collect more data on how this affects real projects.
@junjihashimoto
Copy link
Member

@abathur Thx!
I think we can try this pr in builds other than nix.

@abathur
Copy link
Contributor Author

abathur commented Jul 9, 2020

@junjihashimoto Not certain how to interpret this :)

Are you saying you are not willing to try this with the nix build?

Are you asking me to also apply this to stack-macos.yml as well?

My interest is specifically to evaluate how it is impacting Nix builds, but I don't mind a quick edit to add one for the stack-macos job.

@junjihashimoto
Copy link
Member

@abathur Sorry for late reply.
I think that not only nix-build but general macos builds will be more efficient. Is it different?

@junjihashimoto
Copy link
Member

I merge this pr for benchmark.

@junjihashimoto junjihashimoto merged commit 58e9fc8 into hasktorch:master Jul 14, 2020
@abathur
Copy link
Contributor Author

abathur commented Jul 14, 2020

@abathur Sorry for late reply.

No worries.

I think that not only nix-build but general macos builds will be more efficient. Is it different?

I'm not sure how big the effect will be. I would guess so, but a few of the builds I'm collecting so far actually show the non-assessed builds as slower at the moment. I'm not really sure why. I'm surprised, but I'm trying to avoid looking at the data too much until samples build up a bit. :)

@junjihashimoto
Copy link
Member

I have only seen two cases, but it seems that this does not improve the performance, but worsens it.

@abathur
Copy link
Contributor Author

abathur commented Jul 31, 2020

The data is pretty noisy, unfortunately.

It looks like I have 12 samples collected for hasktorch/hasktorch, and another 87 I collected (by enabling hourly tests on my fork for a few days to get more samples). Hasktorch has actually been one of the largest performance improvements in that sample, but some projects definitely appear to be unaffected or even slower.

I haven't quite puzzled out what's going on, but I've been picking at it when I have a little time.

My own project has been consistently, demonstrably faster on all 3 macbooks I have access to with the assessments disabled, but I've observed basically no difference with github actions. I had started to suspect that maybe Apple mitigated the impact of the issue in 10.15.5 (because I did all of the initial testing on 10.15.4, but all of the runs I've collected in CI have been after the 10.15.5 roll-out), but I took a little time this past week to prove that I was still seeing the difference locally.

I need to circle back to build some separate tests to sanity check the assessment behavior on CI.

If the job is causing you any delay or trouble, feel free to revert/remove it.

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

Successfully merging this pull request may close these issues.

2 participants