Skip to content

Commit 3cefbe4

Browse files
committed
gnb: limit the number of PDSCH and PUSCH workers in zmq
1 parent 8c860bd commit 3cefbe4

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

apps/gnb/gnb_appconfig_cli11_schema.cpp

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1976,6 +1976,23 @@ static void manage_hal_optional(CLI::App& app, gnb_appconfig& gnb_cfg)
19761976
}
19771977
}
19781978

1979+
static void manage_expert_execution_threads(CLI::App& app, gnb_appconfig& gnb_cfg)
1980+
{
1981+
if (!variant_holds_alternative<ru_sdr_appconfig>(gnb_cfg.ru_cfg)) {
1982+
return;
1983+
}
1984+
1985+
// Ignore the default settings based in the number of CPU cores for ZMQ.
1986+
if (variant_get<ru_sdr_appconfig>(gnb_cfg.ru_cfg).device_driver == "zmq") {
1987+
upper_phy_threads_appconfig& upper = gnb_cfg.expert_execution_cfg.threads.upper_threads;
1988+
upper.nof_pdsch_threads = 1;
1989+
upper.nof_pusch_decoder_threads = 0;
1990+
upper.nof_ul_threads = 1;
1991+
upper.nof_dl_threads = 1;
1992+
gnb_cfg.expert_execution_cfg.threads.lower_threads.execution_profile = lower_phy_thread_profile::blocking;
1993+
}
1994+
}
1995+
19791996
void srsran::configure_cli11_with_gnb_appconfig_schema(CLI::App& app, gnb_appconfig& gnb_cfg)
19801997
{
19811998
app.add_option("--gnb_id", gnb_cfg.gnb_id, "gNodeB identifier")->capture_default_str();
@@ -2111,5 +2128,6 @@ void srsran::configure_cli11_with_gnb_appconfig_schema(CLI::App& app, gnb_appcon
21112128
app.callback([&]() {
21122129
manage_ru_variant(app, gnb_cfg, sdr_cfg, ofh_cfg);
21132130
manage_hal_optional(app, gnb_cfg);
2131+
manage_expert_execution_threads(app, gnb_cfg);
21142132
});
21152133
}

0 commit comments

Comments
 (0)