From 6c4281915aa9b49460071d1fd3fe55e2771d34a3 Mon Sep 17 00:00:00 2001 From: Francis Dupont Date: Fri, 10 Jul 2020 22:04:08 +0200 Subject: [PATCH] [#1311] Reniced LFC --- ChangeLog | 4 ++++ src/bin/lfc/main.cc | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/ChangeLog b/ChangeLog index 81e4533dc5..81b616f9ae 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +1770. [perf] fdupont + Set kea-lfc process priority to lower than default. + (Gitlab #1311) + 1771. [func] fdupont Added a stats-recount command to kea-admin tool, which recounts cached statistics in MySQL and PostgreSQL lease databases. diff --git a/src/bin/lfc/main.cc b/src/bin/lfc/main.cc index 30a423b09e..2e67e9b3b7 100644 --- a/src/bin/lfc/main.cc +++ b/src/bin/lfc/main.cc @@ -12,6 +12,7 @@ #include #include #include +#include using namespace std; using namespace isc::lfc; @@ -23,6 +24,9 @@ using namespace isc::lfc; /// The exit value of the program will be EXIT_SUCCESS if there were no /// errors, EXIT_FAILURE otherwise. int main(int argc, char* argv[]) { + // Ask scheduling to not give too much resources to LFC. + static_cast(setpriority(PRIO_PROCESS, 0, 4)); + int ret = EXIT_SUCCESS; LFCController lfc_controller; -- 2.47.2