Various JMAP performance enhancements - #424
Merged
Merged
Conversation
Contributor
|
Arsnael
approved these changes
May 11, 2021
Arsnael
left a comment
Contributor
There was a problem hiding this comment.
Nice series of improvements :)
Arsnael
approved these changes
May 11, 2021
LanKhuat
approved these changes
May 12, 2021
…anager::getMailbox
It was forcing to schedule the whole chain on an elastic scheduler...
It was forcing to schedule the whole chain on an elastic scheduler...
Detected thanks to https://github.com/reactor/BlockHound They are blocking in case of connection recovery. Doing that on the parallel pool is bad as it "steals" threads dedicated to non blocking tasks and slows the entire application down.
Detected thanks to https://github.com/reactor/BlockHound ACKs are blocking (as we send a message over the network to RabbitMQ). Doing that on the parallel pool is bad as it "steals" threads dedicated to non blocking tasks and slows the entire application down.
… threads upon nested block calls This test mimics the previous behaviour of LocalDelivery ``` @test void testNestedBlocksWithElasticScheduler() { // mono1 corresponds to the append to the mailbox (blocking) Mono<Void> mono1 = Mono.fromRunnable(() -> { System.out.println("mono1 running on " + Thread.currentThread().getName()); }); // mono2 corresponds to the retries perforned in MailDispatcher Mono<Void> mono2 = Mono.fromRunnable(() -> { System.out.println("mono2 running on " + Thread.currentThread().getName()); mono1.subscribeOn(Schedulers.elastic()).block(); }); // This is a spooler thread running LocalDelivery System.out.println("Current thread " + Thread.currentThread().getName()); mono2.subscribeOn(Schedulers.elastic()).block(); } ``` Output: ``` Current thread main mono2 running on elastic-2 mono1 running on elastic-3 ``` One thread doing the work and two waiting... With the new paradigm (waiting for a fully reactive version) ``` @test void testNestedBlockWithImmediateScheduler() { // mono1 corresponds to the append to the mailbox (blocking) Mono<Void> mono1 = Mono.fromRunnable(() -> { System.out.println("mono1 running on " + Thread.currentThread().getName()); }); // mono2 corresponds to the retries perforned in MailDispatcher Mono<Void> mono2 = Mono.fromRunnable(() -> { System.out.println("mono2 running on " + Thread.currentThread().getName()); mono1.subscribeOn(Schedulers.immediate()).block(); }); // This is a spooler thread running LocalDelivery System.out.println("Current thread " + Thread.currentThread().getName()); mono2.subscribeOn(Schedulers.immediate()).block(); } ``` We get... ``` Current thread main mono2 running on main mono1 running on main ``` Way better! We do mobilize only one thread that would anyway be blocked.
…lboxPath to determine quotaRoot
…ion if not needed
chibenwa
force-pushed
the
various-improvments
branch
from
May 13, 2021 07:52
d2b890c to
cfdd144
Compare
Contributor
Author
|
Squashed in prevision of a merge... |
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.
Before
After