From 33b06a27fb49aab335e03cd0a12f0f9d4a7f989e Mon Sep 17 00:00:00 2001 From: Jason Volk Date: Mon, 6 Jan 2020 15:05:48 -0800 Subject: [PATCH] ircd::m::init::backfill: Set nice values for worker pool. --- matrix/init_backfill.cc | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/matrix/init_backfill.cc b/matrix/init_backfill.cc index fe5e9388d..7a5637696 100644 --- a/matrix/init_backfill.cc +++ b/matrix/init_backfill.cc @@ -107,6 +107,10 @@ try return run::level == run::level::RUN; }); + // Set a low priority for this context; see related pool_opts + ionice(ctx::cur(), 4); + nice(ctx::cur(), 4); + // Prepare to iterate all of the rooms this server is aware of which // contain at least one member from another server in any state, and // one member from our server in a joined state. @@ -136,6 +140,12 @@ try { 512_KiB, // stack sz size_t(pool_size), // pool sz + -1, // queue max hard + 0, // queue max soft + true, // queue max blocking + true, // queue max warning + 3, // ionice + 3, // nice }; ctx::pool pool