from small one page howto to huge articles all in one place

search text in:




Other .linuxhowtos.org sites: www.linuxhowtos.org
toolsntoys.linuxhowtos.org



Last additions:
How to make X listen on port 6000

How to make X listen on port 6000

words:

34

views:

82885

userrating:

average rating: 1.2 (52 votes) (1=very good 6=terrible)


May, 25th 2007:
April, 26th 2007:
Apr, 10th. 2007:
Druckversion . pdf icon
You are here: Tips&Tricks

nice and PORTAGE_NICENESS

Very simply put, the Linux kernel has a (process) scheduler that selects which process to run next in your system. One factor influencing the scheduler's decision about which process to assign CPU time to, is the priority of a process. Processes with a high priority will run before those with a lower priority, and processes with the same priority will take turns in running, one after the other and over again.

Better have a look at it for yourself: Run top from a terminal on your host and pay special attention to the PR and NI columns:

Sample top output

  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND 
 8005 root      20   0 85188  33m  57m R  3.3  6.7   8:43.77 X 
 8148 tobias    20  10 25624 2376  24m S  0.3  0.5   0:00.60 xscreensaver 
    1 root      20   0  2476  552 2304 S  0.0  0.1   0:00.31 init 
    2 root      39  19     0    0    0 S  0.0  0.0   0:00.00 ksoftirqd/0 
    3 root      15  -5     0    0    0 S  0.0  0.0   0:00.09 events/0

The PR column indicates the priority level of a process, the value in the NI column displays the so-called nice value of process, which allows you to adjust the priority of a running process. Possible values range from -20 (very high priority), via 0 (standard priority) to 20 (very low priority). In our little example the xscreensaver process has a higher nice value than X, which indicates that X has a higher priority than xscreensaver.

Now, how do we make this work to our advantage when using Portage?

If you keep using your computer while compiling packages you will notice that your box is much less responsive as usal. This is caused by having two "groups" of processes with the same nice priority: your usual running tasks on one side, and emerge (and its child processes) on the other. Now, if you could renice emerge and its children to a higher nice (i.e. lower priority!) value (default is 0), compiling would inevitably take somewhat longer, but you could use your workstation without noticing much difference to its usual performance. That's what the PORTAGE_NICENESS parameter in /etc/make.conf is for:

Code Listing 1: Put this in /etc/make.conf

PORTAGE_NICENESS="15"

You can generally "renice" individual processes from the commandline, (e.g. renice 0 -p 8148 to prioritize xscreensaver in the above example), but this will not work with emerge, as Portage reads the PORTAGE_NICENESS setting from /etc/make.conf once and executes all child processes with the specified nice value.

From http://www.gentoo.org/news/en/gwn/20041101-newsletter.xml

back



Support us on Content Nation

New Packages

- as rdf newsfeed
- as rss newsfeed
- as Atom newsfeed
2026-01-21
biboumi - 10.0_pre20260110
Ebuild name:

net-im/biboumi-10.0_pre20260110

Description

XMPP gateway to IRC

Added to portage

2026-01-21

caffe2 - 2.9.1-r3
Ebuild name:

sci-ml/caffe2-2.9.1-r3

Description

A deep learning framework

Added to portage

2026-01-21

less - 691
Ebuild name:

sys-apps/less-691

Description

Excellent text file viewer

Added to portage

2026-01-21

openpgp-keys-inetutils - 20260120
Ebuild name:

sec-keys/openpgp-keys-inetutils-20260120

Description

OpenPGP keys used for net-misc/inetutils

Added to portage

2026-01-21

openpgp-keys-martinlambers - 20260120
Ebuild name:

sec-keys/openpgp-keys-martinlambers-20260120

Description

OpenPGP key used by Martin Lambers

Added to portage

2026-01-21

pytokens - 0.4.0-r1
Ebuild name:

dev-python/pytokens-0.4.0-r1

Description

A fast, spec compliant Python 3.13+ tokenizer that runs on older Pytho

Added to portage

2026-01-21

sslscan - 2.2.1
Ebuild name:

net-analyzer/sslscan-2.2.1

Description

Fast SSL configuration scanner

Added to portage

2026-01-21

tomcat-native - 1.3.5
Ebuild name:

dev-java/tomcat-native-1.3.5

Description

Allows Tomcat to use certain native resources for better performance

Added to portage

2026-01-21

2026-01-20
amq-protocol - 2.5.1
Ebuild name:

dev-ruby/amq-protocol-2.5.1

Description

An AMQP 0.9.1 serialization library for Ruby

Added to portage

2026-01-20

aws-sdk-cpp - 1.11.686-r1
Ebuild name:

dev-cpp/aws-sdk-cpp-1.11.686-r1

Description

AWS SDK for C++

Added to portage

2026-01-20

azure-core - 1.16.2
Ebuild name:

dev-cpp/azure-core-1.16.2

Description

Azure SDK for C++

Added to portage

2026-01-20

azure-identity - 1.13.3
Ebuild name:

dev-cpp/azure-identity-1.13.3

Description

Azure SDK for C++

Added to portage

2026-01-20

blessed - 1.27.0
Ebuild name:

dev-python/blessed-1.27.0

Description

Library for making terminal apps using colors, keyboard input and positio

Added to portage

2026-01-20

busybox - 1.37.0
Ebuild name:

sys-apps/busybox-1.37.0

Description

Utilities for rescue and embedded systems

Added to portage

2026-01-20

candy - 6.1.6
Ebuild name:

net-vpn/candy-6.1.6

Description

A reliable, low-latency, and anti-censorship virtual private network

Added to portage

2026-01-20

claude-code - 2.1.12
Ebuild name:

dev-util/claude-code-2.1.12

Description

Claude Code - an agentic coding tool by Anthropic

Added to portage

2026-01-20

dist-kernel - 5.10.248
Ebuild name:

virtual/dist-kernel-5.10.248

Description

Virtual to depend on any Distribution Kernel

Added to portage

2026-01-20

dist-kernel - 5.15.198
Ebuild name:

virtual/dist-kernel-5.15.198

Description

Virtual to depend on any Distribution Kernel

Added to portage

2026-01-20

dist-kernel - 6.1.161
Ebuild name:

virtual/dist-kernel-6.1.161

Description

Virtual to depend on any Distribution Kernel

Added to portage

2026-01-20

django-polymorphic - 4.10.4
Ebuild name:

dev-python/django-polymorphic-4.10.4

Description

Seamless Polymorphic Inheritance for Django Models

Added to portage

2026-01-20

fido2 - 2.1.1
Ebuild name:

dev-python/fido2-2.1.1

Description

Python based FIDO 2.0 library

Added to portage

2026-01-20

freerdp - 3.21.0
Ebuild name:

net-misc/freerdp-3.21.0

Description

Free implementation of the Remote Desktop Protocol

Added to portage

2026-01-20

gentoo-kernel - 5.10.248
Ebuild name:

sys-kernel/gentoo-kernel-5.10.248

Description

Linux kernel built with Gentoo patches

Added to portage

2026-01-20

gentoo-kernel - 5.15.198
Ebuild name:

sys-kernel/gentoo-kernel-5.15.198

Description

Linux kernel built with Gentoo patches

Added to portage

2026-01-20

gentoo-kernel - 6.1.161
Ebuild name:

sys-kernel/gentoo-kernel-6.1.161

Description

Linux kernel built with Gentoo patches

Added to portage

2026-01-20

gentoo-kernel-bin - 5.10.248
Ebuild name:

sys-kernel/gentoo-kernel-bin-5.10.248

Description

Pre-built Linux kernel with Gentoo patches

Added to portage

2026-01-20

gentoo-kernel-bin - 5.15.198
Ebuild name:

sys-kernel/gentoo-kernel-bin-5.15.198

Description

Pre-built Linux kernel with Gentoo patches

Added to portage

2026-01-20

gentoo-kernel-bin - 6.1.161
Ebuild name:

sys-kernel/gentoo-kernel-bin-6.1.161

Description

Pre-built Linux kernel with Gentoo patches

Added to portage

2026-01-20

gentoo-sources - 5.15.198
Ebuild name:

sys-kernel/gentoo-sources-5.15.198

Description

Full sources including the Gentoo patchset for the . kernel tree

Added to portage

2026-01-20

gentoo-sources - 6.1.161
Ebuild name:

sys-kernel/gentoo-sources-6.1.161

Description

Full sources including the Gentoo patchset for the . kernel tree

Added to portage

2026-01-20

gentoo-sources - 6.12.66
Ebuild name:

sys-kernel/gentoo-sources-6.12.66

Description

Full sources including the Gentoo patchset for the . kernel tree

Added to portage

2026-01-20

gentoo-sources - 6.18.6
Ebuild name:

sys-kernel/gentoo-sources-6.18.6

Description

Full sources including the Gentoo patchset for the . kernel tree

Added to portage

2026-01-20

gentoo-sources - 6.6.121
Ebuild name:

sys-kernel/gentoo-sources-6.6.121

Description

Full sources including the Gentoo patchset for the . kernel tree

Added to portage

2026-01-20

git - 4.3.0
Ebuild name:

dev-ruby/git-4.3.0

Description

Library for using Git in Ruby

Added to portage

2026-01-20

glm - 1.0.2
Ebuild name:

media-libs/glm-1.0.2

Description

OpenGL Mathematics

Added to portage

2026-01-20

gnucash - 5.14
Ebuild name:

app-office/gnucash-5.14

Description

Personal finance manager

Added to portage

2026-01-20

gopls - 0.21.0
Ebuild name:

dev-go/gopls-0.21.0

Description

Added to portage

2026-01-20

inetutils - 2.7
Ebuild name:

net-misc/inetutils-2.7

Description

Collection of common network programs

Added to portage

2026-01-20

isort - 7.0.0-r1
Ebuild name:

dev-python/isort-7.0.0-r1

Description

A python utility/library to sort imports

Added to portage

2026-01-20

jellyfin-bin - 10.11.6
Ebuild name:

www-apps/jellyfin-bin-10.11.6

Description

Jellyfin puts you in control of managing and streaming your media

Added to portage

2026-01-20

keystoneauth1 - 5.13.0
Ebuild name:

dev-python/keystoneauth1-5.13.0

Description

This package contains tools for authenticating to an OpenStack-base

Added to portage

2026-01-20

kramdown - 2.5.2
Ebuild name:

dev-ruby/kramdown-2.5.2

Description

Yet-another-markdown-parser but fast, pure Ruby, using strict syntax defini

Added to portage

2026-01-20

libfilezilla - 0.54.0
Ebuild name:

dev-libs/libfilezilla-0.54.0

Description

C++ library offering some basic functionality for platform-independent

Added to portage

2026-01-20

mattermost-desktop-bin - 6.0.4
Ebuild name:

net-im/mattermost-desktop-bin-6.0.4

Description

Mattermost Desktop application

Added to portage

2026-01-20

mkdocstrings - 1.0.1
Ebuild name:

dev-python/mkdocstrings-1.0.1

Description

Automatic documentation from sources, for MkDocs

Added to portage

2026-01-20

multiprocess - 0.70.19
Ebuild name:

dev-python/multiprocess-0.70.19

Description

Better multiprocessing and multithreading in Python

Added to portage

2026-01-20

nagios-plugins - 2.4.12-r4
Ebuild name:

net-analyzer/nagios-plugins-2.4.12-r4

Description

Official plugins for Nagios

Added to portage

2026-01-20

nushell - 0.110.0
Ebuild name:

app-shells/nushell-0.110.0

Description

A new type of shell, written in Rust

Added to portage

2026-01-20

openhab-bin - 5.1.1
Ebuild name:

app-misc/openhab-bin-5.1.1

Description

An open-source automation software for your home

Added to portage

2026-01-20

openpgp-keys-martinmares - 20260120
Ebuild name:

sec-keys/openpgp-keys-martinmares-20260120

Description

OpenPGP key used by Martin Mareš

Added to portage

2026-01-20

openpgp-keys-pevik - 20260120
Ebuild name:

sec-keys/openpgp-keys-pevik-20260120

Description

OpenPGP key used by Petr Vorel (pevik)

Added to portage

2026-01-20

openstacksdk - 4.9.0
Ebuild name:

dev-python/openstacksdk-4.9.0

Description

A collection of libraries for building applications to work with Open

Added to portage

2026-01-20

pidgin-led-notification - 0.1-r3
Ebuild name:

x11-plugins/pidgin-led-notification-0.1-r3

Description

Pidgin plugin to notify by writing user defined strings

Added to portage

2026-01-20

pixi - 0.63.2
Ebuild name:

dev-util/pixi-0.63.2

Description

A package management and workflow tool

Added to portage

2026-01-20

pylast - 7.0.2
Ebuild name:

dev-python/pylast-7.0.2

Description

Python interface to last.fm and other api-compatible websites

Added to portage

2026-01-20

pylint - 4.0.4-r1
Ebuild name:

dev-python/pylint-4.0.4-r1

Description

Python code static checker

Added to portage

2026-01-20

qpdf - 12.3.1
Ebuild name:

app-text/qpdf-12.3.1

Description

Command-line tool for structural, content-preserving transformation of PDF fil

Added to portage

2026-01-20

scdrand - 0.3.5
Ebuild name:

app-crypt/scdrand-0.3.5

Description

Feed kernel entropy pool from smartcard's TRNG

Added to portage

2026-01-20

selenium-webdriver - 4.40.0
Ebuild name:

dev-ruby/selenium-webdriver-4.40.0

Description

This gem provides Ruby bindings for WebDriver

Added to portage

2026-01-20

shadow - 4.19.2
Ebuild name:

sys-apps/shadow-4.19.2

Description

Utilities to deal with user accounts

Added to portage

2026-01-20

stalwart-cli - 0.15.4
Ebuild name:

net-mail/stalwart-cli-0.15.4

Description

Stalwart Mail Server command line utility

Added to portage

2026-01-20

stalwart-mail - 0.15.4
Ebuild name:

net-mail/stalwart-mail-0.15.4

Description

Stalwart Mail Server

Added to portage

2026-01-20

stestr - 4.2.0-r1
Ebuild name:

dev-python/stestr-4.2.0-r1

Description

A parallel Python test runner built around subunit

Added to portage

2026-01-20

vanilla-kernel - 5.10.248
Ebuild name:

sys-kernel/vanilla-kernel-5.10.248

Description

Linux kernel built from vanilla upstream sources

Added to portage

2026-01-20

vanilla-kernel - 5.15.198
Ebuild name:

sys-kernel/vanilla-kernel-5.15.198

Description

Linux kernel built from vanilla upstream sources

Added to portage

2026-01-20

vanilla-kernel - 6.1.161
Ebuild name:

sys-kernel/vanilla-kernel-6.1.161

Description

Linux kernel built from vanilla upstream sources

Added to portage

2026-01-20

vanilla-sources - 5.10.248
Ebuild name:

sys-kernel/vanilla-sources-5.10.248

Description

Full sources for the Linux kernel

Added to portage

2026-01-20

vanilla-sources - 5.15.198
Ebuild name:

sys-kernel/vanilla-sources-5.15.198

Description

Full sources for the Linux kernel

Added to portage

2026-01-20

vanilla-sources - 6.1.161
Ebuild name:

sys-kernel/vanilla-sources-6.1.161

Description

Full sources for the Linux kernel

Added to portage

2026-01-20

vanilla-sources - 6.12.66
Ebuild name:

sys-kernel/vanilla-sources-6.12.66

Description

Full sources for the Linux kernel

Added to portage

2026-01-20

vanilla-sources - 6.18.6
Ebuild name:

sys-kernel/vanilla-sources-6.18.6

Description

Full sources for the Linux kernel

Added to portage

2026-01-20

vanilla-sources - 6.6.121
Ebuild name:

sys-kernel/vanilla-sources-6.6.121

Description

Full sources for the Linux kernel

Added to portage

2026-01-20

weasyprint - 68.0
Ebuild name:

dev-python/weasyprint-68.0

Description

Visual rendering engine for HTML and CSS that can export to PDF

Added to portage

2026-01-20

wesnoth - 1.18.6
Ebuild name:

games-strategy/wesnoth-1.18.6

Description

Battle for Wesnoth - A fantasy turn-based strategy game

Added to portage

2026-01-20

wesnoth - 1.19.19
Ebuild name:

games-strategy/wesnoth-1.19.19

Description

Battle for Wesnoth - A fantasy turn-based strategy game

Added to portage

2026-01-20

winbox - 4.0_beta47
Ebuild name:

app-admin/winbox-4.0_beta47

Description

Management Software for MikroTik RouterOS

Added to portage

2026-01-20

zellij - 0.43.1-r1
Ebuild name:

app-misc/zellij-0.43.1-r1

Description

A terminal workspace with batteries included

Added to portage

2026-01-20

rdf newsfeed | rss newsfeed | Atom newsfeed
Copyright 2004-2025 Sascha Nitsch Unternehmensberatung GmbH
- Copyright and legal notices -
Time to create this page: 110.3 ms