1. 29 6月, 2016 1 次提交
    • Y
      Improve regression_test.sh · faa7eb3b
      Yueh-Hsuan Chiang 提交于
      Summary:
      This diff makes the following improvement in regression_test.sh:
      
      1. Add NUM_OPS and DELETE_TEST_PATH to regression_test.sh:
      
        * NUM_OPS:  The number of operations that will be issued
          in EACH thread.
          Default: $NUM_KEYS / $NUM_THREADS
      
        * DELETE_TEST_PATH: If true, then the test directory
          will be deleted after the script ends.
          Default: 0
      2. Add more information in SUMMARY.csv
      3. Fix a bug in regression_test.sh where each thread in fillseq will all issue $NUM_KEYS writes.
      4. Add --deletes in db_bench, which allows us to control the number of deletes instead of must using FLAGS_num.
      
      Test Plan: run regression test with and without DELETE_TEST_PATH and NUM_OPS
      
      Reviewers: yiwu, sdong, IslamAbdelRahman, gunnarku
      
      Reviewed By: gunnarku
      
      Subscribers: andrewkr, dhruba, leveldb
      
      Differential Revision: https://reviews.facebook.net/D60039
      faa7eb3b
  2. 18 6月, 2016 1 次提交
    • S
      Deprectate filter_deletes · 7b79238b
      sdong 提交于
      Summary: filter_deltes is not a frequently used feature. Remove it.
      
      Test Plan: Run all test suites.
      
      Reviewers: igor, yhchiang, IslamAbdelRahman
      
      Reviewed By: IslamAbdelRahman
      
      Subscribers: leveldb, andrewkr, dhruba
      
      Differential Revision: https://reviews.facebook.net/D59427
      7b79238b
  3. 11 6月, 2016 1 次提交
    • S
      memtable_prefix_bloom_bits -> memtable_prefix_bloom_bits_ratio and deprecate... · 20699df8
      sdong 提交于
      memtable_prefix_bloom_bits -> memtable_prefix_bloom_bits_ratio and deprecate memtable_prefix_bloom_probes
      
      Summary:
      memtable_prefix_bloom_probes is not a critical option. Remove it to reduce number of options.
      It's easier for users to make mistakes with memtable_prefix_bloom_bits, turn it to memtable_prefix_bloom_bits_ratio
      
      Test Plan: Run all existing tests
      
      Reviewers: yhchiang, igor, IslamAbdelRahman
      
      Reviewed By: IslamAbdelRahman
      
      Subscribers: gunnarku, yoshinorim, MarkCallaghan, leveldb, andrewkr, dhruba
      
      Differential Revision: https://reviews.facebook.net/D59199
      20699df8
  4. 10 6月, 2016 1 次提交
    • A
      URI-based Env selection for db_bench · a683d4ab
      Andrew Kryczka 提交于
      Summary:
      Added an option, --env_uri. When provided, it is used as an argument to
      NewEnvFromUri(), which instantiates an Env based on it.
      
      Test Plan:
      built a simple binary that registers ChrootEnv for prefix "/", then
      ran:
      
        $ ./tmp --env_uri /tmp/ --db /abcde
      
      /tmp/ is the chroot directory and /abcde is the db_name. Then I verified
      db_bench uses /tmp/abcde
      
      Reviewers: sdong, kradhakrishnan, lightmark
      
      Reviewed By: lightmark
      
      Subscribers: andrewkr, dhruba, leveldb
      
      Differential Revision: https://reviews.facebook.net/D59325
      a683d4ab
  5. 03 6月, 2016 1 次提交
    • Y
      Allows db_bench to take an options file · 88acd932
      Yueh-Hsuan Chiang 提交于
      Summary:
      This patch allows db_bench to initialize it's RocksDB Options via a
      options file, specified by the --options_file flag.  Note that if
      --options_file flag is set, then it has higher priority than the
      command-line argument.
      
      Test Plan: db_bench_tool_test
      
      Reviewers: sdong, IslamAbdelRahman, kradhakrishnan, yiwu, andrewkr
      
      Reviewed By: andrewkr
      
      Subscribers: andrewkr, dhruba, leveldb
      
      Differential Revision: https://reviews.facebook.net/D58533
      88acd932
  6. 25 5月, 2016 1 次提交
  7. 24 5月, 2016 1 次提交
    • A
      add simulator Cache as class SimCache/SimLRUCache(with test) · 5d660258
      Aaron Gao 提交于
      Summary: add class SimCache(base class with instrumentation api) and SimLRUCache(derived class with detailed implementation) which is used as an instrumented block cache that can predict hit rate for different cache size
      
      Test Plan:
      Add a test case in `db_block_cache_test.cc` called `SimCacheTest` to test basic logic of SimCache.
      Also add option `-simcache_size` in db_bench. if set with a value other than -1, then the benchmark will use this value as the size of the simulator cache and finally output the simulation result.
      ```
      [gzh@dev9927.prn1 ~/local/rocksdb] ./db_bench -benchmarks "fillseq,readrandom" -cache_size 1000000 -simcache_size 1000000
      RocksDB:    version 4.8
      Date:       Tue May 17 16:56:16 2016
      CPU:        32 * Intel(R) Xeon(R) CPU E5-2660 0 @ 2.20GHz
      CPUCache:   20480 KB
      Keys:       16 bytes each
      Values:     100 bytes each (50 bytes after compression)
      Entries:    1000000
      Prefix:    0 bytes
      Keys per prefix:    0
      RawSize:    110.6 MB (estimated)
      FileSize:   62.9 MB (estimated)
      Write rate: 0 bytes/second
      Compression: Snappy
      Memtablerep: skip_list
      Perf Level: 0
      WARNING: Assertions are enabled; benchmarks unnecessarily slow
      ------------------------------------------------
      DB path: [/tmp/rocksdbtest-112628/dbbench]
      fillseq      :       6.809 micros/op 146874 ops/sec;   16.2 MB/s
      DB path: [/tmp/rocksdbtest-112628/dbbench]
      readrandom   :       6.343 micros/op 157665 ops/sec;   17.4 MB/s (1000000 of 1000000 found)
      
      SIMULATOR CACHE STATISTICS:
      SimCache LOOKUPs: 986559
      SimCache HITs:    264760
      SimCache HITRATE: 26.84%
      
      [gzh@dev9927.prn1 ~/local/rocksdb] ./db_bench -benchmarks "fillseq,readrandom" -cache_size 1000000 -simcache_size 10000000
      RocksDB:    version 4.8
      Date:       Tue May 17 16:57:10 2016
      CPU:        32 * Intel(R) Xeon(R) CPU E5-2660 0 @ 2.20GHz
      CPUCache:   20480 KB
      Keys:       16 bytes each
      Values:     100 bytes each (50 bytes after compression)
      Entries:    1000000
      Prefix:    0 bytes
      Keys per prefix:    0
      RawSize:    110.6 MB (estimated)
      FileSize:   62.9 MB (estimated)
      Write rate: 0 bytes/second
      Compression: Snappy
      Memtablerep: skip_list
      Perf Level: 0
      WARNING: Assertions are enabled; benchmarks unnecessarily slow
      ------------------------------------------------
      DB path: [/tmp/rocksdbtest-112628/dbbench]
      fillseq      :       5.066 micros/op 197394 ops/sec;   21.8 MB/s
      DB path: [/tmp/rocksdbtest-112628/dbbench]
      readrandom   :       6.457 micros/op 154870 ops/sec;   17.1 MB/s (1000000 of 1000000 found)
      
      SIMULATOR CACHE STATISTICS:
      SimCache LOOKUPs: 1059764
      SimCache HITs:    374501
      SimCache HITRATE: 35.34%
      
      [gzh@dev9927.prn1 ~/local/rocksdb] ./db_bench -benchmarks "fillseq,readrandom" -cache_size 1000000 -simcache_size 100000000
      RocksDB:    version 4.8
      Date:       Tue May 17 16:57:32 2016
      CPU:        32 * Intel(R) Xeon(R) CPU E5-2660 0 @ 2.20GHz
      CPUCache:   20480 KB
      Keys:       16 bytes each
      Values:     100 bytes each (50 bytes after compression)
      Entries:    1000000
      Prefix:    0 bytes
      Keys per prefix:    0
      RawSize:    110.6 MB (estimated)
      FileSize:   62.9 MB (estimated)
      Write rate: 0 bytes/second
      Compression: Snappy
      Memtablerep: skip_list
      Perf Level: 0
      WARNING: Assertions are enabled; benchmarks unnecessarily slow
      ------------------------------------------------
      DB path: [/tmp/rocksdbtest-112628/dbbench]
      fillseq      :       5.632 micros/op 177572 ops/sec;   19.6 MB/s
      DB path: [/tmp/rocksdbtest-112628/dbbench]
      readrandom   :       6.892 micros/op 145094 ops/sec;   16.1 MB/s (1000000 of 1000000 found)
      
      SIMULATOR CACHE STATISTICS:
      SimCache LOOKUPs: 1150767
      SimCache HITs:    1034535
      SimCache HITRATE: 89.90%
      ```
      
      Reviewers: IslamAbdelRahman, andrewkr, sdong
      
      Reviewed By: sdong
      
      Subscribers: MarkCallaghan, andrewkr, dhruba, leveldb
      
      Differential Revision: https://reviews.facebook.net/D57999
      5d660258
  8. 16 5月, 2016 1 次提交
    • K
      Added PersistentCache abstraction · a08c8c85
      krad 提交于
      Summary:
      Added a new abstraction to cache page to RocksDB designed for the read
      cache use.
      
      RocksDB current block cache is more of an object cache. For the persistent read cache
      project, what we need is a page cache equivalent. This changes adds a cache
      abstraction to RocksDB to cache pages called PersistentCache. PersistentCache can cache
      uncompressed pages or raw pages (content as in filesystem). The user can
      choose to operate PersistentCache either in  COMPRESSED or UNCOMPRESSED mode.
      
      Blame Rev:
      
      Test Plan: Run unit tests
      
      Reviewers: sdong
      
      Subscribers: andrewkr, dhruba, leveldb
      
      Differential Revision: https://reviews.facebook.net/D55707
      a08c8c85
  9. 10 5月, 2016 2 次提交
    • Y
      Initial script for the new regression test · fca5aa6f
      Yueh-Hsuan Chiang 提交于
      Summary:
      This diff includes an initial script running a set of benchmarks for
      regression test.  The script does the following things:
      
        checkout the specified rocksdb commit (or origin/master as default)
        make clean && DEBUG_LEVEL=0 make db_bench
        setup test directories
        run set of benchmarks and store results
      
      Currently, the script will run couple benchmarks, store all the benchmark
      output, extract micros per op and percentile information for each benchmark
      and store them in a single SUMMARY.csv file.  The SUMMARY.csv will make the
      follow-up regression detection easier.
      
      In addition, the current script only takes env arguments to set important
      attributes of db_bench.  Will follow-up with a patch that allows db_bench
      to construct options from an options file.
      
      Test Plan:
      NUM_KEYS=100 ./tools/regression_test.sh
      
        Sample SUMMARY.csv file:
      
                                           commit id,                      benchmark,  ms-per-op,        p50,        p75,        p99,      p99.9,     p99.99
            7e23ddf575890510e7d2fc7a79b31a1bbf317917,                        fillseq,      15.28,      54.66,      77.14,    5000.00,   17900.00,   18483.00
            7e23ddf575890510e7d2fc7a79b31a1bbf317917,                      overwrite,      13.54,      57.69,      86.39,    3000.00,   15600.00,   17013.00
            7e23ddf575890510e7d2fc7a79b31a1bbf317917,                     readrandom,       1.04,       0.80,       1.67,     293.33,     395.00,     504.00
            7e23ddf575890510e7d2fc7a79b31a1bbf317917,               readwhilewriting,       2.75,       1.01,       1.87,     200.00,     460.00,     485.00
            7e23ddf575890510e7d2fc7a79b31a1bbf317917,                   deleterandom,       3.64,      48.12,      70.09,     200.00,     336.67,     347.00
            7e23ddf575890510e7d2fc7a79b31a1bbf317917,                     seekrandom,      24.31,     391.87,     513.69,     872.73,     990.00,    1048.00
            7e23ddf575890510e7d2fc7a79b31a1bbf317917,         seekrandomwhilewriting,      14.02,     185.14,     294.15,     700.00,    1440.00,    1527.00
      
      Reviewers: sdong, IslamAbdelRahman, kradhakrishnan, yiwu, andrewkr, gunnarku
      
      Reviewed By: gunnarku
      
      Subscribers: gunnarku, MarkCallaghan, andrewkr, dhruba, leveldb
      
      Differential Revision: https://reviews.facebook.net/D57597
      fca5aa6f
    • I
      Add --index_block_restart_interval option in db_bench · e1951b6f
      Islam AbdelRahman 提交于
      Summary:
      Pass --index_block_restart_interval flag to block_based_options in db_bench tool.
      
      Test Plan: none
      
      Reviewers: sdong, kradhakrishnan
      
      Reviewed By: kradhakrishnan
      
      Subscribers: andrewkr, dhruba
      
      Differential Revision: https://reviews.facebook.net/D57699
      e1951b6f
  10. 05 5月, 2016 1 次提交
    • M
      Add optimize_filters_for_hits option to db_bench · 9790b94c
      Mark Callaghan 提交于
      Summary:
      Add optimize_filters_for_hits option to db_bench
      
      Task ID: #
      
      Blame Rev:
      
      Test Plan:
      run db_bench
      
      Revert Plan:
      
      Database Impact:
      
      Memcache Impact:
      
      Other Notes:
      
      EImportant:
      
      - begin *PUBLIC* platform impact section -
      Bugzilla: #
      - end platform impact -
      
      Reviewers: sdong
      
      Reviewed By: sdong
      
      Subscribers: andrewkr, dhruba
      
      Differential Revision: https://reviews.facebook.net/D57621
      9790b94c
  11. 28 4月, 2016 2 次提交
    • A
      Configurable compression in db_bench · 4032145a
      Andrew Kryczka 提交于
      Summary:
      Made compression type and dictionary size configurable via environment
      variables.
      
      Depends on D52287.
      
      Test Plan:
      check these options are passed to the db.
      
        $ COMPRESSION_MAX_DICT_BYTES=65536 COMPRESSION_TYPE=LZ4 NUM_KEYS=10000000 DB_DIR=./tmp/ WAL_DIR=./tmp/ ./tools/benchmark.sh filluniquerandom
        ...
        $ grep Options.compression tmp/LOG
        2016/04/22-19:11:30.397829 7f5f263a2980          Options.compression: LZ4
        ...
        2016/04/22-19:11:30.397837 7f5f263a2980         Options.compression_opts.max_dict_bytes: 65536
      
      Reviewers: IslamAbdelRahman, sdong
      
      Reviewed By: sdong
      
      Subscribers: andrewkr, dhruba, leveldb
      
      Differential Revision: https://reviews.facebook.net/D57141
      4032145a
    • S
      Print memory allocation counters · 1c80dfab
      Sergey Makarenko 提交于
      Summary:
      Introduced option to dump malloc statistics using new option flag.
          Added new command line option to db_bench tool to enable this
          funtionality.
          Also extended build to support environments with/without jemalloc.
      
      Test Plan:
      1) Build rocksdb using `make` command. Launch the following command
          `./db_bench --benchmarks=fillrandom --dump_malloc_stats=true
          --num=10000000` end verified that jemalloc dump is present in LOG file.
          2) Build rocksdb using `DISABLE_JEMALLOC=1  make db_bench -j32` and ran
          the same db_bench tool and found the following message in LOG file:
          "Please compile with jemalloc to enable malloc dump".
          3) Also built rocksdb using `make` command on MacOS to verify behavior
          in non-FB environment.
          Also to debug build configuration change temporary changed
          AM_DEFAULT_VERBOSITY = 1 in Makefile to see compiler and build
          tools output. For case 1) -DROCKSDB_JEMALLOC was present in compiler
          command line. For both 2) and 3) this flag was not present.
      
      Reviewers: sdong
      
      Reviewed By: sdong
      
      Subscribers: andrewkr, dhruba
      
      Differential Revision: https://reviews.facebook.net/D57321
      1c80dfab
  12. 20 4月, 2016 1 次提交
  13. 16 4月, 2016 1 次提交
  14. 13 4月, 2016 1 次提交
    • H
      Update db_bench_tool.cc (#1073) · 71303e04
      Hyunyoung Lee 提交于
      * Update db_bench_tool.cc
      
      I fixed the wrong letters, LevelDB -> rocksDB, because I thought of LevelDB as the wrong presentation.
      
      the following show my fix :
      
      fprintf(stderr, "LevelDB:    version %d.%d\n",
                  kMajorVersion, kMinorVersion);
      
      ----------------->
      fprintf(stderr, "rocksDB:    version %d.%d\n",
                  kMajorVersion, kMinorVersion);
      
      * Update db_bench_tool.cc
      
      * Update db_bench_tool.cc
      71303e04
  15. 02 4月, 2016 1 次提交
    • M
      Adding pin_l0_filter_and_index_blocks_in_cache feature and related fixes. · 9b519875
      Marton Trencseni 提交于
      Summary:
      When a block based table file is opened, if prefetch_index_and_filter is true, it will prefetch the index and filter blocks, putting them into the block cache.
      What this feature adds: when a L0 block based table file is opened, if pin_l0_filter_and_index_blocks_in_cache is true in the options (and prefetch_index_and_filter is true), then the filter and index blocks aren't released back to the block cache at the end of BlockBasedTableReader::Open(). Instead the table reader takes ownership of them, hence pinning them, ie. the LRU cache will never push them out. Meanwhile in the table reader, further accesses will not hit the block cache, thus avoiding lock contention.
      
      Test Plan:
      'export TEST_TMPDIR=/dev/shm/ && DISABLE_JEMALLOC=1 OPT=-g make all valgrind_check -j32' is OK.
      I didn't run the Java tests, I don't have Java set up on my devserver.
      
      Reviewers: sdong
      
      Reviewed By: sdong
      
      Subscribers: andrewkr, dhruba
      
      Differential Revision: https://reviews.facebook.net/D56133
      9b519875
  16. 22 3月, 2016 1 次提交
  17. 18 3月, 2016 1 次提交
    • M
      Adding pin_l0_filter_and_index_blocks_in_cache feature. · 522de4f5
      Marton Trencseni 提交于
      Summary:
      When a block based table file is opened, if prefetch_index_and_filter is true, it will prefetch the index and filter blocks, putting them into the block cache.
      What this feature adds: when a L0 block based table file is opened, if pin_l0_filter_and_index_blocks_in_cache is true in the options (and prefetch_index_and_filter is true), then the filter and index blocks aren't released back to the block cache at the end of BlockBasedTableReader::Open(). Instead the table reader takes ownership of them, hence pinning them, ie. the LRU cache will never push them out. Meanwhile in the table reader, further accesses will not hit the block cache, thus avoiding lock contention.
      When the table reader is destroyed, it releases the pinned blocks (if there were any). This has to happen before the cache is destroyed, so I had to introduce a TableReader::Close(), to guarantee the order of destruction.
      
      Test Plan:
      Added two unit tests for this. Existing unit tests run fine (default is pin_l0_filter_and_index_blocks_in_cache=false).
      
      DISABLE_JEMALLOC=1 OPT=-g make all valgrind_check -j32
        Mac: OK.
        Linux: with D55287 patched in it's OK.
      
      Reviewers: sdong
      
      Reviewed By: sdong
      
      Subscribers: andrewkr, leveldb, dhruba
      
      Differential Revision: https://reviews.facebook.net/D54801
      522de4f5
  18. 16 3月, 2016 1 次提交
  19. 12 3月, 2016 2 次提交
  20. 17 2月, 2016 1 次提交
    • J
      fix build without gflags · 871cc5f9
      Jonathan Wiepert 提交于
      Test Plan:
      Built and ran with gflags:
      % ./db_bench
      LevelDB:    version 4.5
      Date:       Tue Feb 16 12:04:23 2016
      CPU:        40 * Intel(R) Xeon(R) CPU E5-2660 v2 @ 2.20GHz
      ...
      
      And without gflags:
      % ./db_bench
      Please install gflags to run rocksdb tools
      %
      
      Reviewers: sdong, igor
      
      Reviewed By: igor
      
      Subscribers: igor, dhruba
      
      Differential Revision: https://reviews.facebook.net/D54243
      871cc5f9
  21. 16 2月, 2016 1 次提交
    • J
      Separeate main from bench functionality to allow cusomizations · 7bd284c3
      Jonathan Wiepert 提交于
      Summary: Isolate db_bench functionality from main so custom benchmark code can be written and managed
      
      Test Plan:
      Tested commands
      ./build_tools/regression_build_test.sh
      ./db_bench --db=/tmp/rocksdbtest-12321/dbbench --stats_interval_seconds=1 --num=1000
      ./db_bench --db=/tmp/rocksdbtest-12321/dbbench --stats_interval_seconds=1 --num=1000 --reads=500 --writes=500
      ./db_bench --db=/tmp/rocksdbtest-12321/dbbench --stats_interval_seconds=1 --num=1000 --merge_keys=100 --numdistinct=100 --num_column_families=3 --num_hot_column_families=1
      ./db_bench --stats_interval_seconds=1 --num=1000 --bloom_locality=1 --seed=5 --threads=5
      ./db_bench --duration=60 --value_size=50 --seek_nexts=10 --reverse_iterator=true --usee_uint64_comparator=true --batch-size=5
      ./db_bench --duration=60 --value_size=50 --seek_nexts=10 --reverse_iterator=true --use_uint64_comparator=true --batch_size=5
      ./db_bench --duration=60 --value_size=50 --seek_nexts=10 --reverse_iterator=true --usee_uint64_comparator=true --batch-size=5
      
      Test Results - https://phabricator.fb.com/P56130387
      
      Additional tests for:
      ./db_bench --duration=60 --value_size=50 --seek_nexts=10 --reverse_iterator=true --use_uint64_comparator=true --batch_size=5 --key_size=8 --merge_operator=put
      ./db_bench --stats_interval_seconds=1 --num=1000 --bloom_locality=1 --seed=5 --threads=5 --merge_operator=uint64add
      
      Results: https://phabricator.fb.com/P56130607
      
      Reviewers: yhchiang, sdong
      
      Reviewed By: sdong
      
      Subscribers: dhruba
      
      Differential Revision: https://reviews.facebook.net/D53991
      7bd284c3
  22. 10 2月, 2016 1 次提交
  23. 20 1月, 2016 1 次提交
  24. 05 1月, 2016 1 次提交
    • M
      Enhance db_bench write rate limit · 4041903e
      Mark Callaghan 提交于
      Summary:
      1) changes tools/{benchmark,run_flash_bench}.sh to optionally use the write rate limit
      2) removes code for --writes_per_second and switches the 'background' write rate limit
      to use --benchmark_write_rate_limit
      
      Replaces https://reviews.facebook.net/D49113
      
      Task ID: #9555881
      
      Blame Rev:
      
      Test Plan:
      tools/run_flash_bench.sh
      
      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/D52485
      4041903e
  25. 30 12月, 2015 1 次提交
  26. 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
  27. 24 12月, 2015 1 次提交
    • S
      Change default options.delayed_write_rate · 15b89022
      sdong 提交于
      Summary: We now have a mechanism to further slowdown writes. Double default options.delayed_write_rate to try to keep the default behavior closer to it used to be.
      
      Test Plan: Run all tests.
      
      Reviewers: IslamAbdelRahman
      
      Reviewed By: IslamAbdelRahman
      
      Subscribers: yhchiang, kradhakrishnan, rven, leveldb, dhruba
      
      Differential Revision: https://reviews.facebook.net/D52281
      15b89022
  28. 18 12月, 2015 2 次提交
  29. 16 12月, 2015 1 次提交
    • G
      Fix minor bugs in delete operator, snprintf, and size_t usage · 97265f5f
      Gunnar Kudrjavets 提交于
      Summary:
      List of changes:
      
      1) Fix the snprintf() usage in cases where wrong variable was used to determine the output buffer size.
      
      2) Remove unnecessary checks before calling delete operator.
      
      3) Increase code correctness by using size_t type when getting vector's size.
      
      4) Unify the coding style by removing namespace::std usage at the top of the file to confirm to the majority usage.
      
      5) Fix various lint errors pointed out by 'arc lint'.
      
      Test Plan:
      Code review and build:
      
      git diff
      make clean
      make -j 32 commit-prereq
      arc lint
      
      Reviewers: kradhakrishnan, sdong, rven, anthony, yhchiang, igor
      
      Reviewed By: igor
      
      Subscribers: dhruba, leveldb
      
      Differential Revision: https://reviews.facebook.net/D51849
      97265f5f
  30. 12 12月, 2015 2 次提交
  31. 10 12月, 2015 1 次提交
    • S
      Deprecate options.soft_rate_limit and add options.soft_pending_compaction_bytes_limit · 56e77f09
      sdong 提交于
      Summary: Deprecate options.soft_rate_limit, which is hard to tune, with options.soft_pending_compaction_bytes_limit, which would trigger the slowdown if estimated pending compaction bytes exceeds the threshold. The hope is to make it more striaght-forward to tune.
      
      Test Plan: Modify DBTest.SoftLimit to cover options.soft_pending_compaction_bytes_limit instead; run all unit tests.
      
      Reviewers: IslamAbdelRahman, yhchiang, rven, kradhakrishnan, igor, anthony
      
      Reviewed By: anthony
      
      Subscribers: leveldb, dhruba
      
      Differential Revision: https://reviews.facebook.net/D51117
      56e77f09
  32. 09 12月, 2015 1 次提交
    • S
      db_bench: in uncompress benchmark, get Snappy size from compressed stream · ac8e56f0
      sdong 提交于
      Summary: Now in benchmark "uncompress" in db_bench, we get size from compressed stream for all other compression types except Snappy, where we allocate memory based on parameter. Change it to match to behavior of other compression types.
      
      Test Plan: Run ./db_bench --benchmarks=uncompress with snappy and other compression types.
      
      Reviewers: yhchiang, kradhakrishnan, anthony, IslamAbdelRahman, igor
      
      Reviewed By: igor
      
      Subscribers: leveldb, dhruba
      
      Differential Revision: https://reviews.facebook.net/D51681
      ac8e56f0
  33. 08 12月, 2015 1 次提交
  34. 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
  35. 07 11月, 2015 1 次提交
    • D
      Enable Windows warnings C4307 C4309 C4512 C4701 · 20f57b17
      Dmitri Smirnov 提交于
        Enable C4307 'operator' : integral constant overflow
        Longs and ints on Windows are 32-bit hence the overflow
        Enable C4309 'conversion' : truncation of constant value
        Enable C4512 'class' : assignment operator could not be generated
        Enable C4701 Potentially uninitialized local variable 'name' used
      20f57b17