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

Make starting pushers faster during start up #4991

Merged
merged 3 commits into from Apr 2, 2019

Conversation

2 participants
@erikjohnston
Copy link
Member

commented Apr 2, 2019

We start all pushers on start up and immediately start a background
process to fetch push to send. This makes start up incredibly painful
when dealing with many pushers.

Instead, let's do a quick fast DB check to see if there may be push to
send and only start the background processes for those pushers. We also
stagger starting up and doing those checks so that we don't try and
handle all pushers at once.

erikjohnston added some commits Apr 2, 2019

Make starting pushers faster during start up
We start all pushers on start up and immediately start a background
process to fetch push to send. This makes start up incredibly painful
when dealing with many pushers.

Instead, let's do a quick fast DB check to see if there *may* be push to
send and only start the background processes for those pushers. We also
stagger starting up and doing those checks so that we don't try and
handle all pushers at once.

@erikjohnston erikjohnston requested a review from matrix-org/synapse-core Apr 2, 2019

@richvdh

richvdh approved these changes Apr 2, 2019

Copy link
Member

left a comment

lgtm

@@ -0,0 +1 @@
Reduce CPU usage starting pushers during start up.

This comment has been minimized.

Copy link
@richvdh

richvdh Apr 2, 2019

Member

s/misc/feature/?

@codecov

This comment has been minimized.

Copy link

commented Apr 2, 2019

Codecov Report

Merging #4991 into develop will decrease coverage by <.01%.
The diff coverage is 52.38%.

@@             Coverage Diff             @@
##           develop    #4991      +/-   ##
===========================================
- Coverage    60.64%   60.63%   -0.01%     
===========================================
  Files          332      332              
  Lines        34242    34253      +11     
  Branches      5657     5658       +1     
===========================================
+ Hits         20766    20770       +4     
- Misses       12003    12008       +5     
- Partials      1473     1475       +2

@erikjohnston erikjohnston merged commit 3039d61 into develop Apr 2, 2019

3 of 10 checks passed

buildkite/synapse Build #775 started
Details
buildkite/synapse/isort Started...
Details
buildkite/synapse/pep-8 Started...
Details
ci/circleci: sytestpy2merged Your tests are queued behind your running builds
Details
ci/circleci: sytestpy2postgresmerged Your tests are queued behind your running builds
Details
ci/circleci: sytestpy3merged Your tests are queued behind your running builds
Details
ci/circleci: sytestpy3postgresmerged Your tests are queued behind your running builds
Details
buildkite/synapse/newspaper-newsfile Passed (13 seconds)
Details
buildkite/synapse/packaging Passed (15 seconds)
Details
buildkite/synapse/pipeline Passed (2 seconds)
Details

@erikjohnston erikjohnston added this to In progress in Homeserver Task Board via automation Apr 4, 2019

@erikjohnston erikjohnston moved this from In progress to Done in Homeserver Task Board Apr 4, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.