Link to home
Start Free TrialLog in
Avatar of andrewyu
andrewyu

asked on

File Open

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

Andrew
Avatar of jlevie
jlevie

What OS?
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.

Avatar of andrewyu

ASKER

How can I amend this setting in FreeBSD ?

Andrew
ASKER CERTIFIED SOLUTION
Avatar of nicob
nicob

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
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.
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.
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
His solution is for Solaris and it will work if that is your OS. If it's BSD then it won't work.
So, it is a solutionfor SVR?, right ?

Anyway, where can I get resources regarding this issues ?

Andrew