mirror of
https://github.com/matrix-construct/construct
synced 2024-11-12 13:01:07 +01:00
ircd:Ⓜ️:dbs: Add conf items for content / event_json file size.
This commit is contained in:
parent
165454dd85
commit
383637ae51
4 changed files with 30 additions and 2 deletions
|
@ -43,6 +43,7 @@ namespace ircd::m::dbs::desc
|
||||||
extern conf::item<size_t> content__meta_block__size;
|
extern conf::item<size_t> content__meta_block__size;
|
||||||
extern conf::item<size_t> content__cache__size;
|
extern conf::item<size_t> content__cache__size;
|
||||||
extern conf::item<size_t> content__cache_comp__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 const db::descriptor content;
|
||||||
|
|
||||||
extern conf::item<std::string> depth__comp;
|
extern conf::item<std::string> depth__comp;
|
||||||
|
|
|
@ -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__size;
|
||||||
extern conf::item<size_t> event_json__cache_comp__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__bloom__bits;
|
||||||
|
extern conf::item<size_t> event_json__file__size__max;
|
||||||
extern const db::descriptor event_json;
|
extern const db::descriptor event_json;
|
||||||
}
|
}
|
||||||
|
|
|
@ -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
|
const ircd::db::descriptor
|
||||||
ircd::m::dbs::desc::content
|
ircd::m::dbs::desc::content
|
||||||
{
|
{
|
||||||
|
@ -363,6 +370,18 @@ ircd::m::dbs::desc::content
|
||||||
|
|
||||||
// compression
|
// compression
|
||||||
string_view{content__comp},
|
string_view{content__comp},
|
||||||
|
|
||||||
|
// compactor
|
||||||
|
{},
|
||||||
|
|
||||||
|
// compaction priority algorithm,
|
||||||
|
"Universal"s,
|
||||||
|
|
||||||
|
// target_file_size
|
||||||
|
{
|
||||||
|
size_t(content__file__size__max),
|
||||||
|
1L,
|
||||||
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
//
|
//
|
||||||
|
|
|
@ -65,6 +65,13 @@ ircd::m::dbs::desc::event_json__bloom__bits
|
||||||
{ "default", 0L },
|
{ "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
|
const ircd::db::descriptor
|
||||||
ircd::m::dbs::desc::event_json
|
ircd::m::dbs::desc::event_json
|
||||||
{
|
{
|
||||||
|
@ -124,8 +131,8 @@ ircd::m::dbs::desc::event_json
|
||||||
|
|
||||||
// target_file_size
|
// target_file_size
|
||||||
{
|
{
|
||||||
2_GiB, // base
|
size_t(event_json__file__size__max), // base
|
||||||
1L, // multiplier
|
1L, // multiplier
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue