-
Notifications
You must be signed in to change notification settings - Fork 808
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
Use a larger runner for tests #889
Conversation
.github/workflows/ci.yaml
Outdated
# TODO(zanieb): The runner labels should be changed to include the OS and | ||
# templated here or moved to the matrix depending on how we | ||
# want things to display | ||
labels: astral-8-core |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Before merge, an organization admin (@charliermarsh) needs to change the name of this runner to ubuntu-latest-large-8
or similar.
The macOS runners are named "macos-latest-large" and "macos-latest-xlarge". We could consider just using "ubuntu-latest-large" for consistency in our workflow and change the number of cores in the admin panel as needed. A consistent name would make it really easy for us to have just the OS in the matrix.
Since this only includes the test runtime, and not the compile time, we wouldn't expect an 82% speed overall right? Just looking at the cost analysis, which seems to assume one. (I still think it's fine.) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What would you like the name change to be precisely
@charliermarsh sorry that's not clear. All of the test run numbers include the compile time. I only listed the compile time separately to help see how much of the change was related to that. We should expect about an 82% improvement for compilation and testing. If we look at the total runtime of the job it's probably actually more like 70% overall runtime improvement (since setup isn't significantly faster) which comes out to ~$100 projected for January. |
|
I renamed |
Omg it's so fast. Note for posterity, there are larger runners e.g. 16, 32, and 64 core machines that I didn't bother testing. 1m seems good enough. |
😍 |
Alternative to #875. Instead of partitioning tests across multiple runners via nextest, we use a larger GitHub Actions runner. Additionally, we explore using nextest to take advantage of the increased number of cores.
On the 8-core machine, nextest is 22% faster than insta. In combination with the vastly more readable output, I think this means we should switch over. As noted in #875 we lose the ability to detect unreferenced snapshot files but since we inline all of our snapshots this shouldn't matter.
Benchmarks
The following are the runtime of just the test portion of the test job in GitHub Actions except the partitioned case from #875 which requires a separate build step making runner overhead relevant.
The compile times are noted as a reference as a possible lower bound of test times. The compile time is included in all of the test times shown.
Where the nextest thread count is not noted, it is inferred from the CPU count.
Cost
We must pay per-minute costs for these runners:
[source]
The per-minute rates are as follows:
[source]
The per-minute cost increases by 4x but the workflow is 5.2x faster since we are making use of the extra compute. We will not get any free minutes executing these runners once the repository is public. Additionally, we will not make use of our 3,000 minutes / month of included minutes. Using the 8-core machines, the included 3,000 minutes should account for approximately ~$100.
Here's a brief analysis of costs from the last few
We can reduce costs (once public) by disabling larger runners for non-organization users e.g. PrefectHQ/prefect#9519