mirror of
https://github.com/matrix-construct/construct
synced 2024-12-26 15:33:54 +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_compactions = 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.enable_write_thread_adaptive_yield = false;
|
||||
opts.use_direct_reads = true;
|
||||
//opts.use_fsync = true;
|
||||
|
||||
#ifdef RB_DEBUG
|
||||
|
@ -2899,6 +2900,14 @@ const noexcept
|
|||
// 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,
|
||||
const std::string &name,
|
||||
const EnvOptions &opts)
|
||||
|
@ -2908,7 +2917,7 @@ ircd::db::database::env::random_access_file::random_access_file(database *const
|
|||
}
|
||||
,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()
|
||||
const noexcept
|
||||
{
|
||||
return false;
|
||||
return _random_access_file_opts.direct;
|
||||
}
|
||||
|
||||
size_t
|
||||
ircd::db::database::env::random_access_file::GetRequiredBufferAlignment()
|
||||
const noexcept
|
||||
{
|
||||
return 16;
|
||||
return 4096;
|
||||
}
|
||||
|
||||
//
|
||||
|
|
Loading…
Reference in a new issue