0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-11-25 00:02:34 +01:00

ircd:Ⓜ️:dbs: Add conf items for content / event_json file size.

This commit is contained in:
Jason Volk 2021-01-12 13:51:02 -08:00
parent 165454dd85
commit 383637ae51
4 changed files with 30 additions and 2 deletions

View file

@ -43,6 +43,7 @@ namespace ircd::m::dbs::desc
extern conf::item<size_t> content__meta_block__size;
extern conf::item<size_t> content__cache__size;
extern conf::item<size_t> content__cache_comp__size;
extern conf::item<size_t> content__file__size__max;
extern const db::descriptor content;
extern conf::item<std::string> depth__comp;

View file

@ -27,5 +27,6 @@ namespace ircd::m::dbs::desc
extern conf::item<size_t> event_json__cache__size;
extern conf::item<size_t> event_json__cache_comp__size;
extern conf::item<size_t> event_json__bloom__bits;
extern conf::item<size_t> event_json__file__size__max;
extern const db::descriptor event_json;
}

View file

@ -306,6 +306,13 @@ ircd::m::dbs::desc::content__cache_comp__size
}
};
decltype(ircd::m::dbs::desc::content__file__size__max)
ircd::m::dbs::desc::content__file__size__max
{
{ "name", "ircd.m.dbs.content.file.size.max" },
{ "default", long(256_MiB) },
};
const ircd::db::descriptor
ircd::m::dbs::desc::content
{
@ -363,6 +370,18 @@ ircd::m::dbs::desc::content
// compression
string_view{content__comp},
// compactor
{},
// compaction priority algorithm,
"Universal"s,
// target_file_size
{
size_t(content__file__size__max),
1L,
},
};
//

View file

@ -65,6 +65,13 @@ ircd::m::dbs::desc::event_json__bloom__bits
{ "default", 0L },
};
decltype(ircd::m::dbs::desc::event_json__file__size__max)
ircd::m::dbs::desc::event_json__file__size__max
{
{ "name", "ircd.m.dbs._event_json.file.size.target" },
{ "default", long(512_MiB) },
};
const ircd::db::descriptor
ircd::m::dbs::desc::event_json
{
@ -124,8 +131,8 @@ ircd::m::dbs::desc::event_json
// target_file_size
{
2_GiB, // base
1L, // multiplier
size_t(event_json__file__size__max), // base
1L, // multiplier
},
};