-
Notifications
You must be signed in to change notification settings - Fork 58
feat(cold-backup): add rate limit for fds #443
Conversation
I think we should separte this PR into at least 2 PRs, one to add a new thirdparty lib, and the other to use this lib for coldbackup. |
"rocksdb_write_buffer_size", | ||
64 * 1024 * 1024, | ||
"rocksdb options.write_buffer_size"); | ||
uint64_t max_sst_file_size = std::max(target_file_size, (uint64_t)1.25 * write_buffer_size); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
rDSN & FDS client should not assume anything about Pegasus, as well as the details around rocksdb. Pegasus is the submodule aka one of the storage engines of rDSN. What if we use other storage engines without rocksdb_write_buffer_size
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But we should get the file size, or we must set the burst size to a very big number.
Do you have another better way?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, it's bit of tricky here, but in the following plan, we are going to merge rdsn and pegasus projects.
This pr is intend to add rate limit for fds.
For put operation, we can't send a file in small batches. Because
putContent
interface of fds will overwrite what was sent before for the same file. So we must send a file all at one batch. It will produce network burst.But for get operation this problem does not exist, because we get can file content in batches.
New configuration