aboutsummaryrefslogtreecommitdiff
path: root/cnf
diff options
context:
space:
mode:
authorKARBOWSKI Piotr <slashbeast@gentoo.org>2022-08-01 22:55:41 +0200
committerMike Gilbert <floppym@gentoo.org>2022-08-03 11:57:38 -0400
commit353c61912b134b326da5ac16ef1d4bc74b8967d1 (patch)
treef15e303d20b73d0c3a1ccacf33c92f918f729791 /cnf
parentNEWS: update (diff)
downloadportage-353c61912b134b326da5ac16ef1d4bc74b8967d1.tar.gz
portage-353c61912b134b326da5ac16ef1d4bc74b8967d1.tar.bz2
portage-353c61912b134b326da5ac16ef1d4bc74b8967d1.zip
Scheduling policy switching
Adds ability to control the scheduler policy that is used for emerge and all child processes. Mainly to interface the ability to switch to SCHED_IDLE as the solution to keep interactive tasks unaffected by building process happening in the background. On a test sample N=1 with AMD Ryzen 5950x and 64 GB of ram building sys-devel/gcc with lto enabled significantly reduces responsiveness of the system, even with CONFIG_SCHED_AUTOGROUP and PREEMPT enabled. Using a web browser result in visible lags, video playback in web browser, when using CPU decoding, also suffers greatly. Switching Portage to SCHED_IDLE (PORTAGE_SCHEDULING_POLICY="idle") results in no visible slowdowns and responsiveness is as if nothing in the background was happening. This is especially worthy feature when running on powerful CPUs, where users often opt in to build not only with parallel build jobs, but also with multiple packages at once. Anyone running with PORTAGE_NICENESS="19" will undoubtedly want to use this feature to force SCHED_IDLE policy. Closes: https://github.com/gentoo/portage/pull/861 Signed-off-by: KARBOWSKI Piotr <slashbeast@gentoo.org> Signed-off-by: Mike Gilbert <floppym@gentoo.org>
Diffstat (limited to 'cnf')
-rw-r--r--cnf/make.conf.example17
1 files changed, 17 insertions, 0 deletions
diff --git a/cnf/make.conf.example b/cnf/make.conf.example
index 5b2229465..2e33a6e50 100644
--- a/cnf/make.conf.example
+++ b/cnf/make.conf.example
@@ -291,6 +291,23 @@
# unset.
#PORTAGE_IONICE_COMMAND="ionice -c 3 -p \${PID}"
#
+# PORTAGE_SCHEDULING_POLICY allows changing the current scheduling policy. The
+# supported options are 'other', 'batch', 'idle', 'fifo' and 'round-robin'. When
+# unset, the scheduling policy remains unchanged, by default Linux uses 'other'
+# policy. Users that wish to minimize the Portage's impact on system
+# responsiveness should set scheduling policy to 'idle' which significantly
+# reduces the disruption to the rest of the system by scheduling Portage as
+# extremely low priority processes.
+#
+#PORTAGE_SCHEDULING_POLICY="idle"
+#
+# PORTAGE_SCHEDULING_PRIORITY allows changing the priority (1-99) of the current
+# scheduling policy, only applies if PORTAGE_SCHEDULING_POLICY is set to 'fifo'
+# or 'round-robin', for others the only supported priority is 0, If unset,
+# defaults to lowest priority of the selected scheduling policy.
+#
+#PORTAGE_SCHEDULING_PRIORITY="99"
+#
# AUTOCLEAN enables portage to automatically clean out older or overlapping
# packages from the system after every successful merge. This is the
# same as running 'emerge -c' after every merge. Set with: "yes" or "no".