Visit Jeremy's Blog.
Go Back > Forums > Linux Forums > Linux - Networking
User Name
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.


  Search this Thread
Old 09-07-2006, 05:04 AM   #1
LQ Newbie
Registered: Dec 2005
Posts: 15

Rep: Reputation: 0
How many thread can be created in user space program?

Does the kernel have define the maximum thread number?

Thanks in advance.
Old 09-08-2006, 07:45 AM   #2
Senior Member
Registered: Dec 2005
Location: Massachusetts, USA
Distribution: Ubuntu 10.04 and CentOS 5.5
Posts: 3,873

Rep: Reputation: 332Reputation: 332Reputation: 332Reputation: 332
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.

Last edited by stress_junkie; 09-08-2006 at 08:11 AM.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
notify user space application from the kernel space lordofring Linux - Software 2 06-22-2009 01:32 PM
Adding more space to image created by dd fyanardi Linux - Software 0 08-31-2005 11:25 AM
Disk space used after initial partition is created Wraezor Linux - General 2 04-21-2005 11:01 AM
Calling User-space program functions from Kernel modules shivanu Programming 1 03-05-2005 03:11 PM
How to create one non-preemptible and another preemptible thread in the user space? vinayparam Linux - Software 0 01-10-2005 10:17 AM

All times are GMT -5. The time now is 05:42 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration