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:

73629

userrating:

average rating: 1.2 (8 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 (80 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-03-31
aspell-en - 2020.12.07.0-r1
Ebuild name:

app-dicts/aspell-en-2020.12.07.0-r1

Description

Aspell () language dictionary

Added to portage

2025-03-31

aspell-eo - 2.1.20000225.2-r1
Ebuild name:

app-dicts/aspell-eo-2.1.20000225.2-r1

Description

Aspell () language dictionary

Added to portage

2025-03-31

b4 - 0.14.2-r1
Ebuild name:

net-mail/b4-0.14.2-r1

Description

Utility for fetching patchsets from public-inbox

Added to portage

2025-03-31

djbdns-logparse - 0.0.2-r3
Ebuild name:

app-admin/djbdns-logparse-0.0.2-r3

Description

Make tinydns and dnscache logs human-readable

Added to portage

2025-03-31

faraday-retry - 2.3.0
Ebuild name:

dev-ruby/faraday-retry-2.3.0

Description

Faraday adapter for Net

Added to portage

2025-03-31

gcc - 15.0.1_pre20250330
Ebuild name:

sys-devel/gcc-15.0.1_pre20250330

Description

The GNU Compiler Collection

Added to portage

2025-03-31

kmymoney - 5.1.92_p20250326
Ebuild name:

app-office/kmymoney-5.1.92_p20250326

Description

Personal finance manager based on KDE Frameworks

Added to portage

2025-03-31

nagios-check_multiple - 0.0.1-r4
Ebuild name:

net-analyzer/nagios-check_multiple-0.0.1-r4

Description

A Nagios plugin to execute multiple checks in parallel

Added to portage

2025-03-31

nagios-icinga-openvpn - 0.0.1-r5
Ebuild name:

net-analyzer/nagios-icinga-openvpn-0.0.1-r5

Description

A Nagios plugin to check whether an OpenVPN server is a

Added to portage

2025-03-31

nextcloud-client - 3.16.2
Ebuild name:

net-misc/nextcloud-client-3.16.2

Description

Desktop Syncing Client for Nextcloud

Added to portage

2025-03-31

patch - 2.8
Ebuild name:

sys-devel/patch-2.8

Description

Utility to apply diffs to files

Added to portage

2025-03-31

qpdfview - 0.5_p20240423
Ebuild name:

app-text/qpdfview-0.5_p20240423

Description

Tabbed document viewer

Added to portage

2025-03-31

swi-prolog - 9.3.9-r1
Ebuild name:

dev-lang/swi-prolog-9.3.9-r1

Description

Versatile implementation of the Prolog programming language

Added to portage

2025-03-31

untangle-https-backup - 0.1.0-r3
Ebuild name:

app-backup/untangle-https-backup-0.1.0-r3

Description

Back up Untangle configurations via the web admin UI

Added to portage

2025-03-31

2025-03-30
aspell-de-alt - 2.1.1-r2
Ebuild name:

app-dicts/aspell-de-alt-2.1.1-r2

Description

Aspell () language dictionary

Added to portage

2025-03-30

aspell-el - 0.08.0-r1
Ebuild name:

app-dicts/aspell-el-0.08.0-r1

Description

Aspell () language dictionary

Added to portage

2025-03-30

cli-ui - 0.19.0
Ebuild name:

dev-python/cli-ui-0.19.0

Description

Python library for better command line interfaces

Added to portage

2025-03-30

cosign - 2.4.3
Ebuild name:

app-containers/cosign-2.4.3

Description

container signing utility

Added to portage

2025-03-30

dunshire - 0.1.3-r2
Ebuild name:

sci-mathematics/dunshire-0.1.3-r2

Description

Python library to solve linear games over symmetric cones

Added to portage

2025-03-30

e3-core - 22.6.0-r4
Ebuild name:

dev-ada/e3-core-22.6.0-r4

Description

Ease the development of portable automated build systems

Added to portage

2025-03-30

fakeredis - 2.28.0
Ebuild name:

dev-python/fakeredis-2.28.0

Description

Fake implementation of redis API for testing purposes

Added to portage

2025-03-30

flake8 - 7.2.0
Ebuild name:

dev-python/flake8-7.2.0

Description

A wrapper around PyFlakes, pep8 & mccabe

Added to portage

2025-03-30

frescobaldi - 3.3.0-r1
Ebuild name:

media-sound/frescobaldi-3.3.0-r1

Description

A LilyPond sheet music text editor

Added to portage

2025-03-30

frescobaldi - 4.0.0
Ebuild name:

media-sound/frescobaldi-4.0.0

Description

A LilyPond sheet music text editor

Added to portage

2025-03-30

gammastep - 2.0.11
Ebuild name:

x11-misc/gammastep-2.0.11

Description

A screen color temperature adjusting software

Added to portage

2025-03-30

gcc - 12.4.1_p20250327
Ebuild name:

sys-devel/gcc-12.4.1_p20250327

Description

The GNU Compiler Collection

Added to portage

2025-03-30

gcc - 13.3.1_p20250328
Ebuild name:

sys-devel/gcc-13.3.1_p20250328

Description

The GNU Compiler Collection

Added to portage

2025-03-30

gcc - 14.2.1_p20250329
Ebuild name:

sys-devel/gcc-14.2.1_p20250329

Description

The GNU Compiler Collection

Added to portage

2025-03-30

griffe - 1.7.1
Ebuild name:

dev-python/griffe-1.7.1

Description

Signature generator for Python programs

Added to portage

2025-03-30

inline-snapshot - 0.21.1
Ebuild name:

dev-python/inline-snapshot-0.21.1

Description

Create and update inline snapshots in your Python tests

Added to portage

2025-03-30

intel-compute-runtime - 25.09.32961.8
Ebuild name:

dev-libs/intel-compute-runtime-25.09.32961.8

Description

Intel Graphics Compute Runtime for oneAPI Level Zero a

Added to portage

2025-03-30

intel-graphics-compiler - 2.10.2
Ebuild name:

dev-util/intel-graphics-compiler-2.10.2

Description

LLVM-based OpenCL compiler for OpenCL targetting Intel Gen

Added to portage

2025-03-30

jsonpickle - 4.0.5
Ebuild name:

dev-python/jsonpickle-4.0.5

Description

Python library for serializing any arbitrary object graph into JSON

Added to portage

2025-03-30

lcov - 2.3.1
Ebuild name:

dev-util/lcov-2.3.1

Description

A graphical front-end for GCC's coverage testing tool gcov

Added to portage

2025-03-30

libfilezilla - 0.50.0
Ebuild name:

dev-libs/libfilezilla-0.50.0

Description

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

Added to portage

2025-03-30

libmirage - 3.2.10
Ebuild name:

dev-libs/libmirage-3.2.10

Description

CD and DVD image access library

Added to portage

2025-03-30

libspnav - 1.2
Ebuild name:

dev-libs/libspnav-1.2

Description

libspnav is a replacement for the magellan library with a cleaner API

Added to portage

2025-03-30

lrcalc - 2.1-r2
Ebuild name:

dev-python/lrcalc-2.1-r2

Description

Python bindings for sci-mathematics/lrcalc

Added to portage

2025-03-30

openmsx - 20.0
Ebuild name:

games-emulation/openmsx-20.0

Description

MSX emulator that aims for perfection

Added to portage

2025-03-30

poetry - 2.1.2
Ebuild name:

dev-python/poetry-2.1.2

Description

A frontend for poetry - a python dependency management and packaging tool

Added to portage

2025-03-30

poetry-core - 2.1.2
Ebuild name:

dev-python/poetry-core-2.1.2

Description

Poetry PEP 517 Build Backend

Added to portage

2025-03-30

pplpy - 0.8.10-r1
Ebuild name:

dev-python/pplpy-0.8.10-r1

Description

Python bindings for the Parma Polyhedra Library (PPL)

Added to portage

2025-03-30

primecountpy - 0.1.0-r1
Ebuild name:

dev-python/primecountpy-0.1.0-r1

Description

Cython interface to sci-mathematics/primecount

Added to portage

2025-03-30

pulseaudio-dlna - 0.6.5_p1-r3
Ebuild name:

net-misc/pulseaudio-dlna-0.6.5_p1-r3

Description

A lightweight DLNA/UPNP/Chromecast streaming server for PulseA

Added to portage

2025-03-30

pycodestyle - 2.13.0
Ebuild name:

dev-python/pycodestyle-2.13.0

Description

Python style guide checker (fka pep8)

Added to portage

2025-03-30

pyflakes - 3.3.0
Ebuild name:

dev-python/pyflakes-3.3.0

Description

Passive checker for Python programs

Added to portage

2025-03-30

pytest-socket - 0.7.0
Ebuild name:

dev-python/pytest-socket-0.7.0

Description

Pytest Plugin to disable socket calls during tests

Added to portage

2025-03-30

pytest-testinfra - 10.2.1
Ebuild name:

dev-python/pytest-testinfra-10.2.1

Description

Write unit tests in Python to test actual state of your servers

Added to portage

2025-03-30

qpageview - 1.0.0
Ebuild name:

dev-python/qpageview-1.0.0

Description

Page-based viewer widget for Qt5/PyQt5

Added to portage

2025-03-30

rdoc - 6.13.1
Ebuild name:

dev-ruby/rdoc-6.13.1

Description

An extended version of the RDoc library from Ruby 1.8

Added to portage

2025-03-30

ruby-atk - 4.2.9
Ebuild name:

dev-ruby/ruby-atk-4.2.9

Description

Ruby Atk bindings

Added to portage

2025-03-30

ruby-cairo-gobject - 4.2.9
Ebuild name:

dev-ruby/ruby-cairo-gobject-4.2.9

Description

Ruby cairo-gobject bindings

Added to portage

2025-03-30

ruby-gdk3 - 4.2.9
Ebuild name:

dev-ruby/ruby-gdk3-4.2.9

Description

Ruby GDK-3.x bindings

Added to portage

2025-03-30

ruby-gdkpixbuf2 - 4.2.9
Ebuild name:

dev-ruby/ruby-gdkpixbuf2-4.2.9

Description

Ruby GdkPixbuf2 bindings

Added to portage

2025-03-30

ruby-gio2 - 4.2.9
Ebuild name:

dev-ruby/ruby-gio2-4.2.9

Description

Ruby binding of gio-2

Added to portage

2025-03-30

ruby-glib2 - 4.2.9
Ebuild name:

dev-ruby/ruby-glib2-4.2.9

Description

Ruby Glib2 bindings

Added to portage

2025-03-30

ruby-gobject-introspection - 4.2.9
Ebuild name:

dev-ruby/ruby-gobject-introspection-4.2.9

Description

Ruby GObjectIntrospection bindings

Added to portage

2025-03-30

ruby-gtk3 - 4.2.9
Ebuild name:

dev-ruby/ruby-gtk3-4.2.9

Description

Ruby Gtk2 bindings

Added to portage

2025-03-30

ruby-pango - 4.2.9
Ebuild name:

dev-ruby/ruby-pango-4.2.9

Description

Ruby Pango bindings

Added to portage

2025-03-30

ruby-poppler - 4.2.9
Ebuild name:

dev-ruby/ruby-poppler-4.2.9

Description

Ruby poppler-glib bindings

Added to portage

2025-03-30

trimesh - 4.6.6
Ebuild name:

dev-python/trimesh-4.6.6

Description

Python library for loading and using triangular meshes

Added to portage

2025-03-30

vanilla-sources - 6.6.85
Ebuild name:

sys-kernel/vanilla-sources-6.6.85

Description

Full sources for the Linux kernel

Added to portage

2025-03-30

vhba - 20250329
Ebuild name:

sys-fs/vhba-20250329

Description

Virtual (SCSI) Host Bus Adapter kernel module for the CDEmu suite

Added to portage

2025-03-30

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: 81.7 ms