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

Add parameters WriteMixedBlobThreshold and WriteMixedBlobThresholdSSD #2910

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

agalibin
Copy link
Collaborator

@agalibin agalibin commented Jan 23, 2025

Добавляет параметры WriteMixedBlobThreshold и WriteMixedBlobThresholdSSD. Это размер запроса в байтах.
С размером меньше WriteMixedBlobThreshold(SSD) будут записаны в fresh канал.
Данные с размером от WriteMixedBlobThreshold(SSD) до WriteBlobThreshold(SSD) будут записаны в mixed канал.
С размером больше WriteBlobThreshold(SSD) будут записаны в merged канал.
По умолчанию выставлены 0, что рассматривается, как фича отключена и надо работать по-старому.
Это первый шаг, далее будет добавлена логика для ZeroBlocks и Compaction.

@agalibin agalibin added large-tests Launch large tests for PR blockstore Add this label to run only cloud/blockstore build and tests on PR labels Jan 23, 2025
const auto writeMixedBlobThreshold = GetWriteMixedBlobThreshold(
*Config,
PartitionConfig.GetStorageMediaKind(),
writeBlobThreshold);
Copy link
Collaborator

Choose a reason for hiding this comment

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

какое отношение writeBlobThreshold для merged имеет к трэшолду для mixed? Кажется что никакое. На ноль можно и явно в коде проверить, так хоть понятнее будет

Copy link
Contributor

Note

This is an automated comment that will be appended during run.

🟢 linux-x86_64-relwithdebinfo: all tests PASSED for commit 0b753a1.

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
3787 3787 0 0 0 0

@SvartMetal SvartMetal self-requested a review January 23, 2025 16:32
@agalibin agalibin force-pushed the users/agalibin/nbs-2875 branch from 0b753a1 to 4cdefba Compare January 23, 2025 16:50
 as minimum request size in bytes to write to the mixed channel.
@agalibin agalibin force-pushed the users/agalibin/nbs-2875 branch from 4cdefba to 1c4608e Compare January 23, 2025 17:24

if (requestSize < writeBlobThreshold) {
if (requestSize < (writeMixedBlobThreshold ? writeMixedBlobThreshold
Copy link
Collaborator

Choose a reason for hiding this comment

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

я предлагаю организовать код так:
if (requestSize > writeBlobThreshold) {
пишем merged
} else if (requestSize > writeMixedBlobThreshold) {
пишем mixed
} else {
fresh
}

Copy link
Collaborator Author

@agalibin agalibin Jan 23, 2025

Choose a reason for hiding this comment

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

Тогда придется дополнительно обработать writeMixedBlobThreshold == 0, именно поэтому сделал по текущей схеме.

Copy link
Contributor

Note

This is an automated comment that will be appended during run.

🟢 linux-x86_64-relwithdebinfo: all tests PASSED for commit 1c4608e.

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
3787 3787 0 0 0 0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blockstore Add this label to run only cloud/blockstore build and tests on PR large-tests Launch large tests for PR
Projects
None yet
2 participants