Skip to content

Decrease linter's memory usage - #1217

Merged
ulucinar merged 2 commits into
crossplane-contrib:release-0.47from
ulucinar:release-0.47-fix-linter
Mar 18, 2024
Merged

Decrease linter's memory usage#1217
ulucinar merged 2 commits into
crossplane-contrib:release-0.47from
ulucinar:release-0.47-fix-linter

Conversation

@ulucinar

@ulucinar ulucinar commented Mar 15, 2024

Copy link
Copy Markdown
Collaborator

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 <ulucinar@users.noreply.github.com>
@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 <ulucinar@users.noreply.github.com>
@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

@sergenyalcin sergenyalcin left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thanks @ulucinar LGTM!

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