|
|
Maximum open files per process?
|
|
|
|
Mac Enthusiast
Join Date: Mar 1999
Location: Portland, Oregon, United States
Status:
Offline
|
|
Does anyone know how to modify the maximum number of open files per process? Is this something that can be done from the command line every time or is there an environmental variable that could be set permanently? It seems that the default limit is a little over 200, although less than 255.
Thanks,
|
--Laurence
|
|
|
|
|
|
|
|
Fresh-Faced Recruit
Join Date: Aug 2003
Location: Basle, Switzerland
Status:
Offline
|
|
Originally posted by Laurence:
[B]Does anyone know how to modify the maximum number of open files per process? Is this something that can be done from the command line every time or is there an environmental variable that could be set permanently? It seems that the default limit is a little over 200, although less than 255.
Dind't find anything in the man pages.
Anyway, to set soft limits use the command limit or ulimit.
See here
Regards
Burana
|
|
|
|
|
|
|
|
|
Grizzled Veteran
Join Date: Jan 2002
Location: Melbourne, Australia
Status:
Offline
|
|
There is a call, getdtablesize() that returns the size of a prcesses file descriptor table. I made a tiny C program and it says that the table size is 256. However obviously some of these may already be used giving the 200 - 255 result found earlier. Oh here's the code if you're interested:
Code:
#include <stdlib.h>
#include <stdio.h>
#include <unistd.h>
int main(int argc, char **argv) {
printf("Max file descriptors: %d\n", getdtablesize());
}
|
|
|
|
|
|
|
|
|
Mac Enthusiast
Join Date: Mar 1999
Location: Portland, Oregon, United States
Status:
Offline
|
|
Actually I was wondering if there is a way to increase the default value to 512 or 1024 by some command like switch or variable. I know in some linux distros it requires a kernel modification and recompile which I don't really feel like doing. Just wondering if there was an easier way.
|
--Laurence
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Forum Rules
|
|
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
|
HTML code is Off
|
|
|
|
|
|
|
|
|
|
|
|