1. 26 9月, 2014 7 次提交
    • L
      delay initialization of cuckoo table iterator · d439451f
      Lei Jin 提交于
      Summary:
      cuckoo table iterator creation is quite expensive since it needs to load
      all data and sort them. After compaction, RocksDB creates a new iterator
      of the new file to make sure it is in good state. That makes the DB
      creation quite slow. Delay the iterator db sort to the seek time to
      speed it up.
      
      Test Plan: db_bench
      
      Reviewers: igor, yhchiang, sdong
      
      Reviewed By: sdong
      
      Subscribers: leveldb
      
      Differential Revision: https://reviews.facebook.net/D23775
      d439451f
    • L
      reduce memory usage of cuckoo table builder · 94997eab
      Lei Jin 提交于
      Summary:
      builder currently buffers all key value pairs as a vector of
      pair<string, string>. That is too much due to std::string
      overhead. It wasn't able to fit 1B key/values (12bytes total) in 100GB
      of ram. Switch to use a plain string to store the key/value sequence and
      use only 12GB of ram as a result.
      
      Test Plan: db_bench
      
      Reviewers: igor, sdong, yhchiang
      
      Reviewed By: sdong
      
      Subscribers: leveldb
      
      Differential Revision: https://reviews.facebook.net/D23763
      94997eab
    • L
      improve memory efficiency of cuckoo reader · c6275956
      Lei Jin 提交于
      Summary:
      When creating a new iterator, instead of storing mapping from key to
      bucket id for sorting, store only bucket id and read key from mmap file
      based on the id. This reduces from 20 bytes per entry to only 4 bytes.
      
      Test Plan: db_bench
      
      Reviewers: igor, yhchiang, sdong
      
      Reviewed By: sdong
      
      Subscribers: leveldb
      
      Differential Revision: https://reviews.facebook.net/D23757
      c6275956
    • L
      option to choose module when calculating CuckooTable hash · 581442d4
      Lei Jin 提交于
      Summary:
      Using module to calculate hash makes lookup ~8% slower. But it has its
      benefit: file size is more predictable, more space enffient
      
      Test Plan: db_bench
      
      Reviewers: igor, yhchiang, sdong
      
      Reviewed By: sdong
      
      Subscribers: leveldb
      
      Differential Revision: https://reviews.facebook.net/D23691
      581442d4
    • L
      CompactedDBImpl::MultiGet() for better CuckooTable performance · fbd2dafc
      Lei Jin 提交于
      Summary:
      Add the MultiGet API to allow prefetching.
      With file size of 1.5G, I configured it to have 0.9 hash ratio that can
      fill With 115M keys and result in 2 hash functions, the lookup QPS is
      ~4.9M/s  vs. 3M/s for Get().
      It is tricky to set the parameters right. Since files size is determined
      by power-of-two factor, that means # of keys is fixed in each file. With
      big file size (thus smaller # of files), we will have more chance to
      waste lot of space in the last file - lower space utilization as a
      result. Using smaller file size can improve the situation, but that
      harms lookup speed.
      
      Test Plan: db_bench
      
      Reviewers: yhchiang, sdong, igor
      
      Reviewed By: sdong
      
      Subscribers: leveldb
      
      Differential Revision: https://reviews.facebook.net/D23673
      fbd2dafc
    • L
      CompactedDBImpl · 3c680061
      Lei Jin 提交于
      Summary:
      Add a CompactedDBImpl that will enabled when calling OpenForReadOnly()
      and the DB only has one level (>0) of files. As a performan comparison,
      CuckooTable performs 2.1M/s with CompactedDBImpl vs. 1.78M/s with
      ReadOnlyDBImpl.
      
      Test Plan: db_bench
      
      Reviewers: yhchiang, igor, sdong
      
      Reviewed By: sdong
      
      Subscribers: leveldb
      
      Differential Revision: https://reviews.facebook.net/D23553
      3c680061
    • I
      Fix double deletes · f7375f39
      Igor Canadi 提交于
      Summary: While debugging clients compaction issues, I noticed bunch of delete bugs: P16329995. MakeTableName returns sst file with "/" prefix. We also need "/" prefix when we get the files though GetChildren(), so that we can properly dedup the files.
      
      Test Plan: none
      
      Reviewers: sdong, yhchiang, ljin
      
      Reviewed By: ljin
      
      Subscribers: leveldb
      
      Differential Revision: https://reviews.facebook.net/D23457
      f7375f39
  2. 25 9月, 2014 5 次提交
  3. 24 9月, 2014 8 次提交
  4. 23 9月, 2014 7 次提交
  5. 22 9月, 2014 4 次提交
  6. 21 9月, 2014 2 次提交
  7. 20 9月, 2014 6 次提交
  8. 19 9月, 2014 1 次提交