Skip to content

Blob files are included in SstFileManager DB size calculation#5127

Open
anand1976 wants to merge 3 commits into
facebook:mainfrom
anand1976:blob_db_sfm
Open

Blob files are included in SstFileManager DB size calculation#5127
anand1976 wants to merge 3 commits into
facebook:mainfrom
anand1976:blob_db_sfm

Conversation

@anand1976

Copy link
Copy Markdown
Contributor

Blob files were not counted in DB size by SstFileManager. As a result, blob files are always subject to background file deletion rate limiting in DeleteScheduler. Normal SST files bypass the rate limiter if trash/db size ratio is above a certain threshold, which limits disk utilization due to accumulated trash.

This PR fixes it by adding Blob files size to the total DB size in SstFileManagerImpl::GetTotalSize(). Since blob file size increases on every blob write, we provide SstFileManagerImpl with a pointer to the blob file size atomic counter that it can look at in GetTotalSize(), otherwise it would be too much overhead to update SstFileManagerImpl on every blob write.

Test:
Add a new test in blob_db_test
make check

anand76 and others added 2 commits May 10, 2022 19:16
Summary:

Test Plan:

Reviewers:

Subscribers:

Tasks:

Tags:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

2 participants