ASMCMD is very slow

asmcmd provides a command line interface for Oracle's Automatic Storage Management. It gives a familiar Unix style feel to negotiate around it rather than having to construct SQL statements through sqlplus.

One of the big problems with it though is that it is very slow. Is there a way to speed it up?

Yes there is. asmcmd is actually a perl script that queries the underlying V$ASM_FILE and V$ASM_DISKGROUP views. The script of interest is the file $ORACLE_HOME/bin/asmcmdcore

Edit this file and change references to V$ASM_DISKGROUP with V$ASM_DISKGROUP_STAT

You will notice a dramatic increase in speed. V$ASM_DISKGROUP with V$ASM_DISKGROUP_STAT return the same information. The difference is that V$ASM_DISKGROUP_STAT retrieves it's information from cache where as V$ASM_DISKGROUP retrieves its information from disk every time.

0 comments:

All views on this blog are my own. All hints, tips and scripts should be run and tested on your development and test servers before attempting in production.

About this blog

I have been DBA with over 10 years experience in Oracle. This blog aims to note interesting bits and pieces that I come across on a day to day basis.