Skip to content

Add cost estimator for SSD #1480

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

Merged
merged 1 commit into from
Jan 31, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,12 @@ const TDiskOperationCostEstimator TBsCostModelBase::HDDEstimator{
{ 6.089e+06, 8.1 }, // HugeWriteCoefficients
};

const TDiskOperationCostEstimator TBsCostModelBase::SSDEstimator{
{ 180000, 3.00 }, // ReadCoefficients
{ 430, 4.2 }, // WriteCoefficients
{ 110000, 3.6 }, // HugeWriteCoefficients
};

const TDiskOperationCostEstimator TBsCostModelBase::NVMEEstimator{
{ 10000, 1.3 }, // ReadCoefficients
{ 3300, 1.5 }, // WriteCoefficients
Expand Down
10 changes: 10 additions & 0 deletions ydb/core/blobstorage/vdisk/common/blobstorage_cost_tracker.h
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ class TBsCostModelBase {
ui64 PDiskWriteBlockSize = 4ull * 1'000'000; // 4MB

static const TDiskOperationCostEstimator HDDEstimator;
static const TDiskOperationCostEstimator SSDEstimator;
static const TDiskOperationCostEstimator NVMEEstimator;

private:
Expand Down Expand Up @@ -100,6 +101,9 @@ class TBsCostModelBase {
case NPDisk::DEVICE_TYPE_ROT: {
return HDDEstimator.Write(chunkSize);
}
case NPDisk::DEVICE_TYPE_SSD: {
return SSDEstimator.Write(chunkSize);
}
case NPDisk::DEVICE_TYPE_NVME: {
return NVMEEstimator.Write(chunkSize);
}
Expand All @@ -116,6 +120,9 @@ class TBsCostModelBase {
case NPDisk::DEVICE_TYPE_ROT: {
return HDDEstimator.HugeWrite(chunkSize);
}
case NPDisk::DEVICE_TYPE_SSD: {
return SSDEstimator.HugeWrite(chunkSize);
}
case NPDisk::DEVICE_TYPE_NVME: {
return NVMEEstimator.HugeWrite(chunkSize);
}
Expand All @@ -133,6 +140,9 @@ class TBsCostModelBase {
case NPDisk::DEVICE_TYPE_ROT: {
return HDDEstimator.Read(chunkSize);
}
case NPDisk::DEVICE_TYPE_SSD: {
return SSDEstimator.Read(chunkSize);
}
case NPDisk::DEVICE_TYPE_NVME: {
return NVMEEstimator.Read(chunkSize);
}
Expand Down