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

P2P: Misc improvements #1040

Merged
merged 5 commits into from
Apr 17, 2023
Merged

P2P: Misc improvements #1040

merged 5 commits into from
Apr 17, 2023

Conversation

heifner
Copy link
Member

@heifner heifner commented Apr 15, 2023

In preparation of work for #452 some initial cleanup.

Testing with performance harness when sending more transactions than nodeos can process it fills up the write queue. This is designed to then close the connection. nodeos was generating thousands of write queue full messages (example below) because the posted close() call would have to wait until all the currently queued up tasks on the strand finished. This delayed the close for seconds. Added a closing flag to stop existing tasks quickly, resulting in only one message instead of thousands and an immediate close.

error 2023-04-15T16:46:16.320 net-0     net_plugin.cpp:2494           start_read_message   ] ["localhost:9877 - d7c63c8" - 1 127.0.0.1:37658] write queue full 71936405 bytes, giving up on connection, closing

Added better encapsulation of the sync_mtx.
Added alignas(hardware_destructive_interference_size) to avoid cache synchronization.

@heifner heifner added the OCI Work exclusive to OCI team label Apr 15, 2023
@heifner heifner added this to the Leap v5.0.0-rc1 milestone Apr 15, 2023
@greg7mdp
Copy link
Contributor

Just curious. What led you to adding alignas(hardware_destructive_interference_size) to avoid cache synchronization.?
Could you measure whether it made a difference in performance?

@heifner
Copy link
Member Author

heifner commented Apr 17, 2023

Just curious. What led you to adding alignas(hardware_destructive_interference_size) to avoid cache synchronization.? Could you measure whether it made a difference in performance?

Just something I've been meaning to add. No, I have not measured the performance difference.

@greg7mdp
Copy link
Contributor

Just something I've been meaning to add. No, I have not measured the performance difference.

Very cool change!

@heifner heifner merged commit 2ef8789 into main Apr 17, 2023
@heifner heifner deleted the GH-452-block-buffer branch April 17, 2023 15:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
OCI Work exclusive to OCI team
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

3 participants