From: Francis Dupont Date: Fri, 10 Jul 2020 20:04:08 +0000 (+0200) Subject: [#1311] Reniced LFC X-Git-Tag: Kea-1.7.10~59 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6c4281915aa9b49460071d1fd3fe55e2771d34a3;p=thirdparty%2Fkea.git [#1311] Reniced LFC --- 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;