SUMMARY: /tmp has thousands of files

From: Damon LaCaille (
Date: Fri Feb 26 1999 - 16:23:38 CST

The original question is below. I've received responses from no effect at
all, to a dramatic effect since whenever something has to write a new file
to /tmp it needs to go through the long list (basically a sequential file in
memory) to find the next open inode, etc. So it could certainly effect
performance. Basically I'm going to make sure the script runs nightly and
clears out anything older than 24 hours that match the criteria of that
application's temp files.

Many thanks go to:

Rodney Wines
Roger Fujii
Matthew Stier
Danny Johnson
Ray Delaney
Hope I didn't forget anybody.

Thanks again!


Sun Managers:
  We have a Sun Ultra-Enterprise 6000 w/ 1.25GB memory running Solaris 2.5.1
with recommended patch cluster from last month. Swap is currently at 2.0GB
as the ERP package BaaN recommends (at least 50% above physical memory).
  The ERP package can create up to a few thousand entries a day in /tmp that
are 2-byte temp files, but it doesn't erase them when it's finished. My
question is: Does this affect the performance of the system? I don't see
any swapping at all, a little paging here and there but there only little
blips in perfmeter - I can only imagine that it's the file system cache
releasing that memory that causes the little blip. Obviously over time
thousands of files at 2bytes each could take up space, like right now we
have about 6500 files in tmp.
  My plan is to run a cron script every night that will clear out all files
beginning with the regular naming scheme of those tmp files that are 2 bytes
long and at least 3 days old. I'm not sure if I will gain anything but a
cleaner directory, though that's always a good thing in itself.

Thanks for any information



This archive was generated by hypermail 2.1.2 : Fri Sep 28 2001 - 23:13:16 CDT