kcusage.1m (2012 03)
k
kcusage(1M) kcusage(1M)
The kcusage data for filecache_max and filecache_min can be somewhat confusing because it is a
percent, and kcusage reports usage as a percent of the limit. The percent of a percent is kind of confus-
ing. If filecache_max is set to 50% and 40% of the system memory is used as the file cache, then the file
cache will be reported as 80% of its limit.
Since the usage data for filecache_max is simply the size of the file cache, this data can also be useful
when setting filecache_min.
maxdsiz/maxdsiz_64bit
maxdsiz sets a limit on the memory used by each process’s data segment. This is the memory allocated
with calls to sbrk(2), malloc(3C) and new.
When a processes memory use reaches maxdsiz, calls to acquire more memory will fail. When this hap-
pens, many programs dereference a null pointer and core dump with a segmentation violation.
The cause can be one of two problems. The value for maxdsiz could be set too low, or the program could
have a defect commonly called a "memory leak". Programs with a memory leak tend to slowly grow in
size.
kcusage not only shows the size of the largest data segment, but it also lists the IDs and executable
names of the five process with the largest data segments on the system. Look for trends in the size of indi-
vidual processes and decide if there is a memory leak or not. If there is no memory leak, raise maxdsiz.
If there is a memory leak, this should be considered a defect in the application, but can be worked around
by restarting the application during off peak use times. kcalarm can be used to signal when it is time to
restart such applications.
maxfiles_lim
The usage data shown for maxfiles_lim is the maximum number of files opened by a process, across all
processes. The "-t" option will show details for the top 5 processes.
Trends in the maxfiles_lim data can reveal defects in programs where files are opened and never closed.
This data is also useful when setting the tunable maxfiles_lim.
maxssiz/maxssiz_64bit
The usage data shown for maxssiz is the size of the largest stack segment owned by any process on the
system.
When this limit is reached the program that hits the limit is generally allocating stack space for the call
stack. Hitting this limit is usually fixed by increasing maxssiz although recursive functions with errors
in their terminating logic can also be the cause.
Stack memory does not generally "leak" like data memory.
maxtsiz/maxtsiz_64bit
maxtsiz controls the size of the text segment of the processes on the system. The text size of a process
does not vary as it runs. This size is based on the size of the executable.
The usage data shown here is the size of the largest text segment on the system. Not all of the data in an
executable is loaded into memory when it is executed. This means the usage will not be the same as the
size shown by "ls -l executable_path".
If some processes are close to the limit set by maxtsiz, it may be a good idea to increase maxtsiz when
upgrading to a new version of the software.
maxuprc
The usage value for maxuprc is the maximum number of processes owned by a single user on the sys-
tem. This limit prevents any individual user from shutting out other users by allocating all processes up
to the limit set by nproc.
maxuprc should be set high enough to allow each user to get their job done, but lower than the typical
number of unused processes on the system. It may be necessary to raise maxuprc to meet both of these
constraints.
Privileged users are exempt from the limit set by maxuprc. Processes with a user id of 0 are not counted
in usage of this tunable.
kcusage shows the top five users of processes on the system. In this case the "id" is the user id and the
"name" is the user name.
4 Hewlett-Packard Company − 4 − HP-UX 11i Version 3: March 2012