xx Nice

Nice

Frank Lxffler (knarf@cct.lsu.edu)

January 7, 2025

Abstract

Simple tool for using a (configurable) nice level for all processes.

1 Comments

This thorn tries to renice all processes of Cactus to a given nice level. To renice a process means to change its nice level after the start. The nice level is a way to control the priority of processes for cpu power. It is always a good idea to give cpu-intensive jobs (like Cactus runs) a low priority if you are using desktop machines, especially if other people are using them too.

The nice level has a range of to . A higher number means less priority. Mostly, normal processes will get and only the superuser (root) can use negative values. Also only root can lower the nice level of a process, so if you nice your Cactus Run to 19, you cannot renice it later to an lower nice-level. The nice level of single processes can be controled by the system commands and/or . In the case of Cactus and Lamd this is not possible at startup. Therefore this thorn will set the nice level of your processes at CCTKxPARAMCHECK (in the beginning of the calculation). This thorn has only one parameter:

xxCCTK_INTxNice_nice

which is by default 19.

Note to developers: This thorn uses and and therefore needs the includes sys/time.h, errno.h and sys/resource.h. If these are not provided on some platform, please tell me.

2 Parameters

11 nicexnice10 Scope: private01  INT

11 Description: Nice level

11 Range 10              01  Default: 19
11 -20:19 10 The range for the nice is from -20 to 19, but only root can use negative values, default is 19.

11

3 Interfaces

General Implements: nice 4 Schedule This section lists all the variables which are assigned storage by thorn CactusUtils/Nice. Storage can either last for the duration of the run (Always means that if this thorn is activated storage will be assigned, Conditional means that if this thorn is activated storage will be assigned for the duration of the run if some condition is met), or can be turned on for the duration of a schedule function.

Storage NONE

Scheduled Functions

CCTKxSTARTUP x nicexrenice x renice the process x

11 x 11 Language: 11 c
11 x 11 Type:  11 function