LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
Search this Thread
Old 07-23-2010, 05:02 AM   #1
pradiptart
Member
 
Registered: Sep 2007
Posts: 102

Rep: Reputation: 12
max processes run in linux


I am very new to this.

I want to know what is the maximum no of processes that can be run in Linux ,as it is a multitasking so what is the limit of this.

some one told me that 8192 but why this not 10000 or 500 why 8192.

please help me I don't able to find the answer.. i have searched in google but do not find any ans ..
 
Old 07-23-2010, 05:40 AM   #2
saifkhan123
Member
 
Registered: Apr 2009
Distribution: Red Hat/CentOS
Posts: 108

Rep: Reputation: 19
8192 is not the limit for linux, its the limit for a particular user. You can find the limit by typing
Code:
ulimit -u
The actual limits of a Linux 2.6 kernel are
Quote:
Maximum process or threads for Linux kernel 2.6

* Maximum number of threads: 32000
* Maximum number of threaded processes: 32000
* Maximum number of processes: 32000
 
Old 07-23-2010, 05:54 AM   #3
pradiptart
Member
 
Registered: Sep 2007
Posts: 102

Original Poster
Rep: Reputation: 12
Thank u
can u say why this is 8192 for a perticular user..
 
Old 07-23-2010, 07:10 AM   #4
salasi
Senior Member
 
Registered: Jul 2007
Location: Directly above centre of the earth, UK
Distribution: SuSE, plus some hopping
Posts: 3,910

Rep: Reputation: 776Reputation: 776Reputation: 776Reputation: 776Reputation: 776Reputation: 776Reputation: 776
Quote:
Originally Posted by pradiptart View Post

some one told me that 8192 but why this not 10000 or 500 why 8192...can u say why this is 8192 for a perticular user..
Well, a the time that it was selected 8192 was felt to be a big enough number not to cause problems. Do you have a use case in which this is not true?

It would also have been selected as a convenient number for the computer. Have you thought about what this might mean?
 
Old 07-23-2010, 07:12 AM   #5
MTK358
LQ 5k Club
 
Registered: Sep 2009
Posts: 6,443
Blog Entries: 3

Rep: Reputation: 713Reputation: 713Reputation: 713Reputation: 713Reputation: 713Reputation: 713Reputation: 713
Computers use binary, not decimal.

Numbers like 2, 64, 256, or 8192 are even for a computer because hey are powers of 2.

Numbers like 500 or 1000 look as uneven to a computer as 8192 looks to you!
 
Old 07-23-2010, 07:51 AM   #6
pradiptart
Member
 
Registered: Sep 2007
Posts: 102

Original Poster
Rep: Reputation: 12
Why 8192 processes not more or less

Sir ,
I want to know is there any reason behind that,
As MTK358 given that computers use power of 2, I accept that
but there are other nos also as 512,1024,2048.. and so on

my question is why 8192 not more than or less than this.
 
Old 07-23-2010, 08:11 AM   #7
GrapefruiTgirl
Guru
 
Registered: Dec 2006
Location: underground
Distribution: Slackware64
Posts: 7,594

Rep: Reputation: 550Reputation: 550Reputation: 550Reputation: 550Reputation: 550Reputation: 550
I cannot precisely answer post #6, but wanted to provide a little more on the subject in general:

It should be noted that `ulimit` is actually a Bash built-in command (see the Bash manpage for details on ulimit) and, for the record, on my 64bit Slackware system, max user processes is not 8192, but 31700.

Here's all ulimit output:

Code:
sasha@reactor: ulimit -a
core file size          (blocks, -c) unlimited
data seg size           (kbytes, -d) unlimited
scheduling priority             (-e) 0
file size               (blocks, -f) unlimited
pending signals                 (-i) 31700
max locked memory       (kbytes, -l) 64
max memory size         (kbytes, -m) unlimited
open files                      (-n) 1024
pipe size            (512 bytes, -p) 8
POSIX message queues     (bytes, -q) 819200
real-time priority              (-r) 0
stack size              (kbytes, -s) 8192
cpu time               (seconds, -t) unlimited
max user processes              (-u) 31700
virtual memory          (kbytes, -v) unlimited
file locks                      (-x) unlimited
sasha@reactor:
I dunno if I have something somewhere that altered the default, or if maybe 8192 is no longer a common limit for max user processes, but maybe the OP should examine `ulimit` on his/her own machine, and see what it says?
 
Old 07-23-2010, 09:17 AM   #8
david1941
Member
 
Registered: May 2005
Location: St. Louis, MO
Distribution: CentOS6
Posts: 267

Rep: Reputation: 57
All processes run under a parent (the first one is usually "init", run by root at boot-up). The parent can set limits on what the child can do or use. There is a difference in what an ordinary user or root can do, however, and some certain limits can only be altered by the root user. I think of it like human parent might set a bedtime limit for a child (human children don't HAVE to follow parent set limits, but process children MUST). The limits are initially set to values deemed appropriate for the system (bedtime at 9:00 PM) and a child can set additional limits below that but not higher (say 8:00 PM), and can set them "soft" or "hard". Soft limits can be reset by the child's children but limited to the hard limits.

This allows a process to control what access to system resources a child process has. For a list of what can be set see man limit. My Fedora 11 system shows max user processes at 36,864 (which cannot be increased by a non-root user), but could easily be changed by a root user:
Code:
 [root@maplepark ~]# ulimit -a
core file size          (blocks, -c) 0
data seg size           (kbytes, -d) unlimited
scheduling priority             (-e) 0
file size               (blocks, -f) unlimited
pending signals                 (-i) 36864
max locked memory       (kbytes, -l) 64
max memory size         (kbytes, -m) unlimited
open files                      (-n) 32384
pipe size            (512 bytes, -p) 8
POSIX message queues     (bytes, -q) 819200
real-time priority              (-r) 0
stack size              (kbytes, -s) 10240
cpu time               (seconds, -t) unlimited
max user processes              (-u) 1024
virtual memory          (kbytes, -v) unlimited
file locks                      (-x) unlimited
[root@maplepark ~]# ulimit -u 147456
[root@maplepark ~]# ulimit -a
core file size          (blocks, -c) 0
data seg size           (kbytes, -d) unlimited
scheduling priority             (-e) 0
file size               (blocks, -f) unlimited
pending signals                 (-i) 36864
max locked memory       (kbytes, -l) 64
max memory size         (kbytes, -m) unlimited
open files                      (-n) 32384
pipe size            (512 bytes, -p) 8
POSIX message queues     (bytes, -q) 819200
real-time priority              (-r) 0
stack size              (kbytes, -s) 10240
cpu time               (seconds, -t) unlimited
max user processes              (-u) 147456
virtual memory          (kbytes, -v) unlimited
file locks                      (-x) unlimited
[root@maplepark ~]#
The fact that I set max user processes to 147456 above does NOT mean my system will actually function that way, as setting a child's bedtime of 9:00 does not mean sleep will occur at 9:00. It only means I have set a limit that child processes must honor. "Honor thy parent" is actually enforced by computer processes.
 
1 members found this post helpful.
  


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 On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
ulimit: max user processes: cannot modify limit: Operation not permitted farnaw4u Linux - Newbie 3 04-21-2008 06:32 AM
I need to set a max number of processes for users zahadumy Linux - Software 1 11-15-2005 12:52 AM
How to get it known all processes run under Linux (kernel 2.4.20-8) ukrainet Linux - Newbie 2 12-01-2004 06:13 AM


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

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration