-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Changes Made to LevelDB
ideawu edited this page May 16, 2013
·
4 revisions
--- db/dbformat.h.bk 2013-05-02 10:24:46.000000000 +0800
+++ db/dbformat.h 2013-05-03 17:13:49.000000000 +0800
@@ -25,10 +25,10 @@ static const int kNumLevels = 7;
static const int kL0_CompactionTrigger = 4;
// Soft limit on number of level-0 files. We slow down writes at this point.
-static const int kL0_SlowdownWritesTrigger = 8;
+static const int kL0_SlowdownWritesTrigger = 16;
// Maximum number of level-0 files. We stop writes at this point.
-static const int kL0_StopWritesTrigger = 12;
+static const int kL0_StopWritesTrigger = 64;
--- db/version_set.cc.bk 2013-05-03 17:08:31.000000000 +0800
+++ db/version_set.cc 2013-05-03 15:04:02.000000000 +0800
@@ -20,7 +20,7 @@
--- db/version_set.cc.bk 2013-05-03 17:08:31.000000000 +0800
+++ db/version_set.cc 2013-05-15 14:56:03.000000000 +0800
@@ -20,11 +20,11 @@
-static const int kTargetFileSize = 2 * 1048576;
+static const int kTargetFileSize = 32 * 1048576;
-static const int64_t kMaxGrandParentOverlapBytes = 10 * kTargetFileSize;
+static const int64_t kMaxGrandParentOverlapBytes = 20 * kTargetFileSize;
@@ -34,7 +34,7 @@ static const int64_t kExpandedCompaction
- double result = 10 * 1048576.0; // Result for both level-0 and level-1
+ double result = 5 * kTargetFileSize; // Result for both level-0 and level-1
@@ -617,7 +617,7 @@ class VersionSet::Builder {
- if (f->allowed_seeks < 100) f->allowed_seeks = 100;
+ if (f->allowed_seeks < (int)(kTargetFileSize/16384)) f->allowed_seeks = (int)(kTargetFileSize/16384);