Skip to content

Conversation

@dcherednik
Copy link
Member

@dcherednik dcherednik commented Jan 8, 2026

Changelog entry

The original implementation of slot mem pool has no ability to reuse chunk for slots size X if it was split for slots size Y. It can cause the situation when we have no abbility to allocate memory if all chunks was split for workset with different size.

The proposed change track usage of chunk and allows to reuse it for any slot size if use count for chunk become 0.

This commit also changes limit so allocate object up to 32MB are allowed.

Two improvement should be implemented in a future work:

  • Priority to alocate slots by use count of underlying chunk. This heuristic increases probability of success reclaimation
  • Varied chunk size. No need to allocate 32Mb chunk to split it in to 4K slots. It also increases probability of success reclaimation and improve perfomance of it

...

Changelog category

  • Improvement

Description for reviewers

...

The original implementation of slot mem pool has no ability
to reuse chunk for slots size X if it was split for slots size Y.
It can cause the situation when we have no abbility to allocate memory
it all chunks was splited for wirkset with different size.

The proposed change track usage of chunk and allows to reuse it
for any slot size if use count for chunk become 0.

This commit also changes limit so allocate object up to 32MB are allowed.

Two improvement should be implemented in a future work:
- Priority to alocate slots by use count of underlying chunk. This heuristic
  increases probability of success reclaimation
- Varied chunk size. No need to allocate 32Mb chunk to split it in to 4K slots.
  It also increases probability of success reclaimation and improve perfomance of it
@github-actions
Copy link

github-actions bot commented Jan 8, 2026

2026-01-08 15:17:19 UTC Pre-commit check linux-x86_64-release-asan for a9ee09b has started.
2026-01-08 15:17:49 UTC Artifacts will be uploaded here
2026-01-08 15:19:11 UTC ya make is running...
2026-01-08 15:37:25 UTC Check cancelled

@ydbot
Copy link
Collaborator

ydbot commented Jan 8, 2026

Run Extra Tests

Run additional tests for this PR. You can customize:

  • Test Size: small, medium, large (default: all)
  • Test Targets: any directory path (default: ydb/)
  • Sanitizers: ASAN, MSAN, TSAN
  • Coredumps: enable for debugging (default: off)
  • Additional args: custom ya make arguments

▶  Run tests

@github-actions
Copy link

github-actions bot commented Jan 8, 2026

🟢 2026-01-09 16:49:32 UTC The validation of the Pull Request description is successful.

@github-actions
Copy link

github-actions bot commented Jan 8, 2026

2026-01-08 15:21:11 UTC Pre-commit check linux-x86_64-relwithdebinfo for a9ee09b has started.
2026-01-08 15:21:30 UTC Artifacts will be uploaded here
2026-01-08 15:26:15 UTC ya make is running...
2026-01-08 15:37:22 UTC Check cancelled

@github-actions
Copy link

github-actions bot commented Jan 8, 2026

2026-01-08 15:38:19 UTC Pre-commit check linux-x86_64-release-asan for fbab36c has started.
2026-01-08 15:40:20 UTC Artifacts will be uploaded here
2026-01-08 15:42:16 UTC ya make is running...
2026-01-08 16:53:47 UTC Check cancelled

@github-actions
Copy link

github-actions bot commented Jan 8, 2026

2026-01-08 15:41:34 UTC Pre-commit check linux-x86_64-relwithdebinfo for fbab36c has started.
2026-01-08 15:41:50 UTC Artifacts will be uploaded here
2026-01-08 15:47:18 UTC ya make is running...
2026-01-08 16:53:47 UTC Check cancelled

@github-actions
Copy link

github-actions bot commented Jan 8, 2026

2026-01-08 16:54:30 UTC Pre-commit check linux-x86_64-release-asan for 8e1c12d has started.
2026-01-08 16:55:12 UTC Artifacts will be uploaded here
2026-01-08 16:57:08 UTC ya make is running...
🟡 2026-01-08 18:10:57 UTC Some tests failed, follow the links below. This fail is not in blocking policy yet

Ya make output | Test bloat

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
16380 16269 0 81 11 19

🟢 2026-01-08 18:11:08 UTC Build successful.
🟢 2026-01-08 18:11:39 UTC ydbd size 3.8 GiB changed* by +55.1 KiB, which is < 100.0 KiB vs main: OK

ydbd size dash main: 376e13b merge: 8e1c12d diff diff %
ydbd size 4 102 750 472 Bytes 4 102 806 904 Bytes +55.1 KiB +0.001%
ydbd stripped size 1 535 899 088 Bytes 1 535 919 184 Bytes +19.6 KiB +0.001%

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

@github-actions
Copy link

github-actions bot commented Jan 8, 2026

2026-01-08 17:48:30 UTC Pre-commit check linux-x86_64-relwithdebinfo for 8e1c12d has started.
2026-01-08 17:48:53 UTC Artifacts will be uploaded here
2026-01-08 17:51:02 UTC ya make is running...
🟡 2026-01-08 19:35:19 UTC Some tests failed, follow the links below. Going to retry failed tests...

Details

Ya make output | Test bloat

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
46214 43018 0 8 3146 42

2026-01-08 19:35:36 UTC ya make is running... (failed tests rerun, try 2)
🟢 2026-01-08 19:40:58 UTC Tests successful.

Ya make output | Test bloat | Test bloat

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
701 (only retried tests) 689 0 0 0 12

🟢 2026-01-08 19:41:04 UTC Build successful.
🟢 2026-01-08 19:41:29 UTC ydbd size 2.3 GiB changed* by +39.9 KiB, which is < 100.0 KiB vs main: OK

ydbd size dash main: 376e13b merge: 8e1c12d diff diff %
ydbd size 2 495 121 352 Bytes 2 495 162 232 Bytes +39.9 KiB +0.002%
ydbd stripped size 530 805 408 Bytes 530 816 352 Bytes +10.7 KiB +0.002%

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

@github-actions
Copy link

github-actions bot commented Jan 9, 2026

2026-01-09 14:46:32 UTC Pre-commit check linux-x86_64-relwithdebinfo for 287f542 has started.
2026-01-09 14:46:50 UTC Artifacts will be uploaded here
2026-01-09 14:54:31 UTC ya make is running...
🟡 2026-01-09 15:58:34 UTC Some tests failed, follow the links below. Going to retry failed tests...

Details

Ya make output | Test bloat

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
12019 10549 0 4 1445 21

2026-01-09 15:58:45 UTC ya make is running... (failed tests rerun, try 2)
🟢 2026-01-09 16:04:59 UTC Tests successful.

Ya make output | Test bloat | Test bloat

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
175 (only retried tests) 168 0 0 0 7

🟢 2026-01-09 16:05:07 UTC Build successful.
🟢 2026-01-09 16:05:30 UTC ydbd size 2.3 GiB changed* by +39.9 KiB, which is < 100.0 KiB vs main: OK

ydbd size dash main: 1c215e4 merge: 287f542 diff diff %
ydbd size 2 495 121 352 Bytes 2 495 162 232 Bytes +39.9 KiB +0.002%
ydbd stripped size 530 805 408 Bytes 530 816 352 Bytes +10.7 KiB +0.002%

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

@github-actions
Copy link

github-actions bot commented Jan 9, 2026

2026-01-09 14:48:18 UTC Pre-commit check linux-x86_64-release-asan for 287f542 has started.
2026-01-09 14:48:50 UTC Artifacts will be uploaded here
2026-01-09 14:56:28 UTC ya make is running...
🟡 2026-01-09 15:43:35 UTC Some tests failed, follow the links below. This fail is not in blocking policy yet

Ya make output | Test bloat

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
3197 3119 0 53 8 17

🟢 2026-01-09 15:43:42 UTC Build successful.
🟢 2026-01-09 15:44:13 UTC ydbd size 3.8 GiB changed* by +55.1 KiB, which is < 100.0 KiB vs main: OK

ydbd size dash main: 1c215e4 merge: 287f542 diff diff %
ydbd size 4 102 750 472 Bytes 4 102 806 904 Bytes +55.1 KiB +0.001%
ydbd stripped size 1 535 899 088 Bytes 1 535 919 184 Bytes +19.6 KiB +0.001%

*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 83ee491 into ydb-platform:main Jan 9, 2026
9 checks passed
@ydbot
Copy link
Collaborator

ydbot commented Jan 9, 2026

Backport

To backport this PR, click the button next to the target branch and then click "Run workflow" in the Run Actions UI.

Branch Run
stable-25-3, stable-25-3-1, stable-25-4 ▶  Backport
stable-25-4 ▶  Backport

▶  Backport manual

@dcherednik dcherednik changed the title [ICRDMA] Chunk reclamation feature for slot mem pool. Change limit. EXT-1782 [ICRDMA] Chunk reclaimation feature for slot mem pool. Change limit. EXT-1782 Jan 9, 2026
dcherednik added a commit to dcherednik/ydb that referenced this pull request Jan 13, 2026
…XT-1782 (ydb-platform#31708)

The original implementation of slot mem pool has no ability to reuse chunk for slots size X if it was split for slots size Y. It may cause the situation when we have no ability to allocate memory if all chunks was split for workset with different sizes.

The proposed change track usage of chunk and allows to reuse it for any slot size if use count for the chunk becomes 0.

This commit also changes limit so allocate object up to 32MB are allowed.

Two improvement should be implemented in a future work:

* Priority to allocate slots by use count of underlying chunk. This heuristic increases probability of success reclaimation
* Varied chunk size. No need to use 32Mb chunk to split it in to 4K slots. It also increases probability of success reclaimation and improve performance of it
dcherednik added a commit that referenced this pull request Jan 15, 2026
…XT-1782 (#31708)

The original implementation of slot mem pool has no ability to reuse chunk for slots size X if it was split for slots size Y. It may cause the situation when we have no ability to allocate memory if all chunks was split for workset with different sizes.

The proposed change track usage of chunk and allows to reuse it for any slot size if use count for the chunk becomes 0.

This commit also changes limit so allocate object up to 32MB are allowed.

Two improvement should be implemented in a future work:

* Priority to allocate slots by use count of underlying chunk. This heuristic increases probability of success reclaimation
* Varied chunk size. No need to use 32Mb chunk to split it in to 4K slots. It also increases probability of success reclaimation and improve performance of it
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants