Link to home
Start Free TrialLog in
Avatar of ravarde
ravarde

asked on

increasing processes

How to increase file process and user process without recompiling the kernel?
Avatar of tgreaser
tgreaser

I dont know if it can be done
but here is the compiling way if you want to try.
Can I ask what you are doing that you need to increase the number of processes?


The number of processes Linux can run is defined by the value
of NR_TASKS in /usr/src/linux/include/linux/tasks.h. The default
number of processes is typically 512 and the maximum number
(without major kernel modifications) is 4090.
                                               
1. Install the kernel-source package
2. Change the value of NR_TASKS in
   /usr/src/linux/include/linux/tasks.h
3. Recompile the kernel
do you mean the shell's limit respectively limits command?
no I thought your system was being overloaded by
proccesses..

what are you trying to do??
tgreaser , my question was for the questioner ;-)
Avatar of ravarde

ASKER

We have to recompile the kernel to change:
1. Max no of open files / process from 1024 to 2048
2.  Max no of user process from 1024 to 2048

Is it possible without recompiling.

By increassing the value in file-max, I was told it can be dynamically increased without recompiling. is that true?

. depends on the OS, which UNIX?
Avatar of ravarde

ASKER

RH6.0
recompile.
ASKER CERTIFIED SOLUTION
Avatar of bernardh
bernardh

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
you can dynamiclly chage the file process but not the  user process...
tgreaser is right. To quote /usr/src/linuc/Documentation/proc.txt:

---snip---

file-nr and file-max
   The kernel allocates file handles dynamically, but as yet
   doesn't free them again.
   The value in file-max denotes the maximum number of file handles
   that the Linux kernel will allocate. When you get a lot of error
   messages about running out of file handles, you might want to raise
   this limit. The default value is 4096. To change it, just write the
   new number into the file:
   # cat /proc/sys/fs/file-max   4096
   # echo 8192 > /proc/sys/fs/file-max
   # cat /proc/sys/fs/file-max   8192

   This method of revision is useful for all customizable parameters
   of the kernel - simply echo the new value to the corresponding   file.  
   The three values in file-nr denote the number of allocated file
   handles, the number of used file handles, and the maximum number of
   file handles. When the allocated file handles come close to the
   maximum, but the number of actually used ones is far behind, you've
   encountered a peak in your usage of file handles and you don't need
   to increase the maximum.
   However, there is still a per process limit of open files, which
   unfortunatly can't be changed that easily. It is set to 1024 by
   default. To change this you have to edit the files limits.h and
   fs.h in the directory /usr/src/linux/include/linux. Change the
   definition of NR_OPEN and recompile the kernel.

---snip---

That's why you should always install the kernel source, if you have the disk space. The docs there are invaluable.