• Home
  • Raw
  • Download

Lines Matching full:level

29 table generated from a log file is placed in a special **young** level (also
30 called level-0). When the number of young files exceeds a certain threshold
32 overlapping level-1 files to produce a sequence of new level-1 files (we create
33 a new level-1 file for every 2MB of data.)
35 Files in the young level may contain overlapping keys. However files in other
36 levels have distinct non-overlapping key ranges. Consider level number L where
37 L >= 1. When the combined size of files in level-L exceeds (10^L) MB (i.e., 10MB
38 for level-1, 100MB for level-2, ...), one file in level-L, and all of the
39 overlapping files in level-(L+1) are merged to form a set of new files for
40 level-(L+1). These merges have the effect of gradually migrating new updates
41 from the young level to the largest level using only bulk reads and writes
46 A MANIFEST file lists the set of sorted tables that make up each level, the
65 ## Level 0
75 4. Add the new sstable to the young (level-0) level.
79 When the size of level L exceeds its limit, we compact it in a background
80 thread. The compaction picks a file from level L and all overlapping files from
81 the next level L+1. Note that if a level-L file overlaps only part of a
82 level-(L+1) file, the entire file at level-(L+1) is used as an input to the
83 compaction and will be discarded after the compaction. Aside: because level-0
85 level-0 to level-1 specially: a level-0 compaction may pick more than one
86 level-0 file in case some of these files overlap each other.
89 level-(L+1) files. We switch to producing a new level-(L+1) file after the
92 to overlap more than ten level-(L+2) files. This last rule ensures that a later
93 compaction of a level-(L+1) file will not pick up too much data from
94 level-(L+2).
98 Compactions for a particular level rotate through the key space. In more detail,
99 for each level L, we remember the ending key of the last compaction at level L.
100 The next compaction for level L will pick the first file that starts after this
110 Level-0 compactions will read up to four 1MB files from level-0, and at worst
111 all the level-1 files (10MB). I.e., we will read 14MB and write 14MB.
113 Other than the special level-0 compactions, we will pick one 2MB file from level
114 L. In the worst case, this will overlap ~ 12 files from level L+1 (10 because
115 level-(L+1) is ten times the size of level-L, and another two at the boundaries
116 since the file ranges at level-L will usually not be aligned with the file
117 ranges at level-L+1). The compaction will therefore read 26MB and write 26MB.
123 10MB/s, we might build up lots of level-0 files (~50 to hold the 5*10MB). This
128 threshold when the number of level-0 files is large. Though the downside is that
133 level-0 files goes up.
136 the level-0 files will have their blocks sitting uncompressed in the cache and
164 * Convert log chunk to a new level-0 sstable
172 referenced from some level and are not the output of an active compaction.