Actors were taking an excessive amount of memory upon creation.#260
Merged
Conversation
ec9bcf3 to
fee2df8
Compare
e8da372 to
b78ad57
Compare
…unbounded messaging channels, but the supervision logic alone had 3 dashmaps inside it. The monitoring functionality is pretty limited at-best, and we have no active use-cases for it, so dropping it and moving to a simple locked HashMap has allowed us to drop the heap space per actor to a little over 9KB
Additionally in running benchmarks against `main` we see large perf wins on actor creation time
```
Running benches/actor.rs (target/release/deps/actor-464b0ad86c94b02f)
Gnuplot not found, using plotters backend
Creation of 100 actors time: [269.21 µs 282.84 µs 298.29 µs]
change: [-66.867% -64.514% -61.953%] (p = 0.00 < 0.05)
Performance has improved.
Found 15 outliers among 100 measurements (15.00%)
9 (9.00%) high mild
6 (6.00%) high severe
Creation of 10000 actors
time: [25.273 ms 25.862 ms 26.484 ms]
change: [-55.663% -53.735% -51.795%] (p = 0.00 < 0.05)
Performance has improved.
Found 1 outliers among 100 measurements (1.00%)
1 (1.00%) high mild
```
b78ad57 to
b7f1126
Compare
Merged
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.
Some of this is unavoidable due to each actor having 3 bounded and 1 unbounded messaging channels, but the supervision logic alone had 3 dashmaps inside it. The monitoring functionality is pretty limited at-best, and we have no active use-cases for it, so dropping it and moving to a simple locked HashMap has allowed us to drop the heap space per actor to a little over 9KB
Additionally in running benchmarks against
mainwe see large perf wins on actor creation time