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

Bump ya-relay-stack to use more reasonable buffer sizes #2680

Closed
wants to merge 1 commit into from

Conversation

evik42
Copy link
Contributor

@evik42 evik42 commented Aug 3, 2023

Yagna uses a lot of memory because ya-relay-stack by default allocates 4 MB receive buffer for each tcp connection.
This is the maximum size of the buffer in the kernel and ya-relay-stack does not resize the buffer based on usage so it is wasting a lot of memory.
The bumped version uses the default buffer sizes instead of max.

@evik42 evik42 requested a review from a team as a code owner August 3, 2023 12:09
@nieznanysprawiciel
Copy link
Contributor

This change might affect GFTP and VPN transfer speed performance. Setting buffer size was one of the optimizations made

@evik42
Copy link
Contributor Author

evik42 commented Aug 9, 2023

This change might affect GFTP and VPN transfer speed performance. Setting buffer size was one of the optimizations made

That can be addressed by using a different buffer size for Transfer type sockets.

This change does not break any tests that verify the minimum required performance.

@evik42
Copy link
Contributor Author

evik42 commented Aug 9, 2023

This change might affect GFTP and VPN transfer speed performance. Setting buffer size was one of the optimizations made

There are also socket metrics and based on that the buffer parameters could be adjusted after creation.

@prekucki prekucki closed this Feb 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants