NJOBIHTM(1)

NAME
njobihtm - number of jobs considering hyper-threading and memory

SYNOPSIS
njobihtm [-v] [-m nnn[MG]]

DESCRIPTION
njobihtm determines the number of CPU-intensive jobs based on the number of CPU and memory resources. The 'ihtm' stands for 'intelligent hyper-threading and memory'. The script
    -   determines the number of physical cores and the number of threads per core
    -   assumes that only a quarter of the additional hyper-threads are useful
    -   if -m is given. determines the memory size, assumes that at least one GB should be available for general usage, and limits the number of jobs accordingly.

The number of jobs is written to STDOUT, and can be used like `njobs`.

OPTIONS

-m size
    gives the required physical memory per job. size must be given as integer with either a 'M' or 'G', indicating MB or GB.

-v  if given the found system parameters and the reasoning is printed to STDERR.

EXAMPLES

make -j `njobihtm` all
    Start make(1) with a reasonable number of jobs.

njobihtm -v -m=2G
    Determines the number of jobs with 2 GB memory per job. On a system with 4 cores and hyper-threading and 8 GB installed memory one gets due to the '-v' the output
            #cpus:        8
            #thread/cpu:  2
            #cores:       4
            mem(MB):      7961
            #job (cpus):  5
            #job (mem):   3
            3
    Note that the '-v' output goes to STDERR, only the answer '3' to STDOUT.

AUTHOR
Walter F.J. Mueller <W.F.J.Mueller@gsi.de>