Operating System - Tru64 Unix
1745909 Members
4207 Online
108723 Solutions
New Discussion юеВ

To increase the no of file descriptors

 
Bobcat_1
Advisor

To increase the no of file descriptors

Hello,

Tru64 Unix 5.1A. Used "ulimit -a" and have the "nofiles(descriptors) at 4096".

Used "ulimit -n" to increase this limit to 32MB but failed as this limit exceeds the allowable limit.

In what sysconfigtab subsystem that I need to change to satisfy this requirement.

Many thanks for support.
4 REPLIES 4
Joris Denayer
Respected Contributor

Re: To increase the no of file descriptors

Hi,

You find all info in the "System Configuration and Tuning Guide"
More precisely chapter 5.5.2

Here is the pointer to the pdf file.
http://h30097.www3.hp.com/docs/base_doc/DOCUMENTATION/V40F_PDF/AQ0R3GTE.PDF

Hope this helps

Joris
To err is human, but to really faul things up requires a computer
Joris Denayer
Respected Contributor

Re: To increase the no of file descriptors

Oeps,

Previous documentation pointer wad for v4.0f.
Next pointer is for v5.1A. Same Chapter nr.

http://h30097.www3.hp.com/docs/base_doc/DOCUMENTATION/V51A_PDF/ARH9GBTE.PDF

Joris
To err is human, but to really faul things up requires a computer
Phillip Brown
Frequent Advisor

Re: To increase the no of file descriptors

Summary:

proc:
open_max_hard = N

The limit is:

# sysconfig -Q proc open_max_hard
proc:
open_max_hard - type=INT op=CQ min_val=0 max_val=4096

Man the sys_attrs_proc(5) page and read
the section on open_max_hard. It's instructive.

Regards,

Phil


Detail:

The translation for the hard limits are as follows:

clipper# ulimit -aH

time(seconds) unlimited
file(blocks) unlimited
data(kbytes) 4194304 <== max_per_proc_data_size
stack(kbytes) 32768 <== max_per_proc_stack_size
memory(kbytes) 2033432
coredump(blocks) unlimited
nofiles(descriptors) 4096 <== open_max_hard
vmemory(kbytes) 4194304 <== max_per_proc_address_space

Note: if using the cshell's limit -h command, you'll see these as "descriptors".

# sysconfig -q proc | grep -E 'max_per_proc|max_hard'

max_per_proc_stack_size = 33554432
max_per_proc_data_size = 1073741824
max_per_proc_address_space = 4294967296
open_max_hard = 4096

That's a lot of help. These don't even match up! But this is what you'll see on your sytem as well. It's a little confusing at first glance because sysconfig reports its values in bytes, whereas both limit and ulimit display their output in kbytes. We need to take the bytes from sysconfig's output and divide by 1024 to get kbytes. Let's do the math, so you can see the numbers match up:

# echo 4294967296 / 1024 | bc
4194304

# echo 1073741824 / 1024 | bc
1048576

# echo 33554432 / 1024 | bc
32768
Dave Bechtold
Respected Contributor

Re: To increase the no of file descriptors

The maximum you can set proc stanza attribute to is 4096. In order to go higher you have to do it programmaticly per the man page for sys_attrs_proc - open_max_hard.

If the number of file descriptors reaches the value of the
open_max_hard attribute or higher, the process is stopped. The value
for this limit can be increased only in a program. Use the getdta-
blesize() system call to obtain the total number of file descriptors in
a process' descriptor table. You can determine the current
open_max_hard limit by using the getrlimit() system call and increase
the hard limit for a process by using the setsysinfo() function with
the SSI_FD_NEWMAX option.

Dave