Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@rickard-green
Copy link
Contributor

@rickard-green rickard-green commented Jan 5, 2023

Support for fully asynchronous distributed signaling where asynchronous send operations never block. This functionality is by default disabled and can be enabled per process. For more information see the documentation of process_flag(async_dist, Bool).

@rickard-green rickard-green added team:VM Assigned to OTP team VM enhancement feature testing currently being tested, tag is used by OTP internal CI labels Jan 5, 2023
@rickard-green rickard-green added this to the OTP-25.3 milestone Jan 5, 2023
@rickard-green rickard-green self-assigned this Jan 5, 2023
@github-actions
Copy link
Contributor

github-actions bot commented Jan 5, 2023

CT Test Results

       3 files     125 suites   43m 59s ⏱️
1 500 tests 1 449 ✔️ 51 💤 0
1 812 runs  1 743 ✔️ 69 💤 0

Results for commit 349b244.

♻️ This comment has been updated with latest results.

To speed up review, make sure that you have read Contributing to Erlang/OTP and that all checks pass.

See the TESTING and DEVELOPMENT HowTo guides for details about how to run test locally.

Artifacts

// Erlang/OTP Github Action Bot

@rickard-green rickard-green force-pushed the rickard/async_dist/OTP-18374 branch from 220f665 to 2b1d353 Compare January 5, 2023 17:33
Comment on lines +1046 to +1049
By default, if no <c>+pad</c> command line option is passed,
the <c>async_dist</c> flag will be set to <c>false</c>.
</p>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
By default, if no <c>+pad</c> command line option is passed,
the <c>async_dist</c> flag will be set to <c>false</c>.
</p>
If no <c>+pad</c> command line option is passed,
the <c>async_dist</c> flag will be set to <c>false</c> for newly created processes.
</p>

@rickard-green rickard-green force-pushed the rickard/async_dist/OTP-18374 branch from 2b1d353 to 349b244 Compare January 17, 2023 21:51
@rickard-green rickard-green changed the title Support for truly asynchronous distributed signaling Support for fully asynchronous distributed signaling Jan 17, 2023
@rickard-green rickard-green merged commit 62df05e into erlang:maint Jan 18, 2023
@max-au
Copy link
Contributor

max-au commented Jan 18, 2023

I am interested in the same answers, would it be possible to document it in greater details?

@rickard-green
Copy link
Contributor Author

I am interested in the same answers, would it be possible to document it in greater details?

When async_dist is enabled there is no hard limit on how much you can buffer which is the intention. Signals will be buffered without restrictions just as in the node local case. It is up to the implementer that use this functionality to ensure that the system does not consume an unlimited amount of memory, for example by implementing flow control.

I'm not sure exactly what you want documented in greater detail. I thought it was quite clear in the provided documentation.

@okeuday
Copy link
Contributor

okeuday commented Jan 18, 2023

@rickard-green If each process had its own memory limit as an offset in kilobytes on the distribution buffer busy limit the option could become more similar to max_heap_size (for distributed send memory consumption specific to the Erlang process). The default could be {async_dist, 0} (equivalent to what is currently {async_dist, false}) with {async_dist, true} becoming {async_dist, infinity}. If {async_dist, pos_integer()} was used an exit kill signal could kill the process if it was seen exceeding that distribution buffer busy limit. Using infinity for memory consumption can help make the decision more explicit because the developer is clearly agreeing to the potential for unbounded memory growth.

I can understand something similar may have already been discussed, but wanted to mention the idea in case it hasn't.

@rickard-green
Copy link
Contributor Author

@okeuday Values of {async, Limit} where Limit /= infinity would just be another flavor of the same problematic semi asynchronous strategy as we already have. The point of this PR was to make it possible to utilize truly asynchronous signaling also in the distributed case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement feature team:VM Assigned to OTP team VM testing currently being tested, tag is used by OTP internal CI

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants