Skip to content

Commit

Permalink
Using compact cache for empty key cache (#2194)
Browse files Browse the repository at this point in the history
* Using-compact-cache-for-empty-key-cache

* Update 4.storage-config.md

* Update 4.storage-config.md

* Update 4.storage-config.md
  • Loading branch information
abby-cyber authored Oct 12, 2022
1 parent 79dab0d commit e374704
Showing 1 changed file with 4 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -182,14 +182,13 @@ rocksdb options 配置的格式为`{"<option_name>":"<option_value>"}`,多个
| :-----------------------------| :------| :------------------------------- |
| `enable_storage_cache` | `false`| 是否开启 Storage 缓存功能。|
| `storage_cache_capacity` | `0` | 为 Storage 缓存预留的内存大小,取值需要稍大于`vertex_pool_capacity``empty_key_pool_capacity`的总和。单位:兆字节。|
| `storage_cache_buckets_power` | `20` | bucket 的个数。取值为以 2 为底的对数,取值范围:0~32。例如取值为 20,表示 bucket 个数为 2$^{20}$。建议值为`ceil(log2(cacheEntries * 1.6))``cacheEntries`为要缓存的条目总数。|
| `storage_cache_locks_power` | `10` | 锁的个数。取值为以 2 为底的对数,取值范围:0~32。例如取值为 10,表示锁个数为 2$^{10}$。建议值为`max(1, storage_cache_buckets_power - 10)`|
| `storage_cache_entries_power` | `20` | 预估 Storage 节点上缓存条目的个数,计算公式:2$^{<设置值>}$。例如当设置的值为`20`时,表示缓存条目的个数为 2$^{20}$。建议设置的值为`log2(该 Storage 中点的数量)`,最大值可设置为`31`|
| `enable_vertex_pool` | `false`| 是否使用点的缓存池。仅在启用 Storage 缓存功能时生效。 |
| `vertex_pool_capacity` | `50` | 点缓存池的大小。 单位:兆字节。|
| `vertex_item_ttl` | `300` | 点缓存条目的有效时间。单位:秒。 |
| `enable_empty_key_pool` | `false`| 是否使用 empty_key 的缓存池。empty_key 表示用户查询过但是实际不存在的 key|
| `empty_key_pool_capacity` | `50` | empty_key 缓存池的大小。 单位:兆字节。 |
| `empty_key_item_ttl` | `300` | empty_key 缓存条目的有效时间。单位:秒。 |
| `enable_negative_pool` | `false`| 是否添加消极缓存池(消极缓存池表示 Key 不存在于数据库中的数据缓存池)。仅当`enable_storage_cache``true`时有效|
| `negative_pool_capacity` | `50` | 消极缓存池的大小。 单位:兆字节。 |
| `negative_item_ttl` | `300` | 消极缓存条目的有效时间。单位:秒。 |

{{ ent.ent_end }}

Expand Down

0 comments on commit e374704

Please sign in to comment.