Messages in this thread | | | Date | Mon, 22 Jun 1998 10:00:37 +0200 (CEST) | From | Rik van Riel <> | Subject | re: Limits in the kernel |
| |
On Sun, 21 Jun 1998, J'aime Fournier wrote:
> Well you could lower the MAX_TASKS_PER_USER in > /usr/src/linux/include/tasks.h > To somethine more reasonable like 50 or so. > The default is 256. > > I have a patch I made to setup a /proc/secure/maxtasks > Using sysctl to change the MAX_TASKS_PER_USER on the fly.
Note that you may want to run more processes for priviledged users like root, mail, news, http...
To do that, you would probably need 3 tunable values: - 'high' limit - 'normal' limit - UID under which the low level applies, and above it the high
So: '256 50 100' would mean: a limit of 256 processes for UID <= 100 and a limit of 50 processes for UIDs > 100. This, of course, assumes that you allocate real UIDs above 100 processes...
Another possibility is to use a program like lshell (which can be found on sunsite.unc.edu:/pub/linux/system/[shells or admin or ???])...
With that little program you can tune resource usage _per_ user. You can tune: - maximum number of processes - maximum memory footprint - maximum number of open fds - maximum CPU usage
This will give you a more flexible solution that keeps everything out of the kernel. This way you can have user mail unlimited, httpd 96 processes, news 128, normal users 50 processes and your local annoying user from hell 8 processes and 5MB max ram usage :-)
Rik. +-------------------------------------------------------------------+ | Linux memory management tour guide. H.H.vanRiel@phys.uu.nl | | Scouting Vries cubscout leader. http://www.phys.uu.nl/~riel/ | +-------------------------------------------------------------------+
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu
| |