"fuser" for Oracle files

  • From: Herring Dave - dherri <Dave.Herring@xxxxxxxxxx>
  • To: "Oracle-L (oracle-l@xxxxxxxxxxxxx)" <oracle-l@xxxxxxxxxxxxx>
  • Date: Thu, 16 Aug 2012 18:37:16 +0000


This is probably old news to most, but in performing regular cleanup of 
[a|b|u]dump directories I've found that calls to "fuser" can have a large 
impact on the performance of the cleanup script.  Normally we validate any 
Oracle audit/trace/logfile as for being opened or not, using "fuser", before 
removing or gzip'ing it.  Using "strace" to see what's going on I saw that 
"fuser" has to check every /proc for the given file (like a full scan), which 
makes sense since use of it is saying "tell me all processes that have this 
file opened".   On a system with 1000's of files to check and 1000's of 
processes running, each check can take a relatively long time.

The good news is nearly all Oracle audit and tracefiles have the owner's PID as 
part of the filename, so with that it's now like an indexed read.  Individual 
file checks went from 0m3.144s to 0m0.003s.

The testing was done on RHEL4.6, Oracle

Acxiom Corporation
EML   dave.herring@xxxxxxxxxx
TEL    630.944.4762
MBL   630.430.5988 
1501 Opus Pl, Downers Grove, IL 60515, USA


The information contained in this communication is confidential, is
intended only for the use of the recipient named above, and may be legally

If the reader of this message is not the intended recipient, you are
hereby notified that any dissemination, distribution or copying of this
communication is strictly prohibited.

If you have received this communication in error, please resend this
communication to the sender and delete the original message or any copy
of it from your computer system.

Thank You.


Other related posts:

  • » "fuser" for Oracle files - Herring Dave - dherri