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

proxy: reduce some per-task memory usage #8095

Merged
merged 2 commits into from
Jun 19, 2024

Conversation

conradludgate
Copy link
Contributor

@conradludgate conradludgate commented Jun 18, 2024

Problem

Some tasks are using around upwards of 10KB of memory at all times, sometimes having buffers that swing them up to 30MB.

Summary of changes

Split some of the async tasks in selective places and box them as appropriate to try and reduce the constant memory usage. Especially in the locations where the large future is only a small part of the total runtime of the task.

Also, reduces the size of the CopyBuffer buffer size from 8KB to 1KB.

In my local testing and in staging this had a minor improvement. sadly not the improvement I was hoping for :/ Might have more impact in production

Checklist before requesting a review

  • I have performed a self-review of my code.
  • If it is a core feature, I have added thorough tests.
  • Do we need to implement analytics? if so did you add the relevant metrics to the dashboard?
  • If this PR requires public announcement, mark it with /release-notes label and add several sentences in this section.

Checklist before merging

  • Do not forget to reformat commit message to not include the above checklist

Copy link

github-actions bot commented Jun 18, 2024

3222 tests run: 3105 passed, 0 failed, 117 skipped (full report)


Code coverage* (full report)

  • functions: 32.4% (6831 of 21071 functions)
  • lines: 49.9% (53213 of 106642 lines)

* collected from Rust tests only


The comment gets automatically updated with the latest test results
405df23 at 2024-06-18T17:05:41.766Z :recycle:

@conradludgate conradludgate marked this pull request as ready for review June 18, 2024 21:11
@conradludgate conradludgate requested a review from a team as a code owner June 18, 2024 21:11
@conradludgate conradludgate requested a review from khanova June 18, 2024 21:11
proxy/src/serverless.rs Show resolved Hide resolved
@conradludgate conradludgate merged commit b998b70 into main Jun 19, 2024
73 checks passed
@conradludgate conradludgate deleted the proxy-reduce-memory-2024-june branch June 19, 2024 12:34
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