How can we decide what value to give to  max user processes in Linux?

Posted on 2009-02-24
Last Modified: 2012-05-06
How can we decide what value to give to  max user processes in Linux.

For example , in our Linux server we have currently  5000 max user processes defined.
And we faced problem because the value was not sufficient.  I dont know on what
Basis we should arrive at any particular figure,  is it based on the number of
Users in the company ? or any other criteria.

(Our Linux version is Red hat Linux 4 update 5 and kernel version is 2.6.9-78.0.13.ELsmp)
We use Oracle E-Business Suite R12 and we have 200 users working on it everyday.
Question by:AymanDasa
    LVL 7

    Expert Comment

    by:Christopher Martinez
    Well for the 2.6 kernal and on a fairly strong machine i always put it to unlimited. (. Edit the .bashrc file vi /root/.bashrc and add the following line: ulimit -u unlimited)
    That is a option however depending on users connected and what they are doing you can reduce that value.
    LVL 16

    Accepted Solution

    you d' better make a script and add it to init, instead of .bashrc (that will work out only on root's login)

    beside that, max processes number of a machine can be decided by a proportion: on average how many processes there are on this machine? how much is the average load? and the maximum daily load? with this data at hand do

    (avg load+10%):(current max processes)=(100%):(theoretical max processes)

    this is just an extimation, but it can be a good starting point

    Author Comment


    Thats Ok. But I want to know for a 200 user server , what is the number of max processes would be ideal .
    LVL 16

    Expert Comment

    As already said, it depends on the average load of your machine... if 1 user fills alone 100% of cpu, 1 is enough :) If 2 million users use 0% cpu because all of them sleep while at work, you can set it to unlimited. My advice is to make the proportion as shown before
    LVL 29

    Expert Comment

    is there any reason to limut process in the kernel ??

    accroding to kernel doc , linux kernel can handle:
    * Maximum number of threads: 32000
        * Maximum number of threaded processes: 32000
        * Maximum number of processes: 32000

    ref :

    so according to you, you need more then 5000 , so if so just add those to maximum

    i am not good in scripting, but there should be a some script to check how much process is running on busy time in your office,
    get that number and use set that process number by ulimit command as said before

    like bellow line will show you how many process is runing in the pc, but there could be other options you can add with this command

    ps ax | wc -l | tr -d " "

    LVL 7

    Expert Comment

    by:Christopher Martinez
    honestly it depends on what these users do. For example for a college lab i setup using 2.6 i set the max to 40. Honestly they dont need much more then that and i set the warning to 30. However in your situation it may be different. Are these developers? Multi-taskers? Are there alot of programs that need to be kept running in resident memory? If thats the case increase it....but i think 50 is a safe place to start. And if there are problems up it a bit. You dont want to make it too high for security reasons and for stability sake. Keep in mind though that if you keep the value low you can always specify the cap for certain users to be higher/lower then the default. I hope this helps, other then that i would use the formula provided by Ai Ja Nai as a good starting ground.
    LVL 29

    Expert Comment


    just curious,from which document you got this theory
    (avg load+10%):(current max processes)=(100%):(theoretical max processes)


    can i have that one for future references ??

    any book or any website

    Featured Post

    Looking for New Ways to Advertise?

    Engage with tech pros in our community with native advertising, as a Vendor Expert, and more.

    Join & Write a Comment

    Over the last ten+ years I have seen Linux configuration tools come and go. In the early days there was the tried-and-true, all-powerful linuxconf that many thought would remain the one and only Linux configuration tool until the end of times. Well,…
    The purpose of this article is to demonstrate how we can use conditional statements using Python.
    Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
    Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.

    729 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    14 Experts available now in Live!

    Get 1:1 Help Now