reduce block size on small tables
Signed-off-by: Jason Volk <jason@zemos.net>
This commit is contained in:
parent
3759d1be6c
commit
aad42bdaa0
2 changed files with 21 additions and 1 deletions
|
@ -83,6 +83,9 @@ pub(crate) static RANDOM_SMALL: Descriptor = Descriptor {
|
||||||
write_size: 1024 * 1024 * 16,
|
write_size: 1024 * 1024 * 16,
|
||||||
level_size: 1024 * 512,
|
level_size: 1024 * 512,
|
||||||
file_size: 1024 * 128,
|
file_size: 1024 * 128,
|
||||||
|
index_size: 512,
|
||||||
|
block_size: 512,
|
||||||
|
cache_shards: 64,
|
||||||
..RANDOM
|
..RANDOM
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -91,5 +94,7 @@ pub(crate) static SEQUENTIAL_SMALL: Descriptor = Descriptor {
|
||||||
write_size: 1024 * 1024 * 16,
|
write_size: 1024 * 1024 * 16,
|
||||||
level_size: 1024 * 1024,
|
level_size: 1024 * 1024,
|
||||||
file_size: 1024 * 512,
|
file_size: 1024 * 512,
|
||||||
|
block_size: 512,
|
||||||
|
cache_shards: 64,
|
||||||
..SEQUENTIAL
|
..SEQUENTIAL
|
||||||
};
|
};
|
||||||
|
|
|
@ -58,6 +58,8 @@ pub(super) static MAPS: &[Descriptor] = &[
|
||||||
cache_disp: CacheDisp::SharedWith("pduid_pdu"),
|
cache_disp: CacheDisp::SharedWith("pduid_pdu"),
|
||||||
key_size_hint: Some(48),
|
key_size_hint: Some(48),
|
||||||
val_size_hint: Some(1488),
|
val_size_hint: Some(1488),
|
||||||
|
block_size: 1024,
|
||||||
|
index_size: 512,
|
||||||
..descriptor::RANDOM
|
..descriptor::RANDOM
|
||||||
},
|
},
|
||||||
Descriptor {
|
Descriptor {
|
||||||
|
@ -65,6 +67,8 @@ pub(super) static MAPS: &[Descriptor] = &[
|
||||||
cache_disp: CacheDisp::Unique,
|
cache_disp: CacheDisp::Unique,
|
||||||
key_size_hint: Some(48),
|
key_size_hint: Some(48),
|
||||||
val_size_hint: Some(16),
|
val_size_hint: Some(16),
|
||||||
|
block_size: 512,
|
||||||
|
index_size: 512,
|
||||||
..descriptor::RANDOM
|
..descriptor::RANDOM
|
||||||
},
|
},
|
||||||
Descriptor {
|
Descriptor {
|
||||||
|
@ -72,6 +76,8 @@ pub(super) static MAPS: &[Descriptor] = &[
|
||||||
cache_disp: CacheDisp::Unique,
|
cache_disp: CacheDisp::Unique,
|
||||||
key_size_hint: Some(48),
|
key_size_hint: Some(48),
|
||||||
val_size_hint: Some(8),
|
val_size_hint: Some(8),
|
||||||
|
block_size: 512,
|
||||||
|
index_size: 512,
|
||||||
..descriptor::RANDOM
|
..descriptor::RANDOM
|
||||||
},
|
},
|
||||||
Descriptor {
|
Descriptor {
|
||||||
|
@ -111,6 +117,8 @@ pub(super) static MAPS: &[Descriptor] = &[
|
||||||
cache_disp: CacheDisp::SharedWith("eventid_outlierpdu"),
|
cache_disp: CacheDisp::SharedWith("eventid_outlierpdu"),
|
||||||
key_size_hint: Some(16),
|
key_size_hint: Some(16),
|
||||||
val_size_hint: Some(1520),
|
val_size_hint: Some(1520),
|
||||||
|
block_size: 2048,
|
||||||
|
index_size: 512,
|
||||||
..descriptor::SEQUENTIAL
|
..descriptor::SEQUENTIAL
|
||||||
},
|
},
|
||||||
Descriptor {
|
Descriptor {
|
||||||
|
@ -162,6 +170,7 @@ pub(super) static MAPS: &[Descriptor] = &[
|
||||||
Descriptor {
|
Descriptor {
|
||||||
name: "roomsynctoken_shortstatehash",
|
name: "roomsynctoken_shortstatehash",
|
||||||
val_size_hint: Some(8),
|
val_size_hint: Some(8),
|
||||||
|
block_size: 512,
|
||||||
..descriptor::SEQUENTIAL
|
..descriptor::SEQUENTIAL
|
||||||
},
|
},
|
||||||
Descriptor {
|
Descriptor {
|
||||||
|
@ -243,6 +252,8 @@ pub(super) static MAPS: &[Descriptor] = &[
|
||||||
name: "shorteventid_shortstatehash",
|
name: "shorteventid_shortstatehash",
|
||||||
key_size_hint: Some(8),
|
key_size_hint: Some(8),
|
||||||
val_size_hint: Some(8),
|
val_size_hint: Some(8),
|
||||||
|
block_size: 512,
|
||||||
|
index_size: 512,
|
||||||
..descriptor::SEQUENTIAL
|
..descriptor::SEQUENTIAL
|
||||||
},
|
},
|
||||||
Descriptor {
|
Descriptor {
|
||||||
|
@ -292,7 +303,11 @@ pub(super) static MAPS: &[Descriptor] = &[
|
||||||
name: "token_userdeviceid",
|
name: "token_userdeviceid",
|
||||||
..descriptor::RANDOM_SMALL
|
..descriptor::RANDOM_SMALL
|
||||||
},
|
},
|
||||||
Descriptor { name: "tokenids", ..descriptor::RANDOM },
|
Descriptor {
|
||||||
|
name: "tokenids",
|
||||||
|
block_size: 512,
|
||||||
|
..descriptor::RANDOM
|
||||||
|
},
|
||||||
Descriptor {
|
Descriptor {
|
||||||
name: "url_previews",
|
name: "url_previews",
|
||||||
..descriptor::RANDOM
|
..descriptor::RANDOM
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue