mirror of
https://github.com/matrix-construct/construct
synced 2024-12-28 00:14:07 +01:00
ircd::db: Checkin some options related.
This commit is contained in:
parent
b8936261b5
commit
0dd075ab78
1 changed files with 13 additions and 4 deletions
17
ircd/db.cc
17
ircd/db.cc
|
@ -694,9 +694,10 @@ try
|
||||||
opts.max_background_flushes = 1;
|
opts.max_background_flushes = 1;
|
||||||
opts.max_background_compactions = 1;
|
opts.max_background_compactions = 1;
|
||||||
opts.max_subcompactions = 1;
|
opts.max_subcompactions = 1;
|
||||||
opts.max_open_files = -1; //ircd::info::rlimit_nofile / 4;
|
opts.max_open_files = 0; //ircd::info::rlimit_nofile / 4;
|
||||||
//opts.allow_concurrent_memtable_write = true;
|
//opts.allow_concurrent_memtable_write = true;
|
||||||
//opts.enable_write_thread_adaptive_yield = false;
|
//opts.enable_write_thread_adaptive_yield = false;
|
||||||
|
opts.use_direct_reads = true;
|
||||||
//opts.use_fsync = true;
|
//opts.use_fsync = true;
|
||||||
|
|
||||||
#ifdef RB_DEBUG
|
#ifdef RB_DEBUG
|
||||||
|
@ -2899,6 +2900,14 @@ const noexcept
|
||||||
// random_access_file
|
// random_access_file
|
||||||
//
|
//
|
||||||
|
|
||||||
|
const ircd::fs::fd::opts
|
||||||
|
_random_access_file_opts{[]
|
||||||
|
{
|
||||||
|
ircd::fs::fd::opts ret{std::ios_base::in};
|
||||||
|
ret.direct = true;
|
||||||
|
return ret;
|
||||||
|
}()};
|
||||||
|
|
||||||
ircd::db::database::env::random_access_file::random_access_file(database *const &d,
|
ircd::db::database::env::random_access_file::random_access_file(database *const &d,
|
||||||
const std::string &name,
|
const std::string &name,
|
||||||
const EnvOptions &opts)
|
const EnvOptions &opts)
|
||||||
|
@ -2908,7 +2917,7 @@ ircd::db::database::env::random_access_file::random_access_file(database *const
|
||||||
}
|
}
|
||||||
,fd
|
,fd
|
||||||
{
|
{
|
||||||
name, std::ios_base::in | std::ios_base::out
|
name, _random_access_file_opts
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
@ -3061,14 +3070,14 @@ bool
|
||||||
ircd::db::database::env::random_access_file::use_direct_io()
|
ircd::db::database::env::random_access_file::use_direct_io()
|
||||||
const noexcept
|
const noexcept
|
||||||
{
|
{
|
||||||
return false;
|
return _random_access_file_opts.direct;
|
||||||
}
|
}
|
||||||
|
|
||||||
size_t
|
size_t
|
||||||
ircd::db::database::env::random_access_file::GetRequiredBufferAlignment()
|
ircd::db::database::env::random_access_file::GetRequiredBufferAlignment()
|
||||||
const noexcept
|
const noexcept
|
||||||
{
|
{
|
||||||
return 16;
|
return 4096;
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
|
|
Loading…
Reference in a new issue