1. 16 12月, 2014 1 次提交
    • V
      RocksDB: Allow Level-Style Compaction to Place Files in Different Paths · 153f4f07
      Venkatesh Radhakrishnan 提交于
      Summary:
      Allow Level-style compaction to place files in different paths
      This diff provides the code for task 4854591. We now support level-compaction
      to place files in different paths by specifying  them in db_paths  along with
      the minimum level for files to store in that path.
      
      Test Plan: ManualLevelCompactionOutputPathId in db_test.cc
      
      Reviewers: yhchiang, MarkCallaghan, dhruba, yoshinorim, sdong
      
      Reviewed By: sdong
      
      Subscribers: yoshinorim, dhruba, leveldb
      
      Differential Revision: https://reviews.facebook.net/D29799
      153f4f07
  2. 15 12月, 2014 1 次提交
    • I
      Optimize default compile to compilation platform by default · 06eed650
      Igor Canadi 提交于
      Summary:
      This diff changes compile to optimize for native platform by default. This will automatically turn on crc32 optimizations for modern processors, which greatly improves rocksdb's performance.
      
      I also did some more changes to compilation documentation.
      
      Test Plan:
      compile with `make`, observe -march=native
      compile with `PORTABLE=1 make`, observe no -march=native
      
      Reviewers: sdong, rven, yhchiang, MarkCallaghan
      
      Reviewed By: MarkCallaghan
      
      Subscribers: dhruba, leveldb
      
      Differential Revision: https://reviews.facebook.net/D30225
      06eed650
  3. 13 12月, 2014 2 次提交
    • Q
      Added 'dump_live_files' command to ldb tool. · cef6f843
      Qiao Yang 提交于
      Summary:
      Priliminary diff to solicit comments.
      Given DB path, dump all SST files (key/value and properties), WAL file and manifest
      files. What command options do we need to support for this command? Maybe
      output_hex for keys?
      
      Test Plan: Create additional ldb unit tests.
      
      Reviewers: sdong, rven
      
      Reviewed By: rven
      
      Subscribers: dhruba
      
      Differential Revision: https://reviews.facebook.net/D29547
      cef6f843
    • S
      Add an assert and avoid std::sort(autovector) to investigate an ASAN issue · 7ab1526c
      sdong 提交于
      Summary:
      ASAN build fails once for this error:
      
      14:04:52 ==== Test DBTest.CompactFilesOnLevelCompaction
      14:04:52 db_test: db/version_set.cc:1062: void rocksdb::VersionStorageInfo::AddFile(int, rocksdb::FileMetaData*): Assertion `level <= 0 || level_files->empty() || internal_comparator_->Compare( (*level_files)[level_files->size() - 1]->largest, f->smallest) < 0' failed.
      
      Not abling figure out reason. We use std:vector for sorting for save and add one more assert to help figure out whether it is the sorting's problem.
      
      Test Plan: make all check
      
      Reviewers: yhchiang, rven, igor
      
      Reviewed By: igor
      
      Subscribers: leveldb, dhruba
      
      Differential Revision: https://reviews.facebook.net/D30117
      7ab1526c
  4. 12 12月, 2014 2 次提交
  5. 11 12月, 2014 3 次提交
    • A
      Modifed the LRU cache eviction code so that it doesn't evict blocks which have exteranl references · ee95cae9
      Alexey Maykov 提交于
      Summary:
      Currently, blocks which have more than one reference (ie referenced by something other than cache itself) are evicted from cache. This doesn't make much sense:
      - blocks are still in RAM, so the RAM usage reported by the cache is incorrect
      - if the same block is needed by another iterator, it will be loaded and decompressed again
      
      This diff changes the reference counting scheme a bit. Previously, if the cache contained the block, this was accounted for in its refcount. After this change, the refcount is only used to track external references. There is a boolean flag which indicates whether or not the block is contained in the cache.
      This diff also changes how LRU list is used. Previously, both hashtable and the LRU list contained all blocks. After this change, the LRU list contains blocks with the refcount==0, ie those which can be evicted from the cache.
      
      Note that this change still allows for cache to grow beyond its capacity. This happens when all blocks are pinned (ie refcount>0). This is consistent with the current behavior. The cache's insert function never fails. I spent lots of time trying to make table_reader and other places work with the insert which might failed. It turned out to be pretty hard. It might really destabilize some customers, so finally, I decided against doing this.
      
      table_cache_remove_scan_count_limit option will be unneeded after this change, but I will remove it in the following diff, if this one gets approved
      
      Test Plan: Ran tests, made sure they pass
      
      Reviewers: sdong, ljin
      
      Differential Revision: https://reviews.facebook.net/D25503
      ee95cae9
    • S
      VersionBuilder to use unordered set and map to store added and deleted files · 0ab0242f
      sdong 提交于
      Summary: Set operations in VerisonBuilder is shown as a performance bottleneck of restarting DB when there are lots of files. Make both of added_files and deleted_files use unordered set or map. Only when adding the files, sort the added files.
      
      Test Plan: make all check
      
      Reviewers: yhchiang, rven, igor
      
      Reviewed By: igor
      
      Subscribers: hermanlee4, leveldb, dhruba, ljin
      
      Differential Revision: https://reviews.facebook.net/D30051
      0ab0242f
    • L
      add range scan test to benchmark script · e93f044d
      Lei Jin 提交于
      Summary: as title
      
      Test Plan: ran it
      
      Reviewers: yhchiang, igor, sdong, MarkCallaghan
      
      Reviewed By: MarkCallaghan
      
      Subscribers: dhruba, leveldb
      
      Differential Revision: https://reviews.facebook.net/D25563
      e93f044d
  6. 10 12月, 2014 1 次提交
    • I
      Fix #434 · cb82d7b0
      Igor Canadi 提交于
      Summary: Why do we assert here? This doesn't seem like user friendly thing to do :)
      
      Test Plan: none
      
      Reviewers: sdong, yhchiang, rven
      
      Reviewed By: rven
      
      Subscribers: dhruba, leveldb
      
      Differential Revision: https://reviews.facebook.net/D30027
      cb82d7b0
  7. 09 12月, 2014 3 次提交
  8. 06 12月, 2014 6 次提交
  9. 05 12月, 2014 8 次提交
  10. 04 12月, 2014 2 次提交
    • I
      Fix java build · 815f638c
      Igor Canadi 提交于
      815f638c
    • M
      Add Moved(GB) to Compaction IO stats · 32a0a038
      Mark Callaghan 提交于
      Summary:
      Adds counter for bytes moved (files pushed down a level rather than compacted) to compaction
      IO stats as Moved(GB). From the output removed these infrequently used columns: RW-Amp, Rn(cnt), Rnp1(cnt),
      Wnp1(cnt), Wnew(cnt).
      Example old output:
      Level   Files   Size(MB) Score Read(GB)  Rn(GB) Rnp1(GB) Write(GB) Wnew(GB) RW-Amp W-Amp Rd(MB/s) Wr(MB/s)  Rn(cnt) Rnp1(cnt) Wnp1(cnt) Wnew(cnt)  Comp(sec) Comp(cnt) Avg(sec) Stall(sec) Stall(cnt) Avg(ms) RecordIn RecordDrop
      ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
        L0     0/0          0   0.0      0.0     0.0      0.0    2130.8   2130.8    0.0   0.0      0.0    109.1        0         0         0         0      20002     25068    0.798      28.75     182059    0.16       0          0
        L1   142/0        509   1.0   4618.5  2036.5   2582.0    4602.1   2020.2    4.5   2.3     88.5     88.1    24220    701246   1215528    514282      53466      4229   12.643       0.00          0    0.002032745988  300688729
      
      Example new output:
      Level   Files   Size(MB) Score Read(GB)  Rn(GB) Rnp1(GB) Write(GB) Wnew(GB) Moved(GB) W-Amp Rd(MB/s) Wr(MB/s) Comp(sec) Comp(cnt) Avg(sec) Stall(sec) Stall(cnt) Avg(ms)     RecordIn   RecordDrop
      --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
        L0     7/0         13   1.8      0.0     0.0      0.0       0.6      0.6       0.0   0.0      0.0     14.7        44       353    0.124       0.03        626    0.05            0            0
        L1     9/0         16   1.6      0.0     0.0      0.0       0.0      0.0       0.6   0.0      0.0      0.0         0         0    0.000       0.00          0    0.00            0            0
      
      Task ID: #
      
      Blame Rev:
      
      Test Plan:
      make check, run db_bench --fillseq --stats_per_interval --stats_interval and look at output
      
      Revert Plan:
      
      Database Impact:
      
      Memcache Impact:
      
      Other Notes:
      
      EImportant:
      
      - begin *PUBLIC* platform impact section -
      Bugzilla: #
      - end platform impact -
      
      Reviewers: igor
      
      Reviewed By: igor
      
      Subscribers: dhruba
      
      Differential Revision: https://reviews.facebook.net/D29787
      32a0a038
  11. 03 12月, 2014 3 次提交
    • J
      Enforce write buffer memory limit across column families · a14b7873
      Jonah Cohen 提交于
      Summary:
      Introduces a new class for managing write buffer memory across column
      families.  We supplement ColumnFamilyOptions::write_buffer_size with
      ColumnFamilyOptions::write_buffer, a shared pointer to a WriteBuffer
      instance that enforces memory limits before flushing out to disk.
      
      Test Plan: Added SharedWriteBuffer unit test to db_test.cc
      
      Reviewers: sdong, rven, ljin, igor
      
      Reviewed By: igor
      
      Subscribers: tnovak, yhchiang, dhruba, xjin, MarkCallaghan, yoshinorim
      
      Differential Revision: https://reviews.facebook.net/D22581
      a14b7873
    • F
      Integrated changes from D29571 · 3e684aa6
      fyrz 提交于
      3e684aa6
    • I
      Fix linters · 37d73d59
      Igor Canadi 提交于
      Summary:
      Two fixes:
      1. if cpplint is not present on the system, don't return a confusing error in the linter
      2. Add include_alpha, which means our includes should be sorted lexicographically
      
      Test Plan: Tried unsorting our includes, lint complained
      
      Reviewers: rven, ljin, yhchiang, sdong
      
      Reviewed By: sdong
      
      Subscribers: dhruba, leveldb
      
      Differential Revision: https://reviews.facebook.net/D28845
      37d73d59
  12. 02 12月, 2014 7 次提交
  13. 01 12月, 2014 1 次提交