mirror of
https://github.com/girlbossceo/conduwuit.git
synced 2025-03-14 18:55:37 +00:00
add queued transactions rocksdb cf cache
Signed-off-by: strawberry <strawberry@puppygock.gay>
This commit is contained in:
parent
b20bd65d38
commit
63d1fcf213
3 changed files with 19 additions and 0 deletions
|
@ -170,6 +170,10 @@
|
|||
#
|
||||
#statekeyshort_cache_capacity = varies by system
|
||||
|
||||
# This item is undocumented. Please contribute documentation for it.
|
||||
#
|
||||
#servernameevent_data_cache_capacity = varies by system
|
||||
|
||||
# This item is undocumented. Please contribute documentation for it.
|
||||
#
|
||||
#server_visibility_cache_capacity = varies by system
|
||||
|
|
|
@ -211,6 +211,10 @@ pub struct Config {
|
|||
#[serde(default = "default_statekeyshort_cache_capacity")]
|
||||
pub statekeyshort_cache_capacity: u32,
|
||||
|
||||
/// default: varies by system
|
||||
#[serde(default = "default_servernameevent_data_cache_capacity")]
|
||||
pub servernameevent_data_cache_capacity: u32,
|
||||
|
||||
/// default: varies by system
|
||||
#[serde(default = "default_server_visibility_cache_capacity")]
|
||||
pub server_visibility_cache_capacity: u32,
|
||||
|
@ -2059,6 +2063,8 @@ fn default_shortstatekey_cache_capacity() -> u32 { parallelism_scaled_u32(10_000
|
|||
|
||||
fn default_statekeyshort_cache_capacity() -> u32 { parallelism_scaled_u32(10_000).saturating_add(100_000) }
|
||||
|
||||
fn default_servernameevent_data_cache_capacity() -> u32 { parallelism_scaled_u32(100_000).saturating_add(500_000) }
|
||||
|
||||
fn default_server_visibility_cache_capacity() -> u32 { parallelism_scaled_u32(500) }
|
||||
|
||||
fn default_user_visibility_cache_capacity() -> u32 { parallelism_scaled_u32(1000) }
|
||||
|
|
|
@ -170,6 +170,15 @@ pub(crate) fn cf_options(
|
|||
cache_size(cfg, cfg.statekeyshort_cache_capacity, 1024)?,
|
||||
),
|
||||
|
||||
"servernameevent_data" => set_table_with_new_cache(
|
||||
&mut opts,
|
||||
cfg,
|
||||
cache,
|
||||
name,
|
||||
cache_size(cfg, cfg.servernameevent_data_cache_capacity, 128)?, /* Raw average value size = 102, key
|
||||
* size = 34 */
|
||||
),
|
||||
|
||||
"eventid_outlierpdu" => {
|
||||
set_table_with_new_cache(&mut opts, cfg, cache, name, cache_size(cfg, cfg.pdu_cache_capacity, 1536)?);
|
||||
},
|
||||
|
|
Loading…
Add table
Reference in a new issue