improve comments about target_file_size_base, target_file_size_multiplier, max_bytes_for_level_base, max_bytes_for_level_multiplier Summary:

Summary: as subject

Test Plan: compile

Reviewers: MarkCallaghan, dhruba

Differential Revision: https://reviews.facebook.net/D5499
This commit is contained in:
heyongqiang 2012-09-17 15:16:49 -07:00
parent aa0426f124
commit 3662c2976a

View File

@ -163,20 +163,34 @@ struct Options {
// space if the same key space is being repeatedly overwritten. // space if the same key space is being repeatedly overwritten.
int max_mem_compaction_level; int max_mem_compaction_level;
// Target file size for compaction. Target file size for level L is // Target file size for compaction.
// (target_file_size_base)^(target_file_size_multiplier). // target_file_size_base is per-file size for level-1.
// For example, if target_file_size_base is 20MB and // Target file size for level L can be calculated by
// target_file_size_multiplier is 2^10, then target file size on level 1 // target_file_size_base * (target_file_size_multiplier ^ (L-1))
// will be 200MB, and wiil be 2GB on level 2. // For example, if target_file_size_base is 2MB and
// target_file_size_multiplier is 10, then each file on level-1 will
// be 2MB, and each file on level 2 will be 20MB,
// and each file on level-3 will be 200MB.
// by default target_file_size_base is 2MB.
int target_file_size_base; int target_file_size_base;
// by default target_file_size_multiplier is 1, which means
// by default files in different levels will have similar size.
int target_file_size_multiplier; int target_file_size_multiplier;
// Control maximum number of bytes in all compacted files for one level. // Control maximum total data size for a level.
// Maximum number of bytes for level L is // max_bytes_for_level_base is the max total for level-1.
// (max_bytes_for_level_base)^(max_bytes_for_level_multiplier). // Maximum number of bytes for level L can be calculated as
// (max_bytes_for_level_base) * (max_bytes_for_level_multiplier ^ (L-1))
// For example, if max_bytes_for_level_base is 20MB, and if
// max_bytes_for_level_multiplier is 10, total data size for level-1
// will be 20MB, total file size for level-2 will be 200MB,
// and total file size for level-3 will be 2GB.
// by default 'max_bytes_for_level_base' is 10MB.
int max_bytes_for_level_base; int max_bytes_for_level_base;
// by default 'max_bytes_for_level_base' is 10.
int max_bytes_for_level_multiplier; int max_bytes_for_level_multiplier;
// Maximum number of bytes in all compacted files. We avoid expanding // Maximum number of bytes in all compacted files. We avoid expanding