Home
last modified time | relevance | path

Searched refs:hash (Results 1 – 25 of 787) sorted by relevance

12345678910>>...32

/rocksdb-6.9/docs/_posts/
D2018-08-23-data-block-hash-index.markdown9hash table to the end of the data block for efficient indexing. It is backward compatible with the…
26 kDataBlockBinaryAndHash = 1, // additional hash index
29 // Set to kDataBlockBinaryAndHash to enable hash index
45 ![](/static/images/data-block-hash-index/block-format-binary-seek.png)
47 We implemented a hash map at the end of the block to index the key to reduce the CPU overhead of th…
49 ![](/static/images/data-block-hash-index/block-format-hash-index.png)
52hash bucket when storing the location of a key (or more precisely, the restart index of the restar…
58 ![](/static/images/data-block-hash-index/hash-index-data-structure.png)
110 Orange bars are representing our hash index performance. We use a hash util ratio of 1.0 in this te…
112 ![](/static/images/data-block-hash-index/perf-throughput.png)
[all …]
D2014-09-12-cuckoo.markdown46 …le optimizations, including a cache friendly cuckoo hash algorithm. Cuckoo Hashing uses multiple h…
50 …hashes of the key _h1(k), ..., __hn__(k)_. We insert the key in the first hash location that is fr…
52hash table and there is an edge from bucket _A_ to bucket _B_ if the element stored in bucket _A_ …
56hash functions required and hence the number of memory accesses. In our experiments, with a hash u…
64 …* If the key is not present in first hash location, we jump to second hash location which may not …
67 … prefetching strategy - prefetching all hash locations for a key is wasteful. But prefetching only…
71hash location - _h1(k)_, we try to insert it in next few buckets, _h1(k)+1, _h1(k)+2, _..., h1(k)+…
74hash utilization, we found that 85% of keys are accommodated in first Cuckoo Block. Prefetching th…
D2014-06-23-plaintable-a-new-file-format.markdown22 … query performance is not as good as you would see with a nicely-designed hash table, but they are…
26 To meet our requirements, given that only hash prefix iterating is needed, we made two decisions:
28 1. to use a hash index, which is
31 Having addressed our latency goal, the next task was to design a very compact hash index to minimiz…
35 1. Since our file is immutable, we can accurately estimate the number of hash buckets needed.
D2014-06-27-rocksdb-3-2-release.markdown27 …* Add two paramters to NewHashLinkListRepFactory() for logging on too many entries in a hash bucke…
30 …dex_allow_collision. When enabled, prefix hash index for block-based table will not store prefix a…
D2014-05-22-rocksdb-3-1-release.markdown14 …* [Materialized hash index](https://github.com/facebook/rocksdb/commit/0b3d03d026a7248e438341264b4…
20 We released 3.1 so fast after 3.0 because one of our internal customers needed materialized hash in…
D2014-09-15-rocksdb-3-5-release.markdown19 …Options.total_order_seek to force total order seek when block-based table is built with hash index.
35 …4. OptimizeForPointLookup() takes one parameter for block cache size. It now builds hash index, bl…
/rocksdb-6.9/cache/
Dsharded_cache.cc49 uint32_t hash = HashSlice(key); in Insert() local
50 return GetShard(Shard(hash)) in Insert()
51 ->Insert(key, hash, value, charge, deleter, handle, priority); in Insert()
55 uint32_t hash = HashSlice(key); in Lookup() local
56 return GetShard(Shard(hash))->Lookup(key, hash); in Lookup()
60 uint32_t hash = GetHash(handle); in Ref() local
61 return GetShard(Shard(hash))->Ref(handle); in Ref()
65 uint32_t hash = GetHash(handle); in Release() local
66 return GetShard(Shard(hash))->Release(handle, force_erase); in Release()
70 uint32_t hash = HashSlice(key); in Erase() local
[all …]
Dclock_cache.cc181 uint32_t hash; member
247 static size_t hash(const CacheKey& a) { in hash() function
282 void Erase(const Slice& key, uint32_t hash) override;
283 bool EraseAndConfirm(const Slice& key, uint32_t hash,
514 table_.erase(CacheKey(handle->key, handle->hash)); in TryEvict()
592 handle->hash = hash; in Insert()
599 if (table_.find(accessor, CacheKey(key, hash))) { in Insert()
637 if (!table_.find(accessor, CacheKey(key, hash))) { in Lookup()
650 if (hash != handle->hash || key != handle->key) { in Lookup()
673 EraseAndConfirm(key, hash, &context); in Erase()
[all …]
Dlru_cache.cc35 return *FindPointer(key, hash); in Lookup()
55 LRUHandle** ptr = FindPointer(key, hash); in Remove()
65 LRUHandle** ptr = &list_[hash & (length_ - 1)]; in FindPointer()
66 while (*ptr != nullptr && ((*ptr)->hash != hash || key != (*ptr)->key())) { in FindPointer()
84 uint32_t hash = h->hash; in Resize() local
127 table_.Remove(old->key(), old->hash); in EraseUnRefEntries()
242 table_.Remove(old->key(), old->hash); in EvictFromLRU()
273 LRUHandle* e = table_.Lookup(key, hash); in Lookup()
317 table_.Remove(e->key(), e->hash); in Release()
355 e->hash = hash; in Insert()
[all …]
Dlru_cache.h61 uint32_t hash; member
161 LRUHandle* Lookup(const Slice& key, uint32_t hash);
163 LRUHandle* Remove(const Slice& key, uint32_t hash);
182 LRUHandle** FindPointer(const Slice& key, uint32_t hash);
213 virtual Status Insert(const Slice& key, uint32_t hash, void* value, in ALIGN_AS()
216 virtual Cache::Handle* Lookup(const Slice& key, uint32_t hash) override; in ALIGN_AS()
220 virtual void Erase(const Slice& key, uint32_t hash) override; in ALIGN_AS()
Dsharded_cache.h29 virtual Status Insert(const Slice& key, uint32_t hash, void* value,
32 virtual Cache::Handle* Lookup(const Slice& key, uint32_t hash) = 0;
35 virtual void Erase(const Slice& key, uint32_t hash) = 0;
98 uint32_t Shard(uint32_t hash) { in Shard() argument
100 return (num_shard_bits_ > 0) ? (hash >> (32 - num_shard_bits_)) : 0; in Shard()
/rocksdb-6.9/util/
Dcrc32c_test.cc147 uint64_t hash = FNV_64_HASH_START) { in fnv64_buf() argument
152 hash += (hash << 1) + (hash << 4) + (hash << 5) + (hash << 7) + in fnv64_buf()
153 (hash << 8) + (hash << 40); in fnv64_buf()
154 hash ^= char_buf[i]; in fnv64_buf()
156 return hash; in fnv64_buf()
Dhash.h86 inline uint32_t fastrange32(uint32_t hash, uint32_t range) { in fastrange32() argument
87 uint64_t product = uint64_t{range} * hash; in fastrange32()
95 inline size_t fastrange64(uint64_t hash, size_t range) { in fastrange64() argument
98 __uint128_t wide = __uint128_t{range} * hash; in fastrange64()
107 uint64_t tmp = uint64_t{range64 & 0xffffFFFF} * uint64_t{hash & 0xffffFFFF}; in fastrange64()
109 tmp += uint64_t{range64 & 0xffffFFFF} * uint64_t{hash >> 32}; in fastrange64()
111 uint64_t tmp2 = uint64_t{range64 >> 32} * uint64_t{hash & 0xffffFFFF}; in fastrange64()
115 tmp += uint64_t{range64 >> 32} * uint64_t{hash >> 32}; in fastrange64()
Ddynamic_bloom.h60 void AddHash(uint32_t hash);
63 void AddHashConcurrently(uint32_t hash);
71 bool MayContainHash(uint32_t hash) const;
88 void AddHash(uint32_t hash, const OrFunc& or_func);
99 inline void DynamicBloom::AddHash(uint32_t hash) { in AddHash() argument
100 AddHash(hash, [](std::atomic<uint64_t>* ptr, uint64_t mask) { in AddHash()
106 inline void DynamicBloom::AddHashConcurrently(uint32_t hash) { in AddHashConcurrently() argument
107 AddHash(hash, [](std::atomic<uint64_t>* ptr, uint64_t mask) { in AddHashConcurrently()
Dhash.cc.d1 util/hash.cc.d util/hash.o: util/hash.cc util/coding.h \
14 include/rocksdb/statistics.h util/hash.h util/util.h util/xxhash.h
Dfilter_bench.cc375 uint32_t hash = GetSliceHash(kms_[0].Get(filter_id, i)); in Go() local
376 info.plain_table_bloom_->AddHash(hash); in Go()
439 uint32_t hash = GetSliceHash(kms_[0].Get(info.filter_id_, j)); in Go() local
440 ALWAYS_ASSERT(info.plain_table_bloom_->MayContainHash(hash)); in Go()
448 uint32_t hash = in Go() local
450 fps += info.plain_table_bloom_->MayContainHash(hash); in Go()
628 uint32_t hash = GetSliceHash(batch_slices[i]); in RandomQueryTest() local
629 may_match = info.plain_table_bloom_->MayContainHash(hash); in RandomQueryTest()
Dxxhash.cc653 XXH_PUBLIC_API void XXH32_canonicalFromHash(XXH32_canonical_t* dst, XXH32_hash_t hash) in XXH32_canonicalFromHash() argument
656 if (XXH_CPU_LITTLE_ENDIAN) hash = XXH_swap32(hash); in XXH32_canonicalFromHash()
657 memcpy(dst, &hash, sizeof(*dst)); in XXH32_canonicalFromHash()
1136 XXH_PUBLIC_API void XXH64_canonicalFromHash(XXH64_canonical_t* dst, XXH64_hash_t hash) in XXH64_canonicalFromHash() argument
1139 if (XXH_CPU_LITTLE_ENDIAN) hash = XXH_swap64(hash); in XXH64_canonicalFromHash()
1140 memcpy(dst, &hash, sizeof(*dst)); in XXH64_canonicalFromHash()
Dhash_test.cc364 uint32_t fastrange32(uint32_t hash, uint32_t range) { in fastrange32() argument
365 return ROCKSDB_NAMESPACE::fastrange32(hash, range); in fastrange32()
369 size_t fastrange64(uint64_t hash, size_t range) { in fastrange64() argument
370 return ROCKSDB_NAMESPACE::fastrange64(hash, range); in fastrange64()
Dxxh3p.h1368 XXH128_canonicalFromHash(XXH128_canonical_t* dst, XXH128_hash_t hash) in XXH128_canonicalFromHash() argument
1372 hash.high64 = XXH_swap64(hash.high64); in XXH128_canonicalFromHash()
1373 hash.low64 = XXH_swap64(hash.low64); in XXH128_canonicalFromHash()
1375 memcpy(dst, &hash.high64, sizeof(hash.high64)); in XXH128_canonicalFromHash()
1376 memcpy((char*)dst + sizeof(hash.high64), &hash.low64, sizeof(hash.low64)); in XXH128_canonicalFromHash()
/rocksdb-6.9/tools/block_cache_analyzer/
Dblock_cache_pysim.py143 self.hash = hash
208 def insert(self, key, hash, value): argument
215 index = hash % len(self.table)
222 if self.table[index][i].hash == hash and self.table[index][i].key == key:
269 def delete(self, key, hash): argument
270 index = hash % len(self.table)
278 and self.table[index][i].hash == hash
296 def lookup(self, key, hash): argument
297 index = hash % len(self.table)
303 and self.table[index][i].hash == hash
[all …]
/rocksdb-6.9/table/plain/
Dplain_table_index.cc17 inline uint32_t GetBucketIdFromHash(uint32_t hash, uint32_t num_buckets) { in GetBucketIdFromHash() argument
19 return hash % num_buckets; in GetBucketIdFromHash()
56 void PlainTableIndexBuilder::IndexRecordList::AddRecord(uint32_t hash, in AddRecord() argument
63 new_record.hash = hash; in AddRecord()
129 uint32_t cur_hash = index_record->hash; in BucketizeIndexes()
Dplain_table_bloom.h47 void AddHash(uint32_t hash);
50 bool MayContainHash(uint32_t hash) const;
52 void Prefetch(uint32_t hash);
Dplain_table_bloom.cc70 for (auto hash : keys_hashes) { in AddKeysHashes() local
71 bloom_.AddHash(hash); in AddKeysHashes()
/rocksdb-6.9/table/block_based/
Dfilter_policy.cc44 uint64_t hash = GetSliceHash64(key); in AddKey() local
45 if (hash_entries_.empty() || hash != hash_entries_.back()) { in AddKey()
46 hash_entries_.push_back(hash); in AddKey()
259 uint32_t hash = BloomHash(key); in AddKey() local
260 if (hash_entries_.size() == 0 || hash != hash_entries_.back()) { in AddKey()
261 hash_entries_.push_back(hash); in AddKey()
403 uint32_t hash = BloomHash(key); in MayMatch() local
406 hash, num_lines_, data_, /*out*/ &byte_offset, log2_cache_line_size_); in MayMatch()
408 hash, num_probes_, data_ + byte_offset, log2_cache_line_size_); in MayMatch()
/rocksdb-6.9/utilities/persistent_cache/
Dblock_cache_tier_metadata.h88 return std::hash<uint32_t>()(rec->cacheid()); in operator()
107 return std::hash<std::string>()(node->key_); in operator()

12345678910>>...32