Update to 20121015

This commit is contained in:
Jan Synacek 2012-10-15 13:30:19 +02:00
parent 334278ff3d
commit a1f2291dd9
4 changed files with 1039 additions and 983 deletions

6
Makefile Executable file → Normal file
View File

@ -22,7 +22,7 @@ ifeq ($(THREAD_SUPPORT),yes)
BENCH_CFLAGS += -ftree-vectorize
endif
CLEANFILES := numad.o numad .depend .depend.X
CLEANFILES := numad.o numad .depend .depend.X empty.c empty.o
SOURCES := numad.c
@ -31,7 +31,7 @@ docdir := ${prefix}/share/doc
all: numad
numad: numad.o -lpthread
numad: numad.o -lpthread -lrt
AR ?= ar
RANLIB ?= ranlib
@ -42,6 +42,7 @@ RANLIB ?= ranlib
install: numad
mkdir -p ${prefix}/bin
mkdir -p ${prefix}/share/man/man8
install -m 0755 numad ${prefix}/bin
install -m 0644 numad.8 ${prefix}/share/man/man8
@ -62,4 +63,3 @@ include .depend
Makefile: .depend

65
numad.8
View File

@ -1,5 +1,5 @@
.TH "numad" "8" "0.5.0" "Bill Gray" "Administration"
.SH "nuamd"
.TH "numad" "8" "1.0.0" "Bill Gray" "Administration"
.SH "numad"
.LP
numad \- A user\-level daemon that provides advice and managment for optimum use of CPUs and memory on systems with NUMA topology.
.SH "SYNTAX"
@ -30,6 +30,9 @@ numad [\fI\-u target_utilization\fP]
.LP
numad [\fI\-w NCPUS[:MB]\fP]
.br
.LP
numad [\fI\-x PID\fP]
.br
.SH "DESCRIPTION"
.LP
@ -49,7 +52,7 @@ This option can be used to communicate a non-standard cgroup mount point to
numad. This is not normally necessary.
.TP
\fB\-h\fR
Display usage help information and exit.
Display usage help information and then exit.
.TP
\fB\-i\fR <\fI[min_interval:]max_interval\fP>
Sets the time interval that numad waits between system scans, in seconds to
@ -60,31 +63,30 @@ daemon.) A bigger <\fImax_interval\fP> will decrease numad overhead but also
decrease responsiveness to changing loads.
.TP
\fB\-l\fR <\fIlog_level\fP>
Sets the log level to <\fIlog_level\fP>. Good choices are 5, 6, or 7. The default value is 5.
Sets the log level to <\fIlog_level\fP>. Reasonable choices are 5, 6, or 7.
The default value is 5.
.TP
\fB\-p\fR <\fIPID\fP>
Add PID to explicit list of processes to consider for managing, if the process
uses significant resources. Multiple \fI\-p PID\fP options can be specified at
daemon start, but after deamon start, only one PID can be added to the explicit
list per subsequent numad invocation. Use with \-S to precisely control the
scope of processes numad can manage. Note that (currently) the specified
process will not necessarily be actively managed unless it also meets numad's
significance threshold.
Add PID to explicit inclusion list of processes to consider for managing, if
the process also uses significant resources. Multiple \fI\-p PID\fP options
can be specified at daemon start, but after deamon start, only one PID can be
added to the inclusion list per subsequent numad invocation. Use with \-S to
precisely control the scope of processes numad can manage. Note that the
specified process will not necessarily be actively managed unless it also meets
numad's significance threshold -- which is currently 300MB and half a CPU.
.TP
\fB\-r\fR <\fIPID\fP>
Remove PID from explicit list of processes to consider for managing. After
deamon start, only one PID can be removed from the explicit process list per
subsequent numad invocation. Use with \-S and \-p to precisely control the
scope of processes numad can manage. (Currently, removed PIDs are not excluded
when scanning all processes. In the future, removed PIDs may be added to a
PID-exclusion list. Currently it makes sense to remove a PID from the explicit
list only when using \fI-S 0\fP and previously having used \-p to add the PID.)
Remove PID from both the explicit inclusion and the exclusion lists of
processes. After deamon start, only one PID can be removed from the explicit
process lists per subsequent numad invocation. Use with \-S and \-p and \-x to
precisely control the scope of processes numad can manage.
.TP
\fB\-S\fR <\fI0|1\fP>
This option controls whether numad scans all system processes or only the
explicit PID list. The default is to scan all processes. Use \fI\-S 0\fP to
scan only the explicit PID list. Use \fI\-S 1\fP to again scan all system
processes. Starting numad as
processes on the explicit inclusion PID list. The default is to scan all
processes. Use \fI\-S 0\fP to scan only the explicit inclusion PID list. Use
\fI\-S 1\fP to again scan all system processes (excepting those on the explicit
exclusion list). Starting numad as
.br
\fInumad \-S 0 \-p <PID-1> \-p <PID-2> \-p <PID-3>\fP
.br
@ -93,8 +95,8 @@ three explicitly specified processes.
.TP
\fB\-u\fR <\fItarget_utilization\fP>
Set the desired maximum consumption percentage of a node. Default is 85%.
Decrease the target value to maintain more available resource margin. Increase
the target value to more exhaustively consume node resources.
Decrease the target value to maintain more available resource margin on each
node. Increase the target value to more exhaustively consume node resources.
.TP
\fB\-v\fR
Verbose output in log, sets the log level to LOG_INFO. Same effect as \fI\-l 6\fP.
@ -104,18 +106,25 @@ Display version information and exit.
.TP
\fB\-w\fR <\fINCPUS[:MB]\fP>
Queries numad for the best NUMA nodes to bind an entity that needs
<\fINCPUS\fP>. The amount of memory (in MBs) is optional, but should be
specified as well <\fI:MB\fP> so numad can recommend NUMA nodes with available
CPU capacity and adequate free memory. This query option can be used
<\fINCPUS\fP>. The amount of memory (in MBs) is optional, but should normally
be specified as well <\fI:MB\fP> so numad can recommend NUMA nodes with
available CPU capacity and adequate free memory. This query option can be used
regardless of whether numad is running as a daemon. (An invocation using this
option when numad is not running as a daemon, will not cause the deamon to
start.) Output of this option is a string that contains a NUMA node list.
For example: 2\-3,6. The recommended node list could be saved in a shell variable
start.) Output of this option is a string that contains a NUMA node list. For
example: 2\-3,6. The recommended node list could be saved in a shell variable
(e.g., NODES) and then used as the node list parameter in a
.br
\fInumactl \-m $NODES \-N $NODES ... \fP
.br
command. See numactl(8).
.TP
\fB\-x\fR <\fIPID\fP>
Add PID to explicit exclusion list of processes to blacklist from managing.
Multiple \fI\-x PID\fP options can be specified at daemon start, but after
deamon start, only one PID can be added to the exclusion list per subsequent
numad invocation. Use with \-S to precisely control the scope of processes
numad can manage.
.SH "FILES"
.LP
\fI/usr/bin/numad\fP

1944
numad.c

File diff suppressed because it is too large Load Diff

View File

@ -1,6 +1,5 @@
# Config file for numad
# content TBD
#
# Default INTERVAL is 10
# uncomment the below to change it
INTERVAL=10
# Default INTERVAL is 15
# modify below to change it
INTERVAL=15