1. 13 1月, 2018 1 次提交
  2. 12 1月, 2018 1 次提交
  3. 06 1月, 2018 2 次提交
  4. 04 1月, 2018 1 次提交
  5. 20 12月, 2017 1 次提交
    • Y
      Port 3 way SSE4.2 crc32c implementation from Folly · f54d7f5f
      yingsu00 提交于
      Summary:
      **# Summary**
      
      RocksDB uses SSE crc32 intrinsics to calculate the crc32 values but it does it in single way fashion (not pipelined on single CPU core). Intel's whitepaper () published an algorithm that uses 3-way pipelining for the crc32 intrinsics, then use pclmulqdq intrinsic to combine the values. Because pclmulqdq has overhead on its own, this algorithm will show perf gains on buffers larger than 216 bytes, which makes RocksDB a perfect user, since most of the buffers RocksDB call crc32c on is over 4KB. Initial db_bench show tremendous CPU gain.
      
      This change uses the 3-way SSE algorithm by default. The old SSE algorithm is now behind a compiler tag NO_THREEWAY_CRC32C. If user compiles the code with NO_THREEWAY_CRC32C=1 then the old SSE Crc32c algorithm would be used. If the server does not have SSE4.2 at the run time the slow way (Non SSE) will be used.
      
      **# Performance Test Results**
      We ran the FillRandom and ReadRandom benchmarks in db_bench. ReadRandom is the point of interest here since it calculates the CRC32 for the in-mem buffers. We did 3 runs for each algorithm.
      
      Before this change the CRC32 value computation takes about 11.5% of total CPU cost, and with the new 3-way algorithm it reduced to around 4.5%. The overall throughput also improved from 25.53MB/s to 27.63MB/s.
      
      1) ReadRandom in db_bench overall metrics
      
          PER RUN
          Algorithm | run | micros/op | ops/sec |Throughput (MB/s)
          3-way      |  1   | 4.143   | 241387 | 26.7
          3-way      |  2   | 3.775   | 264872 | 29.3
          3-way      | 3    | 4.116   | 242929 | 26.9
          FastCrc32c|1  | 4.037   | 247727 | 27.4
          FastCrc32c|2  | 4.648   | 215166 | 23.8
          FastCrc32c|3  | 4.352   | 229799 | 25.4
      
           AVG
          Algorithm     |    Average of micros/op |   Average of ops/sec |    Average of Throughput (MB/s)
          3-way           |     4.01                               |      249,729                 |      27.63
          FastCrc32c  |     4.35                              |     230,897                  |      25.53
      
       2)   Crc32c computation CPU cost (inclusive samples percentage)
          PER RUN
          Implementation | run |  TotalSamples   | Crc32c percentage
          3-way                 |  1    |  4,572,250,000 | 4.37%
          3-way                 |  2    |  3,779,250,000 | 4.62%
          3-way                 |  3    |  4,129,500,000 | 4.48%
          FastCrc32c       |  1    |  4,663,500,000 | 11.24%
          FastCrc32c       |  2    |  4,047,500,000 | 12.34%
          FastCrc32c       |  3    |  4,366,750,000 | 11.68%
      
       **# Test Plan**
           make -j64 corruption_test && ./corruption_test
            By default it uses 3-way SSE algorithm
      
           NO_THREEWAY_CRC32C=1 make -j64 corruption_test && ./corruption_test
      
          make clean && DEBUG_LEVEL=0 make -j64 db_bench
          make clean && DEBUG_LEVEL=0 NO_THREEWAY_CRC32C=1 make -j64 db_bench
      Closes https://github.com/facebook/rocksdb/pull/3173
      
      Differential Revision: D6330882
      
      Pulled By: yingsu00
      
      fbshipit-source-id: 8ec3d89719533b63b536a736663ca6f0dd4482e9
      f54d7f5f
  6. 19 12月, 2017 1 次提交
  7. 16 11月, 2017 1 次提交
    • Y
      Suppress valgrind "unimplemented functionality" error · bbcd3b0b
      Yi Wu 提交于
      Summary:
      Add ROCKSDB_VALGRIND_RUN macro and suppress false-positive "unimplemented functionality" throw by valgrind for steam hints.
      
      Another approach would be add a valgrind suppress file. Valgrind is suppose to print the suppression when given "--gen-suppressions=all" param, which is suppose to be the content for the suppression file. But it doesn't print.
      Closes https://github.com/facebook/rocksdb/pull/3174
      
      Differential Revision: D6338786
      
      Pulled By: yiwu-arbug
      
      fbshipit-source-id: 3559efa5f3b92d40d09ad6ac82bc7b59f86c75aa
      bbcd3b0b
  8. 14 11月, 2017 1 次提交
  9. 13 10月, 2017 1 次提交
  10. 06 10月, 2017 1 次提交
  11. 05 10月, 2017 1 次提交
    • A
      rate limit auto-tuning · 1026e794
      Andrew Kryczka 提交于
      Summary:
      Dynamic adjustment of rate limit according to demand for background I/O. It increases by a factor when limiter is drained too frequently, and decreases by the same factor when limiter is not drained frequently enough. The parameters for this behavior are fixed in `GenericRateLimiter::Tune`. Other changes:
      
      - make rate limiter's `Env*` configurable for testing
      - track num drain intervals in RateLimiter so we don't have to rely on stats, which may be shared across different DB instances from the ones that share the RateLimiter.
      Closes https://github.com/facebook/rocksdb/pull/2899
      
      Differential Revision: D5858704
      
      Pulled By: ajkr
      
      fbshipit-source-id: cc2bac30f85e7f6fd63655d0a6732ef9ed7403b1
      1026e794
  12. 04 10月, 2017 2 次提交
    • Y
      speedup 'make check' · 92ccae71
      Yi Wu 提交于
      Summary:
      Make SnapshotConcurrentAccessTest run in the beginning of the queue.
      
      Test Plan
      `make all check -j64` on devserver
      Closes https://github.com/facebook/rocksdb/pull/2962
      
      Differential Revision: D5965871
      
      Pulled By: yiwu-arbug
      
      fbshipit-source-id: 8cb5a47c2468be0fbbb929226a143ec5848bfaa9
      92ccae71
    • Y
      Add ValueType::kTypeBlobIndex · d1cab2b6
      Yi Wu 提交于
      Summary:
      Add kTypeBlobIndex value type, which will be used by blob db only, to insert a (key, blob_offset) KV pair. The purpose is to
      1. Make it possible to open existing rocksdb instance as blob db. Existing value will be of kTypeIndex type, while value inserted by blob db will be of kTypeBlobIndex.
      2. Make rocksdb able to detect if the db contains value written by blob db, if so return error.
      3. Make it possible to have blob db optionally store value in SST file (with kTypeValue type) or as a blob value (with kTypeBlobIndex type).
      
      The root db (DBImpl) basically pretended kTypeBlobIndex are normal value on write. On Get if is_blob is provided, return whether the value read is of kTypeBlobIndex type, or return Status::NotSupported() status if is_blob is not provided. On scan allow_blob flag is pass and if the flag is true, return wether the value is of kTypeBlobIndex type via iter->IsBlob().
      
      Changes on blob db side will be in a separate patch.
      Closes https://github.com/facebook/rocksdb/pull/2886
      
      Differential Revision: D5838431
      
      Pulled By: yiwu-arbug
      
      fbshipit-source-id: 3c5306c62bc13bb11abc03422ec5cbcea1203cca
      d1cab2b6
  13. 03 10月, 2017 1 次提交
  14. 01 9月, 2017 2 次提交
  15. 15 8月, 2017 1 次提交
  16. 11 8月, 2017 2 次提交
  17. 10 8月, 2017 1 次提交
    • D
      Makefile: correct faligned-new test · 1fbad84b
      Daniel Black 提交于
      Summary:
      Commit 4f81ab38 has the test wrong.
      
      clang doesn't support a -dumpversion option. By lucky coincidence
      clang/gcc --version both place a version number at the same output location
      when --verison is passed.
      
      Example output (1st line only).
      
          $ clang --version
          clang version 3.9.1 (tags/RELEASE_391/final)
      
          $ gcc --version
          gcc (GCC) 6.4.1 20170727 (Red Hat 6.4.1-1)
      
      During the test of the compiler we ensure that a minimum version is met
      as Makefile doesn't support patterns.
      
      Also xcode9 doesn't seem affected by https://github.com/facebook/rocksdb/issues/2672
      and also doesn't have "clang" as the first part of its output so the
      fix implemented here also is Apple clang friendly.
      
          $ clang --version
          Apple LLVM version 9.0.0 (clang-900.0.31)
      Signed-off-by: NDaniel Black <daniel.black@au.ibm.com>
      Closes https://github.com/facebook/rocksdb/pull/2699
      
      Differential Revision: D5600818
      
      Pulled By: yiwu-arbug
      
      fbshipit-source-id: 3b0f2751becb53c1c35468bf29f3f828e7cf2c2a
      1fbad84b
  18. 05 8月, 2017 1 次提交
  19. 04 8月, 2017 1 次提交
  20. 29 7月, 2017 1 次提交
    • S
      Replace dynamic_cast<> · 21696ba5
      Siying Dong 提交于
      Summary:
      Replace dynamic_cast<> so that users can choose to build with RTTI off, so that they can save several bytes per object, and get tiny more memory available.
      Some nontrivial changes:
      1. Add Comparator::GetRootComparator() to get around the internal comparator hack
      2. Add the two experiemental functions to DB
      3. Add TableFactory::GetOptionString() to avoid unnecessary casting to get the option string
      4. Since 3 is done, move the parsing option functions for table factory to table factory files too, to be symmetric.
      Closes https://github.com/facebook/rocksdb/pull/2645
      
      Differential Revision: D5502723
      
      Pulled By: siying
      
      fbshipit-source-id: fd13cec5601cf68a554d87bfcf056f2ffa5fbf7c
      21696ba5
  21. 28 7月, 2017 1 次提交
  22. 27 7月, 2017 2 次提交
  23. 22 7月, 2017 1 次提交
    • P
      Cassandra compaction filter for purge expired columns and rows · 534c255c
      Pengchao Wang 提交于
      Summary:
      Major changes in this PR:
      * Implement CassandraCompactionFilter to remove expired columns and rows (if all column expired)
      * Move cassandra related code from utilities/merge_operators/cassandra to utilities/cassandra/*
      * Switch to use shared_ptr<> from uniqu_ptr for Column membership management in RowValue. Since columns do have multiple owners in Merge and GC process, use shared_ptr helps make RowValue immutable.
      * Rename cassandra_merge_test to cassandra_functional_test and add two TTL compaction related tests there.
      Closes https://github.com/facebook/rocksdb/pull/2588
      
      Differential Revision: D5430010
      
      Pulled By: wpc
      
      fbshipit-source-id: 9566c21e06de17491d486a68c70f52d501f27687
      534c255c
  24. 11 7月, 2017 1 次提交
    • G
      Fix undefined behavior in Hash · 8f927e5f
      Giuseppe Ottaviano 提交于
      Summary:
      Instead of ignoring UBSan checks, fix the negative shifts in
      Hash(). Also add test to make sure the hash values are stable over
      time. The values were computed before this change, so the test also
      verifies the correctness of the change.
      Closes https://github.com/facebook/rocksdb/pull/2546
      
      Differential Revision: D5386369
      
      Pulled By: yiwu-arbug
      
      fbshipit-source-id: 6de4b44461a544d6222cc5d72d8cda2c0373d17e
      8f927e5f
  25. 28 6月, 2017 1 次提交
    • Y
      Fix TARGETS file tests list · 982cec22
      Yi Wu 提交于
      Summary:
      1. The buckifier script assume each test "foo" comes with a .cc file of the same name (i.e. foo.cc). Update cassandra tests to follow this pattern so that the buckifier script can recognize them.
      2. add blob_db_test
      Closes https://github.com/facebook/rocksdb/pull/2506
      
      Differential Revision: D5331517
      
      Pulled By: yiwu-arbug
      
      fbshipit-source-id: 86f3eba471fc621186ab44cbd073b6162cde8e57
      982cec22
  26. 27 6月, 2017 1 次提交
    • E
      Encryption at rest support · 51778612
      Ewout Prangsma 提交于
      Summary:
      This PR adds support for encrypting data stored by RocksDB when written to disk.
      
      It adds an `EncryptedEnv` override of the `Env` class with matching overrides for sequential&random access files.
      The encryption itself is done through a configurable `EncryptionProvider`. This class creates is asked to create `BlockAccessCipherStream` for a file. This is where the actual encryption/decryption is being done.
      Currently there is a Counter mode implementation of `BlockAccessCipherStream` with a `ROT13` block cipher (NOTE the `ROT13` is for demo purposes only!!).
      
      The Counter operation mode uses an initial counter & random initialization vector (IV).
      Both are created randomly for each file and stored in a 4K (default size) block that is prefixed to that file. The `EncryptedEnv` implementation is such that clients of the `Env` class do not see this prefix (nor data, nor in filesize).
      The largest part of the prefix block is also encrypted, and there is room left for implementation specific settings/values/keys in there.
      
      To test the encryption, the `DBTestBase` class has been extended to consider a new environment variable called `ENCRYPTED_ENV`. If set, the test will setup a encrypted instance of the `Env` class to use for all tests.
      Typically you would run it like this:
      
      ```
      ENCRYPTED_ENV=1 make check_some
      ```
      
      There is also an added test that checks that some data inserted into the database is or is not "visible" on disk. With `ENCRYPTED_ENV` active it must not find plain text strings, with `ENCRYPTED_ENV` unset, it must find the plain text strings.
      Closes https://github.com/facebook/rocksdb/pull/2424
      
      Differential Revision: D5322178
      
      Pulled By: sdwilsh
      
      fbshipit-source-id: 253b0a9c2c498cc98f580df7f2623cbf7678a27f
      51778612
  27. 17 6月, 2017 1 次提交
  28. 06 6月, 2017 1 次提交
  29. 03 6月, 2017 1 次提交
    • S
      Improve write buffer manager (and allow the size to be tracked in block cache) · 95b0e89b
      Siying Dong 提交于
      Summary:
      Improve write buffer manager in several ways:
      1. Size is tracked when arena block is allocated, rather than every allocation, so that it can better track actual memory usage and the tracking overhead is slightly lower.
      2. We start to trigger memtable flush when 7/8 of the memory cap hits, instead of 100%, and make 100% much harder to hit.
      3. Allow a cache object to be passed into buffer manager and the size allocated by memtable can be costed there. This can help users have one single memory cap across block cache and memtable.
      Closes https://github.com/facebook/rocksdb/pull/2350
      
      Differential Revision: D5110648
      
      Pulled By: siying
      
      fbshipit-source-id: b4238113094bf22574001e446b5d88523ba00017
      95b0e89b
  30. 01 6月, 2017 1 次提交
    • Y
      Fixing blob db sequence number handling · ad19eb86
      Yi Wu 提交于
      Summary:
      Blob db rely on base db returning sequence number through write batch after DB::Write(). However after recent changes to the write path, DB::Writ()e no longer return sequence number in some cases. Fixing it by have WriteBatchInternal::InsertInto() always encode sequence number into write batch.
      
      Stacking on #2375.
      Closes https://github.com/facebook/rocksdb/pull/2385
      
      Differential Revision: D5148358
      
      Pulled By: yiwu-arbug
      
      fbshipit-source-id: 8bda0aa07b9334ed03ed381548b39d167dc20c33
      ad19eb86
  31. 31 5月, 2017 2 次提交
  32. 27 5月, 2017 1 次提交
    • S
      Clean zstd files · 6c456eca
      Sagar Vemuri 提交于
      Summary:
      zstd files are downloaded and used as part of JNI build, but are left behind even after doing a `make clean`. This PR updates the `clean` target to remove these zstd files as well.
      Closes https://github.com/facebook/rocksdb/pull/2365
      
      Differential Revision: D5123537
      
      Pulled By: sagar0
      
      fbshipit-source-id: a8f355da5ba961aa89d5852e35751ffc35de03ea
      6c456eca
  33. 24 5月, 2017 1 次提交
  34. 19 5月, 2017 1 次提交