Conversation
Member
Author
|
I'd recommend to any reviewers to at least go through the PR commit by commit first as each change is relatively logically independent. |
nickva
reviewed
Oct 24, 2019
nickva
reviewed
Oct 24, 2019
nickva
reviewed
Oct 24, 2019
fa3a2e9 to
879ebf3
Compare
nickva
reviewed
Jan 5, 2020
nickva
reviewed
Jan 5, 2020
Previous this test relied on delete/open requests getting things into a confused state. Now that we understand the issue we can replace the more complicated logic by directly polutnig couch_server's message queue with invalid messages.
Its not uncommon to have file_server_2 behaving poorly so we'll avoid it when there are calls that are made often.
Even when disabled these logs can take a non-trivial amount of reductions which can add extra suspensions to couch_server's main loop.
We can track the open latencies from the async_open process so that couch_server does not have to perform the update in its main loop.
This moves the database name check and engine lookup into the open_async process. There's no reason that this work had to happen in the main loop so we can easily move the regex and engine lookups out of the loop to minimize the work per handle_call even further.
In a VM with lots of processes couch_server can end up slowing down purely to not being scheduled which in turn will cause its message queue to backup. We've attempted this before but due to message passing have never seen it have a significant effect. However, now that we're actively avoiding synchronous message passing inside the man loop this has a significant effect by being able to process messages as soon as it has one in its mailbox.
879ebf3 to
bd351da
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Overview
This makes
couch_serverable to handle quite a bit more load.Testing recommendations
make checkChecklist
rel/overlay/etc/default.ini