kconfig(1M) kconfig(1M)
NAME
kconfig - tune kernel parameters for work-load optimization
SYNOPSIS
/etc/kconfig [-a [-v] [-V]] [-nnamelist]
DESCRIPTION
kconfig manipulates an A/UX(Reg.) kernel code file for
changing system parameters.
Note: It is not recommended that this utility be used
unless you know exactly what you are doing. Incorrect
use can cause system failures.
kconfig can be used to either list or change the system
parameters listed later in the section ``System Parame-
ters.''
Note that kconfig does not change parameters of the running
kernel, just the image on the disk. You must then run
shutdown(1M) and reboot(1M) for the changes to be effective.
FLAG OPTIONS
kconfig interprets the following flag options:
-a List the current values of the parameters in the
kernel object file namelist.
-v Use with the -a flag option to produce verbose
(commented) output.
-V Use with the -a flag option to print the current
version of the kernel object file namelist.
-n namelist
Specify which kernel object file is being modified
(the default is /unix).
If -a is used, kconfig displays the parameters and exits.
If -a is not used, standard input is read for a list of
changes. You can specify one change per input line of the
form
PARAM = value
PARAM += value
PARAM -= value
where PARAM is one of the parameter names (listed later in
the section ``System Parameters'') and the value is either a
decimal constant or a hexadecimal constant preceded by 0x.
April, 1990 1
kconfig(1M) kconfig(1M)
If the = form is used, the parameter is given the value
specified. If the -= form is used, the parameter is de-
creased by the value given. If the += form is used, the
parameter is increased by the value. If the value is not
within a system-defined maximum and minimum range for the
parameter, an error occurs and the kernel is not changed.
SYSTEM PARAMETERS
The following system parameters are recognized by kconfig:
Note: Not all of these parameters will necessarily be
supported in future releases of the operating system.
NBUF Specify the number of disk I/O buffers to allo-
cate. These form a data cache for information
read or written to file systems. Each buffer
consists of SBUFSIZE data areas and about three
dozen bytes of header information. Increasing
the number of buffers improves the ``cache hit
ratio'' on the buffer pool, but at the expense
of available memory for processes. The number
of system buffers normally ranges from 100 to
1500. One hundred buffers should be used for
systems with 2 megabytes of total memory. Prob-
ably not more than 750 buffers should be used on
systems with 4 MB of memory. Increasing the
number of buffers reduces the memory available
for applications and may cause more paging to
occur. Systems with a single user might con-
ceivably use more buffers than systems that typ-
ically have numerous memory-intensive applica-
tions running. The default value of NBUF is 0.
When the default value is used, the system
dynamically calculates the number of buffers as
10 percent of free memory at boot time.
SBUFSIZE Determine the size of system I/O logical block
size on disk devices. The size is configurable.
Most System V file systems (SVFS) use a 1 kilo-
byte (KB) block size. The SBUFSIZE parameter
determines the size of in-core buffers allocated
for the buffer cache. The number must be an
even multiple of 512 bytes and should be large
enough to accept the largest block size of all
active file systems. When the system buffer
size is increased, the total number of buffers
should be decreased, assuming the same amount of
memory is used for the buffer cache.
NPBUF Specify how many physical input/output buffer
headers to allocate. One header is needed for
2 April, 1990
kconfig(1M) kconfig(1M)
each simultaneous read or write of a
``character-special'' disk or tape device, or
for each concurrent swap I/O. The default value
is 20.
NFILE Determines the size of the system file-table
pool. Each entry represents an open file in use
by some process. When no space is available in
the file table, the message ``file: table is
full'' is printed on the system console. The
size is generally between 100 (the default) and
400. NFILE is often equal to the NINODE parame-
ter.
NINODE Set the size of the system inode table. Each
table entry represents an in-core inode being
used for an open file, an open working directo-
ry, or a mount point. For systems using a net-
work file system (NFS) to access remote file
systems, only locally open files consume inodes.
Normally the NINODE parameter is greater than or
equal to the NFILE parameter. Generally the
range is from 100 (the default) to 400 inodes.
When all inodes in the system inode table are
used, the message ``inode: table is full'' is
printed.
NSPTMAP Allocate table entries that are used to map the
system page table entries. The default value is
75. If the message ``sptreserve: No kernel vir-
tual space'' is printed, the system has exhaust-
ed the map.
NCALL Specify the size of the timeout table. Each en-
try may be used by device-driver software to ar-
range for a function to be called at a later
time. The default value is 50. If many add-on
TM
drives, such as for NuBus peripherals, are ad-
ded to the system, this value might require an
increase. If the timeout table is exhausted,
the message ``timeout table overflow'' is print-
ed, and the system halts execution.
NMOUNT Specify the size of the SVFS mount table. The
parameter does not affect the number of remotely
mounted network file systems allowed. If
numerous disk devices containing many file-
system partitions are present, the mount table
may need to be increased. The default size is
10.
NFLOCK Specify the number of system-wide locking(2)
April, 1990 3
kconfig(1M) kconfig(1M)
file locks. Each area of a locked file requires
one of these table entries. If the table is ex-
hausted, the error EDEADLOCK is returned to the
application that made the lock request. The de-
fault number of locks is 200.
NREGION Defines the number of memory regions available
to all processes in the system. A typical pro-
cess has a memory region for data, a memory re-
gion for stack, and a memory region for program
text, but this region would be shared between
all processes executing the application. If the
region table is exhausted, the message ``Region
table overflow'' is printed on the system con-
sole. The default value is 200.
NPROC Specify the total number of processes in the
system. In general, each executing command, ap-
plication, or system daemon is a process. Each
user of the system, or each active layer or win-
dow generally uses between 2 and 8 simultaneous
processes. When no processes are available, the
message ``proc: table is full'' is printed at
the system console. By default, NPROC is 50.
NCLIST Specify the number of system command lists
(CLIST). A CLIST is a memory area used by
driver software for terminals, built-in modems,
or serial printer connections. Five to 10
CLISTs are required by each active terminal.
When no CLISTs are available, incoming charac-
ters are lost. Each CLIST requires 64 bytes of
data, and a 12-byte header. The console and
some optional serial cards use the streams in-
terface and do not require CLISTs. The default
number of CLISTs is 200.
MAXUP Determines the maximum number of concurrent
processes for each user ID. The superuser is
exempt from this restriction. This limit is
based on user ID, not on the login terminal. If
ten people are logged in using a single user ID,
the limit could be reached quickly. Normally
NPROC is at least 10 percent larger than MAXUP.
The default value of MAXUP is currently 25.
VHNDFRAC The virtual memory system depends on the activi-
ty of the paging daemon vhand to free memory by
paging unused memory to the swap-disk device.
The algorithm writes out to disk pages that have
not been used for some time. If the system is
not active, there is plenty of free memory and
4 April, 1990
kconfig(1M) kconfig(1M)
no work for vhand. VHNDFRAC and other tuning
parameters allow the adventurous system adminis-
trator to fine-tune the performance.
The vhand fraction is used to determine the ini-
tial value of the system variable VHANDL. If
free memory falls below VHANDL, the paging dae-
mon, vhand, is awakened to begin aging and moni-
toring the resident set of virtual memory pages.
At system startup time, VHANDL is set to
vhandl=MAX(maxmem/VHANDFRAC,GETPGSHI)
where maxmem is the available free memory at
startup time and GETPGSHI is the free-memory
high-water mark, described later. Normally
VHANDFRAC is set to 16.
MAXPMEM Specify the maximum physical memory to use. If
this is set at 0, the system uses all available
physical memory. It is recommended this value
be 0, unless you are testing alternate memory
configurations.
NMBUFS Allocate a number of buffers for networking.
Each buffer requires 256 bytes, of which 240 are
available for data. As few as 100 mbufs may be
used for basic networking. When NFS is used on
a system, the number should be increased. As a
guide, each NFS daemon may transfer 8 KB of
data. Allocating (8192*n_daemons)/240 provides
a starting point in the calculation. The com-
mand netstat -m may be used to determine the
number of mbufs in use. If the message
``m_expand returning 0'' is seen frequently or
if the system halts after displaying the message
``panic: out of mbufs'', the number of mbufs
should be increased. By default, 500 mbufs are
allocated.
NPTY Determines the total number of possible pseudo
tty devices (that is, /dev/pty*). This default
number, which is also the maximum potential
number of devices, is 16. Special files must
still be created in the /dev directory for ptys
to be used. If more than the allocated number
of ptys are created, the error code ``No such
device or address'' is returned by the open(2)
of any of the unallocated device files.
MAXCORE Set the space available for use by the memory
allocation of the kernel from its internal heap.
April, 1990 5
kconfig(1M) kconfig(1M)
Most data structures used to access remote files
via NFS are allocated from this pool, as is
space used by generic disk devices and the
system's name-lookup code. If the message
``panic: kmem_alloc'' appears and the system
halts, the value of MAXCORE should be increased.
The default value is 128 KB.
MAXHEADER Limit the number of allocations possible from
the kernel's internal heap. If the message
``panic: getfreehdr'' is seen, this allocation
should be increased. The default value MAX-
HEADER is 2048.
NSTREAM Determine the maximum number of stream heads
possible in the system. The console,
AppleTalk(Reg.), and the shell layering by the
console are examples of streams. The number of
streams required might range from 8 to 48. The
default number of stream allocated is 32.
NQUEUE Define the maximum number of stream queues.
Each stream head, driver, and module pushed onto
a stream creates two queues. Typically this
parameter is set to 8 times the number of stream
heads. The default number of queues is 256.
The allocation of stream blocks determines the availability
of buffer space used by stream devices. The optimal alloca-
tion depends on the types of devices present in the system.
It is expected that the installation scripts for devices us-
ing the streams mechanism will include the necessary com-
mands to increase the number of blocks allocated. If too
few blocks of the size required by a driver are present, the
system may lose input characters.
NBLK4096 Allocate a number of 4 KB stream blocks. The de-
fault is 0.
NBLK2048 Allocate a number of 2 KB stream blocks. The de-
fault is 20.
NBLK1024 Allocate a number of 1 KB stream blocks. The de-
fault is 12.
NBLK512 Allocate a number of 512-byte stream blocks. The
default is 8.
NBLK256 Allocate a number of 256-byte stream blocks. The
default is 16.
NBLK128 Allocate a number of 128-byte stream blocks. The
6 April, 1990
kconfig(1M) kconfig(1M)
default is 64.
NBLK64 Allocate a number of 64-byte stream blocks. The
default is 256.
NBLK16 Allocate a number of 16-byte stream blocks. The
default is 128.
NBLK4 Allocate a number of 4-byte stream blocks. The
default is 512. Keyboard and tty input uses this
resource.
SLICE Specify the maximum time slice available to a pro-
cess before it is considered for rescheduling. At
the end of the time slice, the active process is
suspended, and the system searches for a process
with a higher CPU priority. If no higher-priority
process exists, the previous process is given
another slice. The default time slice is 60. The
units are ``ticks,'' and there are 60 ticks in a
second.
GETPGSLOW Specifies the get-pages low limit which is the
free-memory low-water mark for the vhand daemon.
When this number is reached, vhand becomes active
and starts stealing pages from active processes.
The default value is 20. Increase the value to
make the daemon more active. The value must be
greater than 0 and less than GETPGSHI.
GETPGSHI Specify the get-pages high limit which is the
free-memory high-water mark for the vhand daemon.
When this number is exceeded, the system stops
stealing pages from active processes. The default
value is set to 30. GETPGSHI should be greater
than GETPGSLOW and less than about one-fourth of
the total available memory.
GETPGSMSK Specify, when used by vhand which pages to steal.
The default value of GETPGSMSK (the get-pages
mask) is 0x408. It may be modified, but most
changes are more educational than useful. Values
in this parameter correspond to bits in the page-
table entries. Each masked bit in the page-table
entry must be 0 in order for the page to be taken
by vhand. The current setting is
PG_NDREF | PG_REF
(defined in /usr/include/sys/page.h). By includ-
ing the modified bit (PG_M), vhand would not steal
any pages with the modified bit on.
April, 1990 7
kconfig(1M) kconfig(1M)
VHANDR Specify in seconds the maximum rate at which vhand
may run if free memory is less than VHANDL, as ex-
plained earlier for VHNDFRAC. The default value
is 5. Increase the value to make the daemon less
active. The value should be between 1 and 10.
MAXSC Specify the maximum number of pages that may be
written to the swap device in a single operation.
The default value is 64. Increasing this number
increases the I/O overhead spent in swapping, but
decreasing the value may reduce the amount of free
memory available when a page fault occurs.
MAXFC Specify the maximum number of pages that may be
placed on the free list at one time. The default
value is 100. Increasing the number may allow for
faster handling of page faults when a process
needs more memory, but it may also reduce the
working set of applications so that page faults
occur more frequently.
MAXUMEM Determine the maximum user virtual address space
in pages. This number may range from about 30 to
0x20000. The default value is 0x40000, which el-
iminates all checking. Small values of MAXUMEM
may make software that is normally taken for
granted unusable.
FLCKREC Specify the number of flock(2) lock structures.
When this size is exceeded, the error ENOSPC is
returned to the requesting program. The default
value is 200.
FLCKFIL Specify the number of flock inode structures.
When this size is exceeded, the error EMFILE is
returned to the requesting program. The default
value is 50.
CDLIMIT Set the process ulimit on file size. Only this
number of 512-byte blocks may be written to any
file by any process owned by any user. The de-
fault value is 16 million blocks (0x1000000).
CMASK Determine the system wide default file-creation
mask. Generally, the value of CMASK is overridden
by the umask directive of one's chosen shell. The
default value is 0.
ROOTDEV Determine the disk device containing the root file
system. This must be a device number as used
internally by the kernel. The device major number
is in the upper byte, and the minor number is in
8 April, 1990
kconfig(1M) kconfig(1M)
the lower byte. If the value is 0xffff, then the
value passed from the A/UX StartupShell (see
StartupShell(8)) booter is used.
SWAPDEV Specify the swap disk device. The specification
is the same format as ROOTDEV. If set to 0xffff,
the value passed from the A/UX StartupShell booter
is used.
PIPEDEV Determine the disk device for temporary pipe-file
space. The specification is the same format as
ROOTDEV. If set to 0xffff, the value passed from
the A/UX StartupShell booter is used.
DUMPDEV Currently unused by the system.
SWAPLO Specify the starting disk address of the swap area
to determine the number of 512-byte blocks to skip
at the beginning of the swap partition. This
would be done if these blocks were to be used for
some other purpose; however, this result may also
be achieved by repartitioning the disk. The de-
fault value is 0.
SWAPCNT Specify the size of the swap area, which is a
number of 512-byte blocks. The system warns you
if it is running short of swap space. If SWAPCNT
is 0, the size of the swap area is set to the size
of the swap partition of the root device. To ad-
just swap space, both kconfig and the dp(1M) (disk
partitioning) utility must be used. The default
value is 0.
MINARMEM Set the minimum number of pages of physical
(``resident'') memory reserved for user text and
data segments in order to avoid deadlock. The de-
fault value is 10, and values might range from 10
to 40.
MINASMEM Define the minimum number of pages of system (swap
+ resident) memory reserved for system purposes
and therefore unavailable for the text and data
segments of user processes. The default value is
10. Normally MINASMEM is greater than MINARMEM.
FILES
/etc/kconfig
/unix
SEE ALSO
dp(1M), reboot(1M), shutdown(1M), swap(1M), flock(2), lock-
ing(2), open(2), pty(7), StartupShell(8).
April, 1990 9
Building A/UX Device Drivers, A/UX Local System Administra-
tion, A/UX Network System Administration, A/UX Network Ap-
plications Programming.
10 April, 1990