Operating System - HP-UX
1832764 Members
3166 Online
110045 Solutions
New Discussion

Large amount of files in /tmp

 
Thomas Ferraiolo
New Member

Large amount of files in /tmp

I have a system that the application creates about 10,000 - 15,000 small files in /tmp. The disk activity report (sar -d) is high for the root disk and performance is slow. There must be a unix overhead for keeping track of all these files, (ie:inodes, any open FD's)and I need to explain the application should move these files off the root FS to increase performance. Can anyone give me more information on the effect of large amounts of small files on the root VG?
Thanks
13 REPLIES 13
Philip Chan_1
Respected Contributor

Re: Large amount of files in /tmp

Run "sar -v 2 999" then watch out if there are any overflow situations. Also certain standard HPUX commands don't work when the number of files it read in is too large, I think "tar" and "rm" are the ones but just can't remember (I came across this situation before).

Rgds,
Philip
Philip Chan_1
Respected Contributor

Re: Large amount of files in /tmp

Run "sar -v 2 999" then watch out if there are any overflow situations. Also certain standard HPUX commands don't work when the number of files it read in is too large, I think "tar" and "rm" are the ones but just can't remember (I came across this situation before).

Rgds,
Philip
James R. Ferguson
Acclaimed Contributor

Re: Large amount of files in /tmp

Thomas:

If the application creates its temporary files in a directory under /tmp, then you might want to create a separate file system which is not part of vg00 and mount it.

Some applications also provide an environmental variable which, if set, allows the placement of its temporary files other than in /tmp or /var/tmp.

...JRF...
James R. Ferguson
Acclaimed Contributor

Re: Large amount of files in /tmp

Thomas:

If the application creates its temporary files in a directory under /tmp, then you might want to create a separate file system which is not part of vg00 and mount it.

Some applications also provide an environmental variable which, if set, allows the placement of its temporary files other than in /tmp or /var/tmp.

...JRF...
James R. Ferguson
Acclaimed Contributor

Re: Large amount of files in /tmp

Thomas:

If the application creates its temporary files in a directory under /tmp, then you might want to create a separate file system which is not part of vg00 and mount it.

Some applications also provide an environmental variable which, if set, allows the placement of its temporary files other than in /tmp or /var/tmp.

...JRF...
James R. Ferguson
Acclaimed Contributor

Re: Large amount of files in /tmp

Thomas:

If the application creates its temporary files in a directory under /tmp, then you might want to create a separate file system which is not part of vg00 and mount it.

Some applications also provide an environmental variable which, if set, allows the placement of its temporary files other than in /tmp or /var/tmp.

...JRF...
James R. Ferguson
Acclaimed Contributor

Re: Large amount of files in /tmp

Thomas:

If the application creates its temporary files in a directory under /tmp, then you might want to create a separate file system which is not part of vg00 and mount it.

Some applications also provide an environmental variable which, if set, allows the placement of its temporary files other than in /tmp or /var/tmp.

...JRF...
James R. Ferguson
Acclaimed Contributor

Re: Large amount of files in /tmp

Thomas:

If the application creates its temporary files in a directory under /tmp, then you might want to create a separate file system which is not part of vg00 and mount it.

Some applications also provide an environmental variable which, if set, allows the placement of its temporary files other than in /tmp or /var/tmp.

...JRF...
James R. Ferguson
Acclaimed Contributor

Re: Large amount of files in /tmp

Thomas:

If the application creates its temporary files in a directory under /tmp, then you might want to create a separate file system which is not part of vg00 and mount it.

Some applications also provide an environmental variable which, if set, allows the placement of its temporary files other than in /tmp or /var/tmp.

...JRF...
James R. Ferguson
Acclaimed Contributor

Re: Large amount of files in /tmp

Thomas:

If the application creates its temporary files in a directory under /tmp, then you might want to create a separate file system which is not part of vg00 and mount it.

Some applications also provide an environmental variable which, if set, allows the placement of its temporary files other than in /tmp or /var/tmp.

...JRF...
James R. Ferguson
Acclaimed Contributor

Re: Large amount of files in /tmp

Thomas:

If the application creates its temporary files in a directory under /tmp, then you might want to create a separate file system which is not part of vg00 and mount it.

Some applications also provide an environmental variable which, if set, allows the placement of its temporary files other than in /tmp or /var/tmp.

...JRF...
James R. Ferguson
Acclaimed Contributor

Re: Large amount of files in /tmp

Thomas:

If the application creates its temporary files in a directory under /tmp, then you might want to create a separate file system which is not part of vg00 and mount it.

Some applications also provide an environmental variable which, if set, allows the placement of its temporary files other than in /tmp or /var/tmp.

...JRF...
Vincente Fernandes
Valued Contributor

Re: Large amount of files in /tmp

If the files generated in /tmp are not required after some time, say for e.x after 3-4 days or week, then setup a cron job and remove the files. Otherwise create a seperate file system on a different volume group other then root vg and change your application config file to use that file system as a "tmp" for creating tmp files.