4285ch04.fm Draft Document for Review May 4, 2007 11:35 am
96 Linux Performance and Tuning Guidelines
eth0: RXcsums[1] LinkChgREG[0] MIirq[0] ASF[1] Split[0] WireSpeed[1] TSOcap[1]
eth0: dma_rwctrl[76180000] dma_mask[64-bit]
EXT3 FS on dm-0, internal journal
kjournald starting. Commit interval 5 seconds
EXT3 FS on sda1, internal journal
EXT3-fs: mounted filesystem with ordered data mode.
ulimit
This command is built into the bash shell and is used to provide control over the resources
available to the shell and to the processes started by it on systems that allow such control.
Use the -a option to list all parameters that we can set:
ulimit -a
Example 4-2 Output of ulimit
[root@x232 html]# ulimit -a
core file size (blocks, -c) 0
data seg size (kbytes, -d) unlimited
file size (blocks, -f) unlimited
max locked memory (kbytes, -l) 4
max memory size (kbytes, -m) unlimited
open files (-n) 1024
pipe size (512 bytes, -p) 8
stack size (kbytes, -s) 10240
cpu time (seconds, -t) unlimited
max user processes (-u) 7168
virtual memory (kbytes, -v) unlimited
The -H and -S options specify the hard and soft limits that can be set for the given resource. If
the soft limit is passed, the system administrator will receive a warning. The hard limit is the
maximum value that can be reached before the user gets the error messages Out of file
handles.
For example, you can set a hard limit for the number of file handles and open files (-n):
ulimit -Hn 4096
For the soft limit of number of file handles and open files, use:
ulimit -Sn 1024
To see the hard and soft values, issue the command with a new value:
ulimit -Hn
ulimit -Sn
This command can be used, for example, to limit Oracle® users on the fly. To set it on startup,
enter the following lines, for example, in /etc/security/limits.conf:
soft nofile 4096
hard nofile 10240