"fuser" for Oracle files

From: Herring Dave - dherri <Dave.Herring_at_acxiom.com>
Date: Thu, 16 Aug 2012 18:37:16 +0000
Message-ID: <BD475CE0B3EE894DA0CAB36CE2F7DEB4E3D00C6E_at_LITIGMBCRP02.Corp.Acxiom.net>



Folks,

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 10.2.0.2

DAVID HERRING
DBA
Acxiom Corporation

EML   dave.herring_at_acxiom.com
TEL    630.944.4762
MBL   630.430.5988 

1501 Opus Pl, Downers Grove, IL 60515, USA WWW.ACXIOM.COM                 

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

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.


--
http://www.freelists.org/webpage/oracle-l
Received on Thu Aug 16 2012 - 13:37:16 CDT

Original text of this message