Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Operating System maximum number of files

Status
Not open for further replies.

copperslim

Technical User
Dec 13, 2002
101
GB
System reaching the Operating System maximum number of files. How do I please check whether or not I have reach this limit on the server?

As far as I am aware it should be a parameter similar to MAXFILES, NFILE or NOFILES.
 

Run the command 'ulimit'. Max for AIX is 32767 I think.

Cheers Henrik Morsing
Certified AIX 4.3 Systems Administration
& p690 Technical Support
 
You can set ulimit to unlimited on either a per user basis or system wide. But I'm wondering if that is really the problem here.
 

What does 'df' say??

Cheers Henrik Morsing
Certified AIX 4.3 Systems Administration
& p690 Technical Support
 

Thanks, but what was??

Cheers Henrik Morsing
Certified AIX 4.3 Systems Administration
& p690 Technical Support
 
This is the log from
[ol]
ulimit -a
time(seconds) unlimited
file(blocks) 2113674
data(kbytes) 131072
stack(kbytes) 32768
memory(kbytes) 32768
coredump(blocks) 2048
nofiles(descriptors) 2000

/etc/security/limits
default:
fsize = 2113674
core = 2048
cpu = -1
data = 262144
rss = 65536
stack = 65536
cad:

lsc:

oracle73:
fsize = 2116374[/ol]

Am I right in thinking oracle73 which is a directory on the system has taken most/all of the file space

 

No, you need to use df to see how much space any how many inodes are left.

The oracle stanza in the above just tells you that you've change a default value for oracle. In this case you've told AIX that the oracle user can create files just just over two giga bytes in size.

Cheers Henrik Morsing
Certified AIX 4.3 Systems Administration
& p690 Technical Support
 
df -k|more
Filesystem 1024-blocks Free %Used Iused %Iused Mounted on
/dev/hd4 49152 12720 75% 2307 10% /
/dev/hd2 909312 229612 75% 22289 10% /usr
/dev/hd9var 212992 170792 20% 478 1% /var
/dev/hd3 106496 100728 6% 148 1% /tmp
/dev/hd1 729088 221256 70% 11301 7% /home
/dev/lv04 548864 119696 79% 8393 7% /arc
/dev/lv10 8192 7180 13% 38 2% /oractemp
/dev/lv11 1277952 1017660 21% 672 1% /arcinfo_backup
/dev/lv12 81920 17964 79% 103 1% /demos
/dev/lv20 1335296 135372 90% 621 1% /images
/dev/lv23 65536 13480 80% 2716 17% /address_point
/dev/lv21 1531904 84204 95% 240926 63% /land-line
/dev/lv18 106496 31176 71% 6814 26% /oscar
/dev/lv22 507904 491916 4% 16 1% /os-images
/dev/ll-ntf-data 614400 243976 61% 2692 2% /ll-ntf-data
/dev/lv05 1605632 68828 96% 55 1% /orac7data1
/dev/lv01 655360 241592 64% 2133 2% /oracle72
/dev/lv19 192512 22624 89% 3669 8% /applications
/dev/lv31 614400 162760 74% 2166 2% /oracle71
/dev/orac7data5 733184 41616 95% 29 1% /orac7data5
/dev/lv08 1884160 157080 92% 63 1% /orac7data4
/dev/lv25 360448 13836 97% 2037 3% /arc7
/dev/fslv02 229376 52984 77% 5382 10% /arcdoc
/dev/flare 1851392 379804 80% 8758 2% /flare
/dev/ora815 458752 111056 76% 1307 2% /usr/oracle8.1.5
/dev/orainv 49152 45096 9% 232 2% /usr/oraInventory
/dev/lv03 1441792 205784 86% 66 1% /orac7data2
/dev/lv06 409600 69076 84% 4673 5% /arc72
/dev/lv09 262144 40404 85% 1938 3% /arc712
/dev/fslv03 1785856 343396 81% 559 1% /mapcomp
/dev/fslv01 1064960 63416 95% 7475 3% /prosys
/dev/lv17 237568 42464 83% 1351 3% /mmgr
/dev/fslv00 311296 59176 81% 2706 4% /shapefiles
/dev/lv32 507904 206736 60% 130 1% /coverages
/dev/fslv04 507904 265128 48% 146 1% /plotfiles
/dev/lv00 409600 99304 76% 55 1% /images/50kc
/dev/lv02 1859584 94620 95% 60 1% /orac7data3
/dev/fslv06 2531328 1516172 41% 50 1% /exports
/dev/fslv07 401408 30520 93% 4118 5% /desktop-data
/dev/cp_oracle734 401408 80788 80% 2529 3% /oracle734
/dev/fslv05 1736704 537188 70% 2453 1% /backup
/dev/ZEHras 212992 178268 17% 74 1% /ZEHrasterplus
 
I believe the limit you hit is the OPEN_MAX value defined in the limits.h file which is 32767 and is commented as "Maximum number of files that one process can have open at any given time."
 
Although I should mention there is a MAX Number of Open FIles which has an upper limit of 200000.
 
The OPEN_MAX value defined in the limits.h file is hash. Should I take away the hash

[ol]#define OPEN_MAX 32767 /* max num of files per process */[/ol]

Please explain.
 

No. You're not a C programmer are you ;-)

Leave the #define statement as is but change the number.

Cheers Henrik Morsing
Certified AIX 4.3 Systems Administration
& p690 Technical Support
 
No, I am not a programmer. Should I increase number?
 

Try but I don't know how much. Don't know if there are any drawbacks either.

Cheers Henrik Morsing
Certified AIX 4.3 Systems Administration
& p690 Technical Support
 
I have seen a maximum of 45,500 files in a single directory in 4.3.3

Running ls -al|wc -l took almost 10 minutes to return the prompt!

Anything over a few thousand begins affecting performance and once you get around 10,000 good luck.....
 
About the number of files in 1 directory:
under jfs indeed limit the number of files to maximum 2500 otherwise you'll have performance problems.
However under JFS2 (available under AIX 5.2) we have succesfully created 1 milion files with linear access times when doing un ls. (Took 20 seconds to do a ls | wc -l. We did need to set an environment variable to ls that many files)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top