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

Decrease linter's memory usage #1217

Merged

Conversation

ulucinar
Copy link
Collaborator

@ulucinar ulucinar commented Mar 15, 2024

Description of your changes

The linter CI job is currently broken in the actively maintained release-0.47 branch. The PR attempts to get it running again by decreasing its memory footprint. For a detailed analysis and the techniques used in this PR, please see #1194, and for a follow-up discussion, please see #1211.

I've reduced the concurrency of both phases to 1, increased the job's timeout to 90m and configured a more aggresive garbage collector by setting the GOGC to 50 for the release-0.47 branch after a series of experiments, where the parameters we used for the main branch did not perform well. At some point, we may also need to deploy these more aggressive parameters to the main branch as there should, currently, not be meaningful difference between the memory requirements of the linter runner between branches main & release-0.47, assuming we have not missed to backport any related change from the main branch. But the linter runner's peak memory consumption is currently on the edge but I suspect this could be a quality-of-service issue with the available hosted runners.

I have:

  • Read and followed Crossplane's contribution process.
  • Run make reviewable to ensure this PR is ready for review.
  • Added backport release-x.y labels to auto-backport this PR if necessary.

How has this code been tested

Changes proposed here have been tested on a cold-cache here.

Signed-off-by: Alper Rifat Ulucinar <[email protected]>
@ulucinar ulucinar force-pushed the release-0.47-fix-linter branch 4 times, most recently from 7485368 to 20ad5fc Compare March 16, 2024 01:03
- Set GOGC to 50% for both lint phases
- Set linter runner timeout to 90min

Signed-off-by: Alper Rifat Ulucinar <[email protected]>
@ulucinar ulucinar force-pushed the release-0.47-fix-linter branch 2 times, most recently from 12e1c33 to cf4d34c Compare March 18, 2024 15:20
Copy link
Collaborator

@sergenyalcin sergenyalcin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @ulucinar LGTM!

@ulucinar ulucinar merged commit 94484cb into crossplane-contrib:release-0.47 Mar 18, 2024
21 checks passed
@ulucinar ulucinar deleted the release-0.47-fix-linter branch March 18, 2024 16:23
@ulucinar ulucinar mentioned this pull request May 24, 2024
3 tasks
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