Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

We use Tika for PDF text content extraction for searching. I'm seeing heavy use of temporary files that seem to now run us out of file handles.

We're on CentOS 5.5. For our search system, we had previously bumped up open file handles (/etc/sysctl.conf) fs.file-max = 65535

When looking at lsof for my process, I see lots of files marked as DEL (deleted memory mapped files). If I stop submitting new documents to be indexed, these will get cleared out after several minutes.

java 11105 root DEL REG 104,2 1278402 /tmp/+~JF4155000471009101661.tmp

Can I tune the kernel to clear out these DEL files sooner, or should I increase the number of file handles? If so, how high can we safely go? I have sufficient memory to be able to give more to the kernel.



share|improve this question

I couldn't find a good reference for how increasing fs.file-max impacts the system. Presumably that makes your kernel consume more memory as the structure to track open files gets larger and larger. I suggest increasing to a larger number like 128K and keeping an eye on /proc/sys/fs/file-nr to see how many files are actually used.

share|improve this answer
Not sure about other impact besides bigger kernel structures, but huge values of fs.file-max are pretty common on Oracle servers with no ill effects that I'm aware of (see… where they suggest a fairly outrageous value of "6815744 or higher" for their example configuration) – voretaq7 Jan 20 '11 at 19:05
Yeah my naive assumption is that the amount of memory used by the kernel for these data structures is fairly small even if the max file size is extremely large. There may however be performance effects of the kernel having to continually traverse a very large open file list. – Phil Hollenback Jan 20 '11 at 20:05

what does a few minutes of vmstat show during this high time? vmstat will show you if you're I/O bound on CPU, swap, memory. I would start there.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.