File Open

How can I specify how many files can be opened simultaneously ?

Andrew
andrewyuAsked:
Who is Participating?
 
nicobConnect With a Mentor Commented:
Hi,

To set the amount of users/processes in the /etc/system file you have to do the following :

set maxusers=<number>
set max_nprocs=<number>

Where <number> is you have to fill in the amount you want. You have to remember that max_nprocs is calculated in the following way :

10 + 16 * maxusers

To increase the number of file descriptors you have to put the following in the /etc/system file :

set rlim_fd_max=<number>

You require a reboot of the system after you have changed this in the /etc/system file.

Hope this answers your question.

Nico.
0
 
jlevieCommented:
What OS?
0
 
geotigerCommented:
In Solaris, you can set it for a shell as

ulimit -n 64

If you want to set up for all the users, you need to change kernel settings in /etc/system.

0
Cloud Class® Course: Amazon Web Services - Basic

Are you thinking about creating an Amazon Web Services account for your business? Not sure where to start? In this course you’ll get an overview of the history of AWS and take a tour of their user interface.

 
andrewyuAuthor Commented:
How can I amend this setting in FreeBSD ?

Andrew
0
 
jlevieCommented:
As I recall, on FreeBSD the number of open files is determined by the maxusers setting in the kernel config file and is twice the maximum number of processes. The default for the GENERIC kernel has maxusers=32 and since the maximum number of processes is 20+(16*maxusers), that yields a maximum number of open files of 1064. To raise the max open files limit you need to build a new kernel with a larger value for maxusers.
0
 
jlevieCommented:
I've checked my assertion about the maximum number of openfiles in FreeBSD and in fact it is increaed by building a new kernel with a larger maxusers.
0
 
andrewyuAuthor Commented:
Thank you very much !

BUT, if the DEVIL told me the FILE TABLE IS FULL, do you think I can correct this problem by the solution provided by you ?

Andrew
0
 
jlevieCommented:
His solution is for Solaris and it will work if that is your OS. If it's BSD then it won't work.
0
 
andrewyuAuthor Commented:
So, it is a solutionfor SVR?, right ?

Anyway, where can I get resources regarding this issues ?

Andrew
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.