Fix deprecated actor_system_config field usages

This commit is contained in:
Jon Siwek 2018-06-26 15:05:23 -05:00
parent 9c0303804d
commit ac495e729b
5 changed files with 12 additions and 8 deletions

View file

@ -185,7 +185,7 @@ void Manager::InitPostScript()
auto max_sleep = get_option("Broker::max_sleep")->AsCount();
if ( max_threads )
config.scheduler_max_threads = max_threads;
config.set("scheduler.max-threads", max_threads);
else
{
// On high-core-count systems, spawning one thread per core
@ -193,7 +193,7 @@ void Manager::InitPostScript()
// threads are under-utilized. Related:
// https://github.com/actor-framework/actor-framework/issues/699
if ( reading_pcaps )
config.scheduler_max_threads = 2u;
config.set("scheduler.max-threads", 2u);
else
{
auto hc = std::thread::hardware_concurrency();
@ -203,18 +203,18 @@ void Manager::InitPostScript()
else if ( hc < 4u)
hc = 4u;
config.scheduler_max_threads = hc;
config.set("scheduler.max-threads", hc);
}
}
if ( max_sleep )
config.work_stealing_relaxed_sleep_duration_us = max_sleep;
config.set("work-stealing.relaxed-sleep-duration-us", max_sleep);
else
// 64ms is just an arbitrary amount derived from testing
// the overhead of a unused CAF actor system on a 32-core system.
// Performance was within 2% of baseline timings (w/o CAF)
// when using this sleep duration.
config.work_stealing_relaxed_sleep_duration_us = 64000;
config.set("work-stealing.relaxed-sleep-duration-us", 64000);
bstate = std::make_shared<BrokerState>(std::move(config));
}