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:

80961

userrating:

average rating: 1.2 (50 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


rate this article:
current rating: average rating: 1.4 (104 votes) (1=very good 6=terrible)
Your rating:
Very good (1) Good (2) ok (3) average (4) bad (5) terrible (6)

back



Support us on Content Nation

New Packages

- as rdf newsfeed
- as rss newsfeed
- as Atom newsfeed
2025-09-19
fail2ban - 1.1.0-r5
Ebuild name:

net-analyzer/fail2ban-1.1.0-r5

Description

Scans log files and bans IPs that show malicious signs

Added to portage

2025-09-19

lilo - 24.2-r3
Ebuild name:

sys-boot/lilo-24.2-r3

Description

LInux LOader, the original Linux bootloader

Added to portage

2025-09-19

openblas - 0.3.30-r3
Ebuild name:

sci-libs/openblas-0.3.30-r3

Description

Optimized BLAS library based on GotoBLAS2

Added to portage

2025-09-19

plasma-wayland-protocols - 1.19.0
Ebuild name:

dev-libs/plasma-wayland-protocols-1.19.0

Description

Plasma Specific Protocols for Wayland

Added to portage

2025-09-19

2025-09-18
apulse - 0.1.14
Ebuild name:

media-sound/apulse-0.1.14

Description

PulseAudio emulation for ALSA

Added to portage

2025-09-18

authlib - 1.6.4
Ebuild name:

dev-python/authlib-1.6.4

Description

A Python library in building OAuth and OpenID Connect servers and clients

Added to portage

2025-09-18

awscli - 1.42.33
Ebuild name:

app-admin/awscli-1.42.33

Description

Universal Command Line Environment for AWS

Added to portage

2025-09-18

blazesym_c - 0.1.4
Ebuild name:

dev-libs/blazesym_c-0.1.4

Description

C bindings for blazesym, a library for address symbolization and related

Added to portage

2025-09-18

boto3 - 1.40.33
Ebuild name:

dev-python/boto3-1.40.33

Description

The AWS SDK for Python

Added to portage

2025-09-18

botocore - 1.40.33
Ebuild name:

dev-python/botocore-1.40.33

Description

Low-level, data-driven core of boto 3

Added to portage

2025-09-18

bpftrace - 0.24.0
Ebuild name:

dev-debug/bpftrace-0.24.0

Description

High-level tracing language for eBPF

Added to portage

2025-09-18

check-jsonschema - 0.34.0
Ebuild name:

app-misc/check-jsonschema-0.34.0

Description

A CLI and set of pre-commit hooks for jsonschema validation

Added to portage

2025-09-18

chrome-binary-plugins - 140.0.7339.185
Ebuild name:

www-plugins/chrome-binary-plugins-140.0.7339.185

Description

Binary plugins from Google Chrome for use in Chrom

Added to portage

2025-09-18

chromedriver-bin - 140.0.7339.185
Ebuild name:

www-apps/chromedriver-bin-140.0.7339.185

Description

WebDriver for Chrome

Added to portage

2025-09-18

chromium - 140.0.7339.185
Ebuild name:

www-client/chromium-140.0.7339.185

Description

Open-source version of Google Chrome web browser

Added to portage

2025-09-18

citus - 12.1.9
Ebuild name:

dev-db/citus-12.1.9

Description

Open-source postgresql extension for clustering/multi-node setups

Added to portage

2025-09-18

citus - 13.2.0
Ebuild name:

dev-db/citus-13.2.0

Description

Open-source postgresql extension for clustering/multi-node setups

Added to portage

2025-09-18

cmd2 - 3.0.0_beta2
Ebuild name:

dev-python/cmd2-3.0.0_beta2

Description

Extra features for standard library's cmd module

Added to portage

2025-09-18

curb - 1.2.1
Ebuild name:

dev-ruby/curb-1.2.1

Description

Ruby-language bindings for libcurl

Added to portage

2025-09-18

curl - 8.16.0-r1
Ebuild name:

net-misc/curl-8.16.0-r1

Description

A Client that groks URLs

Added to portage

2025-09-18

django - 6.0_alpha1
Ebuild name:

dev-python/django-6.0_alpha1

Description

High-level Python web framework

Added to portage

2025-09-18

django-template-partials - 25.2
Ebuild name:

dev-python/django-template-partials-25.2

Description

Reusable named inline partials for the Django Template Lan

Added to portage

2025-09-18

docutils - 0.22.1
Ebuild name:

dev-python/docutils-0.22.1

Description

Python Documentation Utilities (reference reStructuredText impl.)

Added to portage

2025-09-18

driftnet - 1.5.0
Ebuild name:

net-analyzer/driftnet-1.5.0

Description

Watches network traffic and displays media from TCP streams observed

Added to portage

2025-09-18

element-desktop-bin - 1.11.112
Ebuild name:

net-im/element-desktop-bin-1.11.112

Description

A glossy Matrix collaboration client for desktop (binary packag

Added to portage

2025-09-18

esptool - 4.10.0
Ebuild name:

dev-embedded/esptool-4.10.0

Description

Utility to communicate with the ROM bootloader in Espressif ESP8266 and

Added to portage

2025-09-18

esptool - 5.1.0
Ebuild name:

dev-embedded/esptool-5.1.0

Description

Serial utility for flashing and interacting with Espressif ESP8266 and E

Added to portage

2025-09-18

fex-xtajit - 2509
Ebuild name:

app-emulation/fex-xtajit-2509

Description

A wine emulation dll for running x86 application on an arm64 host

Added to portage

2025-09-18

fheroes2 - 1.1.11
Ebuild name:

games-engines/fheroes2-1.1.11

Description

Recreation of HoMM2 game engine

Added to portage

2025-09-18

fonttools - 4.60.0
Ebuild name:

dev-python/fonttools-4.60.0

Description

Library for manipulating TrueType, OpenType, AFM and Type1 fonts

Added to portage

2025-09-18

gmtp - 1.3.11-r4
Ebuild name:

media-sound/gmtp-1.3.11-r4

Description

Simple MTP client for MP3 players

Added to portage

2025-09-18

google-chrome - 140.0.7339.185
Ebuild name:

www-client/google-chrome-140.0.7339.185

Description

The web browser from Google

Added to portage

2025-09-18

hashcat-utils - 1.10
Ebuild name:

app-crypt/hashcat-utils-1.10

Description

a set of small utilities that are useful in advanced password cracking

Added to portage

2025-09-18

hypothesis - 6.139.2
Ebuild name:

dev-python/hypothesis-6.139.2

Description

A library for property based testing

Added to portage

2025-09-18

jenkins-bin - 2.516.3
Ebuild name:

dev-util/jenkins-bin-2.516.3

Description

The leading open source automation server

Added to portage

2025-09-18

jenkins-bin - 2.528
Ebuild name:

dev-util/jenkins-bin-2.528

Description

The leading open source automation server

Added to portage

2025-09-18

jsoncons - 1.4.0
Ebuild name:

dev-cpp/jsoncons-1.4.0

Description

C++ header-only library for JSON and JSON-like data formats

Added to portage

2025-09-18

ldb - 2.11.0
Ebuild name:

virtual/ldb-2.11.0

Description

Virtual for samba project's ldb

Added to portage

2025-09-18

libfmt - 12.0.0
Ebuild name:

dev-libs/libfmt-12.0.0

Description

Small, safe and fast formatting library

Added to portage

2025-09-18

libwebsockets - 4.4.1-r1
Ebuild name:

net-libs/libwebsockets-4.4.1-r1

Description

A flexible pure-C library for implementing network protocols

Added to portage

2025-09-18

llvm-mingw64 - 13.0.0-r1
Ebuild name:

dev-util/llvm-mingw64-13.0.0-r1

Description

Clang/LLVM based mingw64 toolchain

Added to portage

2025-09-18

mathgl - 8.0.3
Ebuild name:

sci-libs/mathgl-8.0.3

Description

Math Graphics Library

Added to portage

2025-09-18

mesa - 25.2.3
Ebuild name:

media-libs/mesa-25.2.3

Description

OpenGL-like graphic library for Linux

Added to portage

2025-09-18

mesa_clc - 25.2.3
Ebuild name:

dev-util/mesa_clc-25.2.3

Description

mesa_clc tool used for building OpenCL C to SPIR-V

Added to portage

2025-09-18

microsoft-edge - 140.0.3485.66-r1
Ebuild name:

www-client/microsoft-edge-140.0.3485.66-r1

Description

The web browser from Microsoft

Added to portage

2025-09-18

microsoft-edge-beta - 140.0.3485.54-r1
Ebuild name:

www-client/microsoft-edge-beta-140.0.3485.54-r1

Description

The web browser from Microsoft

Added to portage

2025-09-18

microsoft-edge-beta - 141.0.3537.13-r1
Ebuild name:

www-client/microsoft-edge-beta-141.0.3537.13-r1

Description

The web browser from Microsoft

Added to portage

2025-09-18

microsoft-edge-beta - 141.0.3537.25
Ebuild name:

www-client/microsoft-edge-beta-141.0.3537.25

Description

The web browser from Microsoft

Added to portage

2025-09-18

microsoft-edge-dev - 141.0.3525.0-r1
Ebuild name:

www-client/microsoft-edge-dev-141.0.3525.0-r1

Description

The web browser from Microsoft

Added to portage

2025-09-18

microsoft-edge-dev - 141.0.3537.9-r1
Ebuild name:

www-client/microsoft-edge-dev-141.0.3537.9-r1

Description

The web browser from Microsoft

Added to portage

2025-09-18

microsoft-edge-dev - 142.0.3558.0
Ebuild name:

www-client/microsoft-edge-dev-142.0.3558.0

Description

The web browser from Microsoft

Added to portage

2025-09-18

netpbm - 11.11.2
Ebuild name:

media-libs/netpbm-11.11.2

Description

A set of utilities for converting to/from the netpbm (and related) format

Added to portage

2025-09-18

netpbm - 11.2.19
Ebuild name:

media-libs/netpbm-11.2.19

Description

A set of utilities for converting to/from the netpbm (and related) format

Added to portage

2025-09-18

openrgb - 1.0_rc2
Ebuild name:

app-misc/openrgb-1.0_rc2

Description

Open source RGB lighting control

Added to portage

2025-09-18

openrgb-plugin-effects - 1.0_rc2
Ebuild name:

app-misc/openrgb-plugin-effects-1.0_rc2

Description

Plugin for OpenRGB with various Effects that can be synced

Added to portage

2025-09-18

openrgb-plugin-skin - 1.0_rc2
Ebuild name:

app-misc/openrgb-plugin-skin-1.0_rc2

Description

Plugin for OpenRGB that allows you to customize the look and f

Added to portage

2025-09-18

openrgb-plugin-visualmap - 1.0_rc2
Ebuild name:

app-misc/openrgb-plugin-visualmap-1.0_rc2

Description

Plugin for OpenRGB to create virtual devices out of multi

Added to portage

2025-09-18

opera - 122.0.5643.24
Ebuild name:

www-client/opera-122.0.5643.24

Description

A fast and secure web browser

Added to portage

2025-09-18

opera-developer - 123.0.5658.0
Ebuild name:

www-client/opera-developer-123.0.5658.0

Description

A fast and secure web browser

Added to portage

2025-09-18

pdfcrack - 0.21
Ebuild name:

app-crypt/pdfcrack-0.21

Description

Tool for recovering passwords and content from PDF-files

Added to portage

2025-09-18

psutil - 7.1.0
Ebuild name:

dev-python/psutil-7.1.0

Description

Retrieve information on running processes and system utilization

Added to portage

2025-09-18

pyperclip - 1.10.0
Ebuild name:

dev-python/pyperclip-1.10.0

Description

A cross-platform clipboard module for Python

Added to portage

2025-09-18

python - 0.3.14.0_rc3
Ebuild name:

dev-lang/python-0.3.14.0_rc3

Description

Freethreading (no-GIL) version of Python programming language

Added to portage

2025-09-18

python - 3.14.0_rc3
Ebuild name:

dev-lang/python-3.14.0_rc3

Description

An interpreted, interactive, object-oriented programming language

Added to portage

2025-09-18

python-tests - 0.3.14.0_rc3
Ebuild name:

dev-python/python-tests-0.3.14.0_rc3

Description

Test modules from dev-lang/python

Added to portage

2025-09-18

python-tests - 3.14.0_rc3
Ebuild name:

dev-python/python-tests-3.14.0_rc3

Description

Test modules from dev-lang/python

Added to portage

2025-09-18

regress - 1.5.1
Ebuild name:

app-emacs/regress-1.5.1

Description

Regression test harness for Emacs Lisp code

Added to portage

2025-09-18

samba - 4.21.8
Ebuild name:

net-fs/samba-4.21.8

Description

Samba Suite Version 4

Added to portage

2025-09-18

samba - 4.22.4
Ebuild name:

net-fs/samba-4.22.4

Description

Samba Suite Version 4

Added to portage

2025-09-18

samba - 4.23.0
Ebuild name:

net-fs/samba-4.23.0

Description

Samba Suite Version 4

Added to portage

2025-09-18

simdjson - 4.0.4
Ebuild name:

dev-libs/simdjson-4.0.4

Description

SIMD accelerated C++ JSON library

Added to portage

2025-09-18

sqlglot - 27.15.3
Ebuild name:

dev-python/sqlglot-27.15.3

Description

An easily customizable SQL parser and transpiler

Added to portage

2025-09-18

tdb - 1.4.14
Ebuild name:

sys-libs/tdb-1.4.14

Description

Simple database API

Added to portage

2025-09-18

tevent - 0.17.1
Ebuild name:

sys-libs/tevent-0.17.1

Description

Samba tevent library

Added to portage

2025-09-18

thunderbird - 140.3.0
Ebuild name:

mail-client/thunderbird-140.3.0

Description

Thunderbird Mail Client

Added to portage

2025-09-18

thunderbird-bin - 140.3.0
Ebuild name:

mail-client/thunderbird-bin-140.3.0

Description

Thunderbird Mail Client

Added to portage

2025-09-18

uv - 0.8.18
Ebuild name:

dev-python/uv-0.8.18

Description

A Python package installer and resolver, written in Rust

Added to portage

2025-09-18

uv-build - 0.8.18
Ebuild name:

dev-python/uv-build-0.8.18

Description

PEP517 uv build backend

Added to portage

2025-09-18

vlc - 3.0.22_rc1-r2
Ebuild name:

media-video/vlc-3.0.22_rc1-r2

Description

Media player and framework with support for most multimedia files and

Added to portage

2025-09-18

xmltodict - 1.0.2
Ebuild name:

dev-python/xmltodict-1.0.2

Description

Makes working with XML feel like you are working with JSON

Added to portage

2025-09-18

rdf newsfeed | rss newsfeed | Atom newsfeed
- Powered by LeopardCMS - Running on Gentoo -
Copyright 2004-2020 Sascha Nitsch Unternehmensberatung GmbH
Valid XHTML1.1 : Valid CSS : buttonmaker
- Level Triple-A Conformance to Web Content Accessibility Guidelines 1.0 -
- Copyright and legal notices -
Time to create this page: 106.5 ms