Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > macOS > Maximum open files per process?

Maximum open files per process?
Thread Tools
Laurence
Mac Enthusiast
Join Date: Mar 1999
Location: Portland, Oregon, United States
Status: Offline
Reply With Quote
Aug 22, 2003, 07:34 PM
 
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
     
Burana
Fresh-Faced Recruit
Join Date: Aug 2003
Location: Basle, Switzerland
Status: Offline
Reply With Quote
Aug 23, 2003, 11:05 AM
 
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
     
WJMoore
Grizzled Veteran
Join Date: Jan 2002
Location: Melbourne, Australia
Status: Offline
Reply With Quote
Aug 23, 2003, 11:41 AM
 
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()); }
     
Laurence  (op)
Mac Enthusiast
Join Date: Mar 1999
Location: Portland, Oregon, United States
Status: Offline
Reply With Quote
Aug 25, 2003, 01:38 PM
 
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 Links
Forum 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
Top
Privacy Policy
All times are GMT -4. The time now is 02:10 AM.
All contents of these forums © 1995-2017 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.8 © 2000-2017, Jelsoft Enterprises Ltd.,