1. 28 5月, 2016 1 次提交
    • S
      Handle overflow case of rate limiter's paramters · f62fbd2c
      sdong 提交于
      Summary: When rate_bytes_per_sec * refill_period_us_ overflows, the actual limited rate is very low. Handle this case so the rate will be large.
      
      Test Plan: Add a unit test for it.
      
      Reviewers: IslamAbdelRahman, andrewkr
      
      Reviewed By: andrewkr
      
      Subscribers: yiwu, lightmark, leveldb, andrewkr, dhruba
      
      Differential Revision: https://reviews.facebook.net/D58929
      f62fbd2c
  2. 10 2月, 2016 1 次提交
  3. 14 1月, 2016 1 次提交
  4. 26 12月, 2015 1 次提交
    • N
      support for concurrent adds to memtable · 7d87f027
      Nathan Bronson 提交于
      Summary:
      This diff adds support for concurrent adds to the skiplist memtable
      implementations.  Memory allocation is made thread-safe by the addition of
      a spinlock, with small per-core buffers to avoid contention.  Concurrent
      memtable writes are made via an additional method and don't impose a
      performance overhead on the non-concurrent case, so parallelism can be
      selected on a per-batch basis.
      
      Write thread synchronization is an increasing bottleneck for higher levels
      of concurrency, so this diff adds --enable_write_thread_adaptive_yield
      (default off).  This feature causes threads joining a write batch
      group to spin for a short time (default 100 usec) using sched_yield,
      rather than going to sleep on a mutex.  If the timing of the yield calls
      indicates that another thread has actually run during the yield then
      spinning is avoided.  This option improves performance for concurrent
      situations even without parallel adds, although it has the potential to
      increase CPU usage (and the heuristic adaptation is not yet mature).
      
      Parallel writes are not currently compatible with
      inplace updates, update callbacks, or delete filtering.
      Enable it with --allow_concurrent_memtable_write (and
      --enable_write_thread_adaptive_yield).  Parallel memtable writes
      are performance neutral when there is no actual parallelism, and in
      my experiments (SSD server-class Linux and varying contention and key
      sizes for fillrandom) they are always a performance win when there is
      more than one thread.
      
      Statistics are updated earlier in the write path, dropping the number
      of DB mutex acquisitions from 2 to 1 for almost all cases.
      
      This diff was motivated and inspired by Yahoo's cLSM work.  It is more
      conservative than cLSM: RocksDB's write batch group leader role is
      preserved (along with all of the existing flush and write throttling
      logic) and concurrent writers are blocked until all memtable insertions
      have completed and the sequence number has been advanced, to preserve
      linearizability.
      
      My test config is "db_bench -benchmarks=fillrandom -threads=$T
      -batch_size=1 -memtablerep=skip_list -value_size=100 --num=1000000/$T
      -level0_slowdown_writes_trigger=9999 -level0_stop_writes_trigger=9999
      -disable_auto_compactions --max_write_buffer_number=8
      -max_background_flushes=8 --disable_wal --write_buffer_size=160000000
      --block_size=16384 --allow_concurrent_memtable_write" on a two-socket
      Xeon E5-2660 @ 2.2Ghz with lots of memory and an SSD hard drive.  With 1
      thread I get ~440Kops/sec.  Peak performance for 1 socket (numactl
      -N1) is slightly more than 1Mops/sec, at 16 threads.  Peak performance
      across both sockets happens at 30 threads, and is ~900Kops/sec, although
      with fewer threads there is less performance loss when the system has
      background work.
      
      Test Plan:
      1. concurrent stress tests for InlineSkipList and DynamicBloom
      2. make clean; make check
      3. make clean; DISABLE_JEMALLOC=1 make valgrind_check; valgrind db_bench
      4. make clean; COMPILE_WITH_TSAN=1 make all check; db_bench
      5. make clean; COMPILE_WITH_ASAN=1 make all check; db_bench
      6. make clean; OPT=-DROCKSDB_LITE make check
      7. verify no perf regressions when disabled
      
      Reviewers: igor, sdong
      
      Reviewed By: sdong
      
      Subscribers: MarkCallaghan, IslamAbdelRahman, anthony, yhchiang, rven, sdong, guyg8, kradhakrishnan, dhruba
      
      Differential Revision: https://reviews.facebook.net/D50589
      7d87f027
  5. 11 12月, 2015 1 次提交
  6. 17 11月, 2015 1 次提交
    • I
      Lint everything · a163cc2d
      Islam AbdelRahman 提交于
      Summary:
      ```
      arc2 lint --everything
      ```
      
      run the linter on the whole code repo to fix exisitng lint issues
      
      Test Plan: make check -j64
      
      Reviewers: sdong, rven, anthony, kradhakrishnan, yhchiang
      
      Reviewed By: yhchiang
      
      Subscribers: dhruba, leveldb
      
      Differential Revision: https://reviews.facebook.net/D50769
      a163cc2d
  7. 23 9月, 2015 1 次提交
  8. 11 9月, 2015 1 次提交
  9. 26 8月, 2015 2 次提交
  10. 18 7月, 2015 2 次提交
    • S
      Move rate_limiter, write buffering, most perf context instrumentation and most... · 6e9fbeb2
      sdong 提交于
      Move rate_limiter, write buffering, most perf context instrumentation and most random kill out of Env
      
      Summary: We want to keep Env a think layer for better portability. Less platform dependent codes should be moved out of Env. In this patch, I create a wrapper of file readers and writers, and put rate limiting, write buffering, as well as most perf context instrumentation and random kill out of Env. It will make it easier to maintain multiple Env in the future.
      
      Test Plan: Run all existing unit tests.
      
      Reviewers: anthony, kradhakrishnan, IslamAbdelRahman, yhchiang, igor
      
      Reviewed By: igor
      
      Subscribers: leveldb, dhruba
      
      Differential Revision: https://reviews.facebook.net/D42321
      6e9fbeb2
    • S
      Cleaning up CYGWIN define of fread_unlocked to port · 5ec829bc
      sdong 提交于
      Summary: CYGWIN avoided fread_unlocked in a wrong way. Fix it to the standard way.
      
      Test Plan: Run tests
      
      Reviewers: anthony, kradhakrishnan, IslamAbdelRahman, yhchiang, igor
      
      Reviewed By: igor
      
      Subscribers: leveldb, dhruba
      
      Differential Revision: https://reviews.facebook.net/D42549
      5ec829bc
  11. 14 7月, 2015 1 次提交
    • S
      "make format" against last 10 commits · f9728640
      sdong 提交于
      Summary: This helps Windows port to format their changes, as discussed. Might have formatted some other codes too becasue last 10 commits include more.
      
      Test Plan: Build it.
      
      Reviewers: anthony, IslamAbdelRahman, kradhakrishnan, yhchiang, igor
      
      Reviewed By: igor
      
      Subscribers: leveldb, dhruba
      
      Differential Revision: https://reviews.facebook.net/D41961
      f9728640
  12. 12 7月, 2015 1 次提交
  13. 08 7月, 2015 1 次提交
  14. 02 7月, 2015 1 次提交
    • D
      Windows Port from Microsoft · 18285c1e
      Dmitri Smirnov 提交于
       Summary: Make RocksDb build and run on Windows to be functionally
       complete and performant. All existing test cases run with no
       regressions. Performance numbers are in the pull-request.
      
       Test plan: make all of the existing unit tests pass, obtain perf numbers.
      
       Co-authored-by: Praveen Rao praveensinghrao@outlook.com
       Co-authored-by: Sherlock Huang baihan.huang@gmail.com
       Co-authored-by: Alex Zinoviev alexander.zinoviev@me.com
       Co-authored-by: Dmitri Smirnov dmitrism@microsoft.com
      18285c1e
  15. 27 2月, 2015 1 次提交
  16. 24 2月, 2015 1 次提交
  17. 10 1月, 2015 1 次提交
  18. 12 11月, 2014 1 次提交
    • I
      Turn on -Wshorten-64-to-32 and fix all the errors · 767777c2
      Igor Canadi 提交于
      Summary:
      We need to turn on -Wshorten-64-to-32 for mobile. See D1671432 (internal phabricator) for details.
      
      This diff turns on the warning flag and fixes all the errors. There were also some interesting errors that I might call bugs, especially in plain table. Going forward, I think it makes sense to have this flag turned on and be very very careful when converting 64-bit to 32-bit variables.
      
      Test Plan: compiles
      
      Reviewers: ljin, rven, yhchiang, sdong
      
      Reviewed By: yhchiang
      
      Subscribers: bobbaldwin, dhruba, leveldb
      
      Differential Revision: https://reviews.facebook.net/D28689
      767777c2
  19. 01 11月, 2014 1 次提交
    • I
      Turn on -Wshadow · 9f7fc3ac
      Igor Canadi 提交于
      Summary:
      ...and fix all the errors :)
      
      Jim suggested turning on -Wshadow because it helped him fix number of critical bugs in fbcode. I think it's a good idea to be -Wshadow clean.
      
      Test Plan: compiles
      
      Reviewers: yhchiang, rven, sdong, ljin
      
      Reviewed By: ljin
      
      Subscribers: dhruba, leveldb
      
      Differential Revision: https://reviews.facebook.net/D27711
      9f7fc3ac
  20. 28 10月, 2014 1 次提交
    • I
      Deprecate AtomicPointer · 48842ab3
      Igor Canadi 提交于
      Summary: RocksDB already depends on C++11, so we might as well all the goodness that C++11 provides. This means that we don't need AtomicPointer anymore. The less things in port/, the easier it will be to port to other platforms.
      
      Test Plan: make check + careful visual review verifying that NoBarried got memory_order_relaxed, while Acquire/Release methods got memory_order_acquire and memory_order_release
      
      Reviewers: rven, yhchiang, ljin, sdong
      
      Reviewed By: ljin
      
      Subscribers: leveldb
      
      Differential Revision: https://reviews.facebook.net/D27543
      48842ab3
  21. 04 7月, 2014 1 次提交
  22. 17 6月, 2014 1 次提交
    • B
      Add separate Read/WriteUnlock methods in MutexRW. · 2d02ec65
      Bradley Grainger 提交于
      Some platforms, particularly Windows, do not have a single method that can
      release both a held reader lock and a held writer lock; instead, a
      separate method (ReleaseSRWLockShared or ReleaseSRWLockExclusive) must be
      called in each case.
      
      This may also be necessary to back MutexRW with a shared_mutex in C++14;
      the current language proposal includes both an unlock() and a
      shared_unlock() method.
      2d02ec65
  23. 13 6月, 2014 1 次提交
  24. 06 5月, 2014 1 次提交
    • I
      Make rocksdb work with all versions of lz4 · 9e7d00d9
      Igor Canadi 提交于
      Summary:
      There are some projects in fbcode that define lz4 dependency on r108. We, however, defined dependency on r117. That produced some interesting issues and our build system was not happy.
      
      This diff makes rocksdb work with both r108 and r117. Hopefully this will fix our problems.
      
      Test Plan: compiled rocksdb with both r108 and r117 lz4
      
      Reviewers: dhruba, sdong, haobo
      
      Reviewed By: sdong
      
      CC: leveldb
      
      Differential Revision: https://reviews.facebook.net/D18465
      9e7d00d9
  25. 23 4月, 2014 2 次提交
  26. 09 4月, 2014 1 次提交
    • L
      db_bench cleanup · 0c1126d4
      Lei Jin 提交于
      Summary:
      clean up the db_bench a little bit. also avoid allocating memory for key
      in the loop
      
      Test Plan:
      I verified a run with filluniquerandom & readrandom. Iterator seek will be used lot
      to measure performance. Will fix whatever comes up
      
      Reviewers: haobo, igor, yhchiang
      
      Reviewed By: igor
      
      CC: leveldb
      
      Differential Revision: https://reviews.facebook.net/D17559
      0c1126d4
  27. 29 3月, 2014 1 次提交
  28. 27 3月, 2014 1 次提交
    • I
      AssertHeld() should do things · 954679bb
      Igor Canadi 提交于
      Summary:
      AssertHeld() was a no-op before. Now it does things.
      
      Also, this change caught a bad bug in SuperVersion::Init(). The method is calling db->mutex.AssertHeld(), but db variable is not initialized yet! I also fixed that issue.
      
      Test Plan: make check
      
      Reviewers: dhruba, haobo, ljin, sdong, yhchiang
      
      Reviewed By: haobo
      
      CC: leveldb
      
      Differential Revision: https://reviews.facebook.net/D17193
      954679bb
  29. 09 2月, 2014 1 次提交
  30. 07 2月, 2014 1 次提交
  31. 06 2月, 2014 1 次提交
  32. 19 11月, 2013 1 次提交
  33. 17 10月, 2013 1 次提交
  34. 05 10月, 2013 1 次提交
  35. 24 8月, 2013 1 次提交
  36. 19 6月, 2013 1 次提交
    • J
      Fix Zlib_Compress and Zlib_Uncompress · 09de7a3b
      Jim Paton 提交于
      Summary:
      Zlib_{Compress,Uncompress} did not handle very small input buffers properly. In addition, they did not call inflate/deflate until Z_STREAM_END was returned; it was possible for them to exit when only Z_OK had returned.
      
      This diff also fixes a bunch of lint errors.
      
      Test Plan: Run make check
      
      Reviewers: dhruba, sheki, haobo
      
      Reviewed By: dhruba
      
      CC: leveldb
      
      Differential Revision: https://reviews.facebook.net/D11301
      09de7a3b
  37. 02 6月, 2013 1 次提交
    • H
      [RocksDB] Introduce Fast Mutex option · d897d33b
      Haobo Xu 提交于
      Summary:
      This diff adds an option to specify whether PTHREAD_MUTEX_ADAPTIVE_NP will be enabled for the rocksdb single big kernel lock. db_bench also have this option now.
      Quickly tested 8 thread cpu bound 100 byte random read.
      No fast mutex: ~750k/s ops
      With fast mutex: ~880k/s ops
      
      Test Plan: make check; db_bench; db_stress
      
      Reviewers: dhruba
      
      CC: MarkCallaghan, leveldb
      
      Differential Revision: https://reviews.facebook.net/D11031
      d897d33b