Skip to content

Conversation

dcherednik
Copy link
Member

No description provided.

XDC allows to send huge events without splitting into small IC chunks.
Co-authored-by: Vlad Kuznetsov <[email protected]>

Support for MSG_ZEROCOPY feature for XDC stream.

Linux has features which allows to perform send in to socket without copy during send call. MSG_ZEROCOPY is a one of possibility to achieve it.

To use it we must configure net.core.optmem_max kernel option, default values usually not enought. Also process should have capability to lock memory, so consider settings ulimit -l or IPC_LOCK capability.

Note0: MSG_ZEROCOPY causes hiden copy inside kernel when traffic goes between process on the same host. The implementation handle it  and disable using MSG_ZEROCOPY for such sessions.
Note1: Some processes using PACKET sockets breaks MSG_ZEROCOPY and also causes hidden copy inside kernel. So consider output `ss -0` in case of non succcess.
Note2: Hardware must support scatter-gather

ydb-platform#17181 (comment)
…tform#17826)

TGuardActor should be launched only in case of uncompleted ZC transfers.
ydb-platform#17820
Missed #ifdef has been added. MSG_ZEROCOPY related code works only on linux.
…form#18698)

The issue was missed checks for enabled encryption during zero copy routine. It causes attempt to send data unencrypted via XDC socket.
ydb-platform#18546
Copy link

github-actions bot commented Sep 26, 2025

2025-09-26 13:22:32 UTC Pre-commit check for 902dfef has started.
2025-09-26 13:25:42 UTC Build linux-x86_64-release-asan is running...
🟢 2025-09-26 14:25:26 UTC Build successful.
2025-09-26 14:25:52 UTC Tests are running...
🔴 2025-09-26 16:47:36 UTC Some tests failed, follow the links below.

Test history | Test log

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
14501 14354 0 50 49 48

🟡 2025-09-26 16:48:11 UTC ydbd size 5.6 GiB changed* by +475.7 KiB, which is >= 100.0 KiB vs stream-nb-24-3: Warning

ydbd size dash stream-nb-24-3: 795eed0 merge: 902dfef diff diff %
ydbd size 6 013 902 680 Bytes 6 014 389 760 Bytes +475.7 KiB +0.008%
ydbd stripped size 1 506 332 800 Bytes 1 506 404 288 Bytes +69.8 KiB +0.005%

*please be aware that the difference is based on comparing your commit and the last completed build from the post-commit, check comparation

Copy link

github-actions bot commented Sep 26, 2025

2025-09-26 13:24:03 UTC Pre-commit check for 902dfef has started.
2025-09-26 13:27:09 UTC Build linux-x86_64-relwithdebinfo is running...
🟢 2025-09-26 14:42:56 UTC Build successful.
2025-09-26 14:43:22 UTC Tests are running...
🔴 2025-09-26 17:02:32 UTC Some tests failed, follow the links below.

Test history | Test log

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
75700 62196 0 22 13443 39

🟡 2025-09-26 17:03:24 UTC ydbd size 8.3 GiB changed* by +793.0 KiB, which is >= 100.0 KiB vs stream-nb-24-3: Warning

ydbd size dash stream-nb-24-3: 795eed0 merge: 902dfef diff diff %
ydbd size 8 884 780 960 Bytes 8 885 593 040 Bytes +793.0 KiB +0.009%
ydbd stripped size 484 355 784 Bytes 484 372 616 Bytes +16.4 KiB +0.003%

*please be aware that the difference is based on comparing your commit and the last completed build from the post-commit, check comparation

@dcherednik dcherednik merged commit 34aa955 into ydb-platform:stream-nb-24-3 Sep 29, 2025
6 of 10 checks passed
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.

2 participants