SUMMARY
This is an overview of the "ulimit" command present on Linux environments that provides mechanisms to limit and control the usage of system resources. These include file descriptors, threads, files, core dumps, and network connections. These limits can be set on a per-process and/or per-user basis. Careful consideration is recommended when modifying these values on any level. Examples of this command in use and it's output are provided for Linux. Potential impact of changes made via 'ulimit' on the Strategy application are also listed.
NOTE: Strategy Technical Support provides the following information as a courtesy to users. Note however, that Strategy Technical Support does not make recommendations related to tuning or performance of individual Strategy Intelligence Server and operating system configurations.
ULIMIT OVERVIEW
The 'ulimit' command is a built-in shell function, which displays and sets user level restrictions to system resources in UNIX/Linux environments. If incorrectly set, these limits can cause unexpected or undesired behaviors in Strategy Intelligence Server. Limits that are too low can also negatively affect performance. These UserLimits prevent single users from using bottlenecking system resources, which may affect system or Strategy stability. When available, refer to the appropriate Operating System MAN (manual) page for more detailed information on the usage and syntax of the 'ulimit' command. As these values and tags may change per operating system, confirm which are appropriate for your installation. The modification of this operating system settings should be done by a qualified system administrator as it is functionality outside of the Strategy application.
There are two ulimit levels: A soft and hard limit. The soft limit is the value that the kernel enforces for the corresponding resource. The hard limit acts as a ceiling for the soft limit. As such, the information displayed by the 'ulimit' command may be overridden by system/security level restrictions. Users should consult the system administrator(s) for more information on verifying system level resource restrictions.
NOTE: You must have root user authority to change resource hard limits.
CHANGING ULIMIT VALUES
Use the following format to make changes to the ulimit:
Syntax: ulimit Options -S Change and report the soft limit associated with a resource. -H Change and report the hard limit associated with a resource. -a All current limits are reported -c The maximum size of core files created. -d The maximum size of a process's data segment. -f The maximum size of files created by the shell(default option) -l The maximum size that may be locked into memory. -m The maximum resident set size. -n The maximum number of open file descriptors. -p The pipe buffer size. -s The maximum stack size. -t The maximum amount of cpu time in seconds. -u The maximum number of processes available to a single user. -v The maximum amount of virtual memory available to the process.
ulimit -<option> <value>
ulimit -c unlimited
$ ulimit -a time(cpu-seconds) unlimited file(blocks) unlimited coredump(blocks) unlimited data(kbytes) unlimited stack(kbytes) 10240 lockedmem(kbytes) 32 memory(kbytes) unlimited nofiles(descriptors) 1024 processes 8191
8575 | 8575 | 8575 |
time | The maximum number of seconds of CPU time per process. | If a limit must be set, Strategy suggests setting this limit to 'unlimited' to allow continuous uptime of the Intelligence Server process |
file | The maximum size of files, which can be created by the shell, in 512-byte blocks. | Strategy suggests setting this limit to 'unlimited' to allow large files to be generated for core files and large caches. |
coredump | The maximum size of core files created when a process crashes, in 512-byte blocks. | Strategy suggests setting this limit to 'unlimited' to allow core files to be created for use in troubleshooting. KB13610:"System settings to check to ensure that core files for the Strategy Intelligence Server Universal process are correctly created by the Unix/Linux operating system platform" |
data | The maximum size of a process data segment per process, in kilobytes. | If a limit must be set, Strategy suggests setting this limit to 'unlimited' to allow full usage of system memory. The Strategy Intelligence Server includes its own internal memory governing functionality to limit the server process memory usage. KB7295: What is the Memory Contract Manager in Strategy Intelligence Server 10.x and later? |
stack | The maximum stack size per process, in kilobytes. | If a limit must be applied, Strategy suggests setting this limit to the default value for the platform. Limiting the stack size stops runaway recursive function calls; however, it is possible for the Strategy Intelligence Server to legitimately require a large amount of space on the stack. |
lockedmem | The maximum size that may be locked into memory per process, in kilobytes. | If this setting must be set, Strategy suggests setting it to the highest possible value. |
memory | The maximum resident set size per process, in kilobytes. | Strategy suggests setting this limit to 'unlimited' to allow full usage of system memory. The Strategy Intelligence Server includes its own internal memory governing functionality to police the server process memory usage. KB7295: What is the Memory Contract Manager in Strategy Intelligence Server 10.x and later? |
nofiles | The maximum number of open file descriptors per process. | Strategy suggests setting this limit to 65535 for Linux systems. The Strategy Intelligence Server uses file descriptors to access logs, cache and inbox files, as well as for socket descriptors (network communications). KB16624: What is the 'Number of network threads' setting in Strategy Intelligence Server 8.x? |
processes | The maximum number of running processes per user. | If this limit must be set, Strategy suggests that this limit be set high enough to allow the Intelligence Server and its child processes created for each database connection. |
vmemory | The maximum size of virtual memory per process. | Strategy suggests setting this limit to 'unlimited' to allow full usage of system memory. The Strategy Intelligence Server includes its own internal memory governing functionality to police the server process memory usage. KB7295: What is the Memory Contract Manager in Strategy Intelligence Server 8.x and later? |
TO LEARN MORE
KB13610: System settings to check to ensure that core files for the Strategy Intelligence Server Universal process are correctly created by the Unix/Linux operating system platform
KB7295: What is the Memory Contract Manager in MicroStrategy Intelligence Server 8.x and later?