Kernel system wide maximum.
$ cat /proc/sys/kernel/threads-max
Variable limit set per user during login.
$ ulimit -a
core file size (blocks, -c) 0
data seg size (kbytes, -d) unlimited
file size (blocks, -f) unlimited
pending signals (-i) 8191
max locked memory (kbytes, -l) 32
max memory size (kbytes, -m) unlimited
open files (-n) 1024
pipe size (512 bytes, -p) 8
POSIX message queues (bytes, -q) 819200
stack size (kbytes, -s) 8192
cpu time (seconds, -t) unlimited
max user processes (-u) 8191
virtual memory (kbytes, -v) unlimited
file locks (-x) unlimited
Note that the ulimit values shown are okay for an interactive user on a workstation. Server processes such as ftp should have lower limits in order to avoid being susceptible to a fork attack. A fork attack is when a bad guy "freezes" your server by causing some remotely accessible process such as a server daemon to spawn a gajillion subprocesses. This overwhelms the kernel's ability to manage resources and the system will hang.