LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 09-07-2006, 04:04 AM   #1
Honor
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, 06:45 AM   #2
stress_junkie
Senior Member
 
Registered: Dec 2005
Location: Massachusetts, USA
Distribution: Ubuntu 10.04 and CentOS 5.5
Posts: 3,873

Rep: Reputation: 335Reputation: 335Reputation: 335Reputation: 335
Kernel system wide maximum.
Code:
$ cat /proc/sys/kernel/threads-max
16383
Variable limit set per user during login.
Code:
$ 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 07:11 AM.
 
  


Reply


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 12:32 PM
Adding more space to image created by dd fyanardi Linux - Software 0 08-31-2005 10:25 AM
Disk space used after initial partition is created Wraezor Linux - General 2 04-21-2005 10:01 AM
Calling User-space program functions from Kernel modules shivanu Programming 1 03-05-2005 02:11 PM
How to create one non-preemptible and another preemptible thread in the user space? vinayparam Linux - Software 0 01-10-2005 09:17 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 07:59 AM.

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