rocksdb/include/rocksdb
Mike Kolupaev 236d4c67e9 Less linear search in DBIter::Seek() when keys are overwritten a lot
Summary:
In one deployment we saw high latencies (presumably from slow iterator operations) and a lot of CPU time reported by perf with this stack:

```
  rocksdb::MergingIterator::Next
  rocksdb::DBIter::FindNextUserEntryInternal
  rocksdb::DBIter::Seek
```

I think what's happening is:
1. we create a snapshot iterator,
2. we do lots of Put()s for the same key x; this creates lots of entries in memtable,
3. we seek the iterator to a key slightly smaller than x,
4. the seek walks over lots of entries in memtable for key x, skipping them because of high sequence numbers.

CC IslamAbdelRahman
Closes https://github.com/facebook/rocksdb/pull/1413

Differential Revision: D4083879

Pulled By: IslamAbdelRahman

fbshipit-source-id: a83ddae
2016-11-28 10:24:11 -08:00
..
utilities Fix heap use after free ASAN/Valgrind 2016-11-17 12:24:12 -08:00
c.h Enable allow_concurrent_memtable_write and enable_write_thread_adaptive_yield by default 2016-11-16 09:39:09 -08:00
cache.h add stats to Cache::LookUp() 2016-09-01 13:50:39 -07:00
compaction_filter.h c abi: allow compaction filter ignore snapshot (#1268) 2016-08-17 18:48:43 -07:00
compaction_job_stats.h Single Delete Mismatch and Fallthrough statistics 2016-08-16 08:21:43 -07:00
comparator.h Updated all copyright headers to the new format. 2016-02-09 15:12:00 -08:00
convenience.h DB::GetOptions() reflect dynamic changed options 2016-09-14 22:10:28 -07:00
db_bench_tool.h Separeate main from bench functionality to allow cusomizations 2016-02-16 06:17:31 -08:00
db_dump_tool.h Updated all copyright headers to the new format. 2016-02-09 15:12:00 -08:00
db.h DeleteRange interface 2016-11-15 15:24:16 -08:00
env.h Implement PositionedAppend for PosixWritableFile 2016-11-18 17:24:13 -08:00
experimental.h Updated all copyright headers to the new format. 2016-02-09 15:12:00 -08:00
filter_policy.h Updated all copyright headers to the new format. 2016-02-09 15:12:00 -08:00
flush_block_policy.h Updated all copyright headers to the new format. 2016-02-09 15:12:00 -08:00
iostats_context.h IOStatsContext::ToString() add option to exclude zero counters 2016-02-23 10:26:24 -08:00
iterator.h add seeforprev in history 2016-10-17 15:34:13 -07:00
ldb_tool.h Updated all copyright headers to the new format. 2016-02-09 15:12:00 -08:00
listener.h add cfh deletion started listener 2016-09-22 11:56:18 -07:00
memtablerep.h Unified InlineSkipList::Insert algorithm with hinting 2016-11-22 14:09:13 -08:00
merge_operator.h Introduce FullMergeV2 (eliminate memcpy from merge operators) 2016-07-20 09:49:03 -07:00
metadata.h Updated all copyright headers to the new format. 2016-02-09 15:12:00 -08:00
options.h Unified InlineSkipList::Insert algorithm with hinting 2016-11-22 14:09:13 -08:00
perf_context.h Less linear search in DBIter::Seek() when keys are overwritten a lot 2016-11-28 10:24:11 -08:00
perf_level.h Move away from enum char value -1 2016-06-14 17:07:34 -07:00
persistent_cache.h Persistent Cache: Expose stats to user via public API 2016-11-21 17:39:13 -08:00
rate_limiter.h Updated all copyright headers to the new format. 2016-02-09 15:12:00 -08:00
slice_transform.h Improve documentation of SliceTransform. 2016-08-11 15:10:09 -07:00
slice.h to/from hex refactor 2016-03-30 14:36:48 -07:00
snapshot.h Updated all copyright headers to the new format. 2016-02-09 15:12:00 -08:00
sst_dump_tool.h Updated all copyright headers to the new format. 2016-02-09 15:12:00 -08:00
sst_file_manager.h Introduce SstFileManager::SetMaxAllowedSpaceUsage() to cap disk space usage 2016-02-17 15:20:23 -08:00
sst_file_writer.h Support SST files with Global sequence numbers [reland] 2016-10-18 16:59:37 -07:00
statistics.h Remove Ticker::SEQUENCE_NUMBER 2016-11-16 22:39:09 -08:00
status.h Implement deadlock detection 2016-10-19 19:45:57 -07:00
table_properties.h Support SST files with Global sequence numbers [reland] 2016-10-18 16:59:37 -07:00
table.h Remove ImmutableCFOptions from public API 2016-09-02 14:16:31 -07:00
thread_status.h Updated all copyright headers to the new format. 2016-02-09 15:12:00 -08:00
threadpool.h Expose ThreadPool under include/rocksdb/threadpool.h 2016-08-26 10:41:35 -07:00
transaction_log.h Updated all copyright headers to the new format. 2016-02-09 15:12:00 -08:00
types.h Updated all copyright headers to the new format. 2016-02-09 15:12:00 -08:00
universal_compaction.h Updated all copyright headers to the new format. 2016-02-09 15:12:00 -08:00
version.h Release RocksDB 5.0 2016-11-17 18:39:15 -08:00
wal_filter.h Avoid overloaded virtual function 2016-03-22 17:10:31 -07:00
write_batch_base.h WriteBatch support for range deletion 2016-08-16 08:16:04 -07:00
write_batch.h Add facility to write only a portion of WriteBatch to WAL 2016-10-07 11:32:10 -07:00
write_buffer_manager.h Avoid updating memtable allocated bytes if write_buffer_size is not set 2016-07-13 19:33:57 -07:00